开发者

How to differentiate between Mulitple alarms in android

In the Android app which is getting developed开发者_开发问答, i have multiple alarms.

I want to initiate, different actions on different alarms.

How can i differentiate or determine , exactly which alarm has been fired??

Rgds Yaaga


When you set your alarms with AlarmManager you give each of them a PendingIntent which must be bound to an Intent. You can use that Intents' extras bundle to distinguish between different alarms (by putting in an int or a String, say).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜