Note that PendingIntents are persisted independently of your application process. This means that if you adopt this approach you will need to persist the last used identifier and use it to initialize the value of _intentID when your application restarts. Also, to handle synchronization properly, you may not be able to use AtomicInteger because persistence will need to be synchronized with the increment-and-get operation which I don't believe is possible using that class.
Tom. 2009/5/26 Andy King <andyk...@greatlogic.com> > > Yes, that is good to know, thank you! > > I am going to try using the following to make the intent (and hence > the pending intent) unique: > > private static AtomicInteger _intentID = new AtomicInteger(); > ... > Intent intent = new Intent(_context, AlarmNotificationActivity.class); > intent.setData(Uri.parse(Integer.toString(_intentID.getAndIncrement > ()))); > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---