The intent is passed to the service's onStart / onStartCommand (Android 1.x / 2.x).

onCreate is only called for service creation (once, at least until the process is killed), while onStart / onStartCommand are called every time you call startService, and are passed the intent you used with startService.

-- Kostya

02.08.2010 13:56, 汪健飞 пишет:
In the Activity I write

Intent i=new Intent("IntentServiceTest");
Bundle bundle = new Bundle();
bundle.putString("abc", "def");
i.putExtra("wer", bundle);
IntentTest.this.startService(i);
Start Service into Service OnCreate method,but I don't know how to do get this Intent in this method.Thanks!


--
Cary
--
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


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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

Reply via email to