I'm having a hard time finding a good working example of
PendingIntent.getService.
My code isn't working. I have a service, MyService, that I want to
start using an alarm. Here's some code I have in my activity's onStart
() method:
AlarmManager am = (AlarmManager)this.getSystemService
(Context.ALARM_SERVICE);
Intent serviceIntent = new Intent(getApplicationContext(),
Nomad.class);
serviceIntent.putExtra("type", "functiona");
PendingIntent alarmIntent = PendingIntent.getService(this, 0,
serviceIntent, PendingIntent.FLAG_CANCEL_CURRENT);
am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() +
10000, 10000, alarmIntent);
I also have my service declared in my manifest. The service has no
intent filters associated with it.
My understanding is that PendingIntent.getService will cause my
service to be started.
But, it's not.
Help, anyone, please .....
Thanks.
Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---