views:

81

answers:

2

can anybody give example with service in android?

Thanks

+2  A: 

In Android you basically have 2 kinds of services.

  1. Local Service
  2. Remote Service

If you run local service then your application as well as your service will run on same ProcessID

If you run a remote service it runs as a different process you can communicate with your service using Android Interface Definition Language(AIDL)

You can find sample codes in API Demo which comes along with Android SDK as well as here

http://marakana.com/forums/android/examples/60.html

http://developer.android.com/intl/de/guide/developing/tools/aidl.html#implementing

Rahul
A: 

Here is a link which covers both the services pretty well and with examples. Have a look and also at the other topics... This is a very good link for beginners.. Try searching for existing questions next time on. http://www.bogotobogo.com/Android/android20NotificationService.html

Shouvik