Android Intent Service Example

Simple example for Android Intent Service and broadcast receiver

Declaring Service in the Manifest

AndroidManifest.xml

android:exported :- Whether or not components of other applications can invoke the service or interact with it — “true” if they can, and “false” if not. When the value is “false“, only components of the same application or applications with the same user ID can start the service or bind to it. – developer.android.com

More about service tag click here

MainActivity.java

 

activity_main.xml

MyService.java

 

For How to check the service is running click the link : http://wiki.workassis.com/android-check-the-service-is-running

 

ref:

https://developer.android.com/reference/android/app/IntentService.html

https://developer.android.com/training/run-background-service/create-service.html

https://developer.android.com/guide/topics/manifest/service-element.html

1 Like
Author: bm on July 19, 2016
Category: Android
Tags: , ,

Your comment:

Your Name

Comment:




Last articles