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

Forgot a bit

parent 61913fc5
No related branches found
No related tags found
No related merge requests found
......@@ -133,9 +133,13 @@ public class SaveFile {
if (file.isFile() & file.canRead()) {
BufferedReader br = new BufferedReader(new FileReader(file));
sound = Integer.parseInt(br.readLine());
led = Integer.parseInt(br.readLine());
vibration = Integer.parseInt(br.readLine());
try {
sound = Integer.parseInt(br.readLine());
led = Integer.parseInt(br.readLine());
vibration = Integer.parseInt(br.readLine());
}catch (NumberFormatException e){
}
if (file.isFile() & file.canWrite()) {
BufferedWriter bw = new BufferedWriter(new FileWriter(file));
if(shared.getBoolean(context.getString(R.string.audio), false)) {
......
......@@ -83,10 +83,10 @@ public class Accelerometer extends Service implements StimulusStrategy, SensorEv
// i.putExtra(getString(R.string.serviceID), startId);
PendingIntent pi = PendingIntent.getBroadcast(getBaseContext(), R.integer.alarm_rc, i, PendingIntent.FLAG_UPDATE_CURRENT);
//test
am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+3000, pi);
//int interval = shared.getInt(getString(R.string.daily_goal), getResources().getInteger(R.integer.notify_period_minutes));
//am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+3000, pi);
int interval = shared.getInt(getString(R.string.daily_goal), getResources().getInteger(R.integer.notify_period_minutes));
// am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+(1000*60*interval), pi);
am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+(1000*60*interval), pi);
// Log.d("myTag", "ALARM SET" + interval);
}
......
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