[android-developers] Re: PendingIntent.getService not working ...

2009-07-09 Thread Richard Schilling
On Jul 1, 9:29 am, Dianne Hackborn hack...@android.com wrote: Pending services work fine. However currently for the alarm manager I would recommend always first sending to a receiver, since there is a limitation in the system where the wakelock it holds will be released too early when

[android-developers] Re: PendingIntent.getService not working ...

2009-07-09 Thread Richard Schilling
Like the guy below suggests, I use different actions that the Broadcast Reciever processes: Intent one = new Intent(register.alarm.ONE); Intent two = new Intent(register.alarm.TWO); As the broadcast receiver gets each message, it registers, cancels alarms, as needed I know it sounds silly

[android-developers] Re: PendingIntent.getService not working ...

2009-07-01 Thread Peli
I have not tried a pending service yet, but a quick workaround would be to send a pending broadcast intent to yourself (broadcast receiver), and launch the service from there. Regardless of this workaround, it would be nice to know whether there are issues with pending service intents, or

[android-developers] Re: PendingIntent.getService not working ...

2009-07-01 Thread Zod
Hi! This code works for me: (although I initialize the alarm in the same service which I want to wake up with the alarmmanager). AlarmManager alarmManager = (AlarmManager) getSystemService (ALARM_SERVICE); Intent intent = new Intent(TrackerService.this, TrackerService.class);

[android-developers] Re: PendingIntent.getService not working ...

2009-07-01 Thread Dianne Hackborn
Pending services work fine. However currently for the alarm manager I would recommend always first sending to a receiver, since there is a limitation in the system where the wakelock it holds will be released too early when delivering to a service. So if you want to be sure you receive the

[android-developers] Re: PendingIntent.getService not working ...

2009-07-01 Thread Veroland
Thanks, but how do you send multiple Pending's to the same service and are still able to differentiate between them, i.e. like 3 alarms for different times? On Jul 1, 6:29 pm, Dianne Hackborn hack...@android.com wrote: Pending services work fine.  However currently for the alarm manager I would

[android-developers] Re: PendingIntent.getService not working ...

2009-07-01 Thread Dianne Hackborn
Use different actions, data, type, categories, or the request code to create different distinct objects. On Wed, Jul 1, 2009 at 11:13 AM, Veroland marius.ven...@gmail.com wrote: Thanks, but how do you send multiple Pending's to the same service and are still able to differentiate between