Latest interface design.
This commit is contained in:
parent
161da4dac2
commit
caf2edf9a6
@ -17,7 +17,6 @@ import java.util.Timer;
|
|||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class AlarmNotify extends Service {
|
public class AlarmNotify extends Service {
|
||||||
private final int UPDATE_INTERVAL = 15*1000; // Timer is updated four times a minute
|
|
||||||
public final int notifyID = 1;
|
public final int notifyID = 1;
|
||||||
private Timer timer = new Timer();
|
private Timer timer = new Timer();
|
||||||
|
|
||||||
@ -38,6 +37,7 @@ public class AlarmNotify extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
|
final int UPDATE_INTERVAL = 10*1000; // Timer is updated six times a minute
|
||||||
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
final int gracePeriod = sharedPref.getInt(getString(R.string.GracePeriodPref), 60);
|
final int gracePeriod = sharedPref.getInt(getString(R.string.GracePeriodPref), 60);
|
||||||
@ -58,9 +58,6 @@ public class AlarmNotify extends Service {
|
|||||||
.setPriority(Notification.PRIORITY_HIGH);
|
.setPriority(Notification.PRIORITY_HIGH);
|
||||||
//.setContentText(String.format(getString(R.string.notificationText), phoneNumber) + MainActivity.MinutesToGracePeriodStr(gracePeriod))
|
//.setContentText(String.format(getString(R.string.notificationText), phoneNumber) + MainActivity.MinutesToGracePeriodStr(gracePeriod))
|
||||||
|
|
||||||
// todo better icon
|
|
||||||
|
|
||||||
|
|
||||||
// Set up dismiss action
|
// Set up dismiss action
|
||||||
Intent cancellerIntent = new Intent(getBaseContext(), CancelGraceReceiver.class);
|
Intent cancellerIntent = new Intent(getBaseContext(), CancelGraceReceiver.class);
|
||||||
PendingIntent cancellerPendingIntent = PendingIntent.getBroadcast(getBaseContext(), MainActivity.CANCEL_GRACE_REQUEST, cancellerIntent, 0);
|
PendingIntent cancellerPendingIntent = PendingIntent.getBroadcast(getBaseContext(), MainActivity.CANCEL_GRACE_REQUEST, cancellerIntent, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user