Search code examples
javaandroidservicebackgroundforeground

Background and foreground Service For Execution


I am stuck in a problem in which I need to compute some concurrent calculation in the background and notify the user when each execution is completed.

I read a lot of articles. In which I found Service Class, Intent Service, and other ones. But I found crash above 24 android os versions.

Nowadays which method is best to execute the background service in android and why?


Solution

  • For the above problem you can use Work Manager. For better understanding please review the following link

    https://developer.android.com/topic/libraries/architecture/workmanager