![]() Any background work should be performed asynchronously. This onStartJob() method will run on the main thread, so you can generate Toast messages that will be rendered on the activity. Writing a job simply requires extending the JobService class. Because of recent restrictions on Android to improve battery life, all background work including periodic tasks should now be scheduled through the JobScheduler. Services are used for repetitive and potential long running operations, checking for new data, data processing, indexing content, etc. As the service has no user interface it is not bound to the lifecycle of an activity. ![]() Service is a component which runs in the background, without direct interaction with the user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |