I am wondering how is it possible to display stock alarm icon near clock and alarm icon together with hour on locked screen (same as you would use stock alarm).
Asked
Active
Viewed 2,377 times
2 Answers
4
Try this.
Intent alarmChanged = new Intent("android.intent.action.ALARM_CHANGED");
alarmChanged.putExtra("alarmSet", true/*false if you want to hide it*/);
context.sendBroadcast(alarmChanged);

Aerrow
- 12,086
- 10
- 56
- 90
2
Use the following
Settings.System.putString(context,
Settings.System.NEXT_ALARM_FORMATTED,
timeStr);
to put alarm date/time on lock screen.
But, some vendors don't use this setting to display alarm data/time on lock screen, for instance, HTC.

yenliangl
- 784
- 4
- 4
-
1Settings is part of what class? Because eclipse is suggestion android provider which is not taking context as an argument. – Jakub Szczygieł Mar 14 '12 at 13:25