Skip to content

tushargarg2201/Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android

Here i have made a Service request of 3 types.

  1. Through IntentService

  2. Through JobIntentService

  3. Through NormalService.

  4. IntentService: IntentService is outdated post and above oreo. Intent service doesn't respect the doze mode. For Intent service we also need to acquire wakelock.

  5. JobIntentService: JobIntentService is more preferable for oreo and above. JobIntentService, we don't need to acquire the wakelock and it's respect the doze mode which is used for improving the battery performance. For JobIntentService we put the jobs in a queue. Here i have done communication from service to UI layer through ResultReceiver. ResultReceiver is a fantastic generic class which is given by Android for interprocess communication. Object of ResultReciever we can pass it through intent which is a key here.

  6. NormalService: Normal service which extends Service. It's a called started service. Here communication between Service to UI have been done through ResultReceiver class. By default it's don't create a seperate thread similar to IntentService and JobIntentService. Here by default work is done in the main Thread. Here we have to create our seperate thread through HandlerThread.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages