Skip to content
Snippets Groups Projects
Commit 23f6e11b authored by Peter Joseph De Jonckheere CESM2014's avatar Peter Joseph De Jonckheere CESM2014
Browse files

Started testing and bug-fixing

parent 1a1e9d08
No related branches found
No related tags found
No related merge requests found
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/outputs" /> <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" /> <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content> </content>
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="com.android.support:support-media-compat-26.1.0" level="project" /> <orderEntry type="library" name="com.android.support:support-media-compat-26.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="junit:junit:4.12@jar" level="project" /> <orderEntry type="library" scope="TEST" name="junit:junit:4.12@jar" level="project" />
...@@ -143,6 +143,5 @@ ...@@ -143,6 +143,5 @@
<orderEntry type="library" name="com.android.support:support-v4-26.1.0" level="project" /> <orderEntry type="library" name="com.android.support:support-v4-26.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="net.sf.kxml:kxml2:2.3.0@jar" level="project" /> <orderEntry type="library" scope="TEST" name="net.sf.kxml:kxml2:2.3.0@jar" level="project" />
<orderEntry type="library" name="com.android.support:animated-vector-drawable-26.1.0" level="project" /> <orderEntry type="library" name="com.android.support:animated-vector-drawable-26.1.0" level="project" />
<orderEntry type="library" name="android-android-26" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -23,6 +23,11 @@ public class Settings extends AppCompatActivity{ ...@@ -23,6 +23,11 @@ public class Settings extends AppCompatActivity{
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.settings); setContentView(R.layout.settings);
setUpButtons(); setUpButtons();
retrieveSettings();
}
private void retrieveSettings(View view){
SharedPreferences shared = this.getSharedPreferences()
} }
private void setUpButtons(){ private void setUpButtons(){
...@@ -41,9 +46,7 @@ public class Settings extends AppCompatActivity{ ...@@ -41,9 +46,7 @@ public class Settings extends AppCompatActivity{
} }
private void displaySavedToast(View view){ private void displaySavedToast(View view){
Toast saved = new Toast(view.getContext()); Toast saved = Toast.makeText(view.getContext(), R.string.settings_saved,Toast.LENGTH_SHORT);
saved.setText(R.string.settings_saved);
saved.setDuration(Toast.LENGTH_SHORT);
saved.show(); saved.show();
} }
......
...@@ -33,7 +33,7 @@ public class SedentaryStimulus extends BroadcastReceiver implements Stimulus { ...@@ -33,7 +33,7 @@ public class SedentaryStimulus extends BroadcastReceiver implements Stimulus {
} else{ } else{
strategy = defaultStrategy; strategy = defaultStrategy;
} }
strategy.monitor(); // strategy.monitor();
Intent intent = new Intent(this.context, strategy.getClass()); Intent intent = new Intent(this.context, strategy.getClass());
this.context.startService(intent); this.context.startService(intent);
} }
......
...@@ -11,6 +11,7 @@ import android.hardware.TriggerEvent; ...@@ -11,6 +11,7 @@ import android.hardware.TriggerEvent;
import android.hardware.TriggerEventListener; import android.hardware.TriggerEventListener;
import android.os.IBinder; import android.os.IBinder;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.util.Log;
import com.example.notification.Notification; import com.example.notification.Notification;
...@@ -49,6 +50,7 @@ public class SigMotionDetect extends Service implements StimulusStrategy { ...@@ -49,6 +50,7 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
Intent i = new Intent(this, Notification.class); Intent i = new Intent(this, Notification.class);
PendingIntent pi = PendingIntent.getBroadcast(this, 0, i, 0); PendingIntent pi = PendingIntent.getBroadcast(this, 0, i, 0);
am.set(AlarmManager.ELAPSED_REALTIME, AlarmManager.INTERVAL_HOUR, pi); am.set(AlarmManager.ELAPSED_REALTIME, AlarmManager.INTERVAL_HOUR, pi);
// Log.i("myTag", "Alarm SET");
} }
public void monitor() { public void monitor() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment