![]() ![]() ![]() If you want to do long running tasks or operations in your app that which takes more than 5 seconds to complete the task then you cannot run those tasks on UI thread.The UI thread in the android takes the responsibility to start the application and executes the user operations performed on the screen by the user.Started services are launched by calling the startService() method of your activity or fragment and passing through as argument to the method the intent object which identifies the service to be started. It runs indefinitely in the android background unless it is stopped via a call to the stopSelf() method or destroyed by the android runtime to free up resources. Started services are launched by the other components of android such as activities and broadcast receivers. There are different types of services which include : Started services, Intent Services, Bound Services etc. Services are particularly suited to performing tasks that take a long time to complete such as, streaming music/movie for a user or downloading a file over the internet. The service class is simply a normal java class under the android framework that is capable of running tasks in the background of an application and requires no user interface for interaction as all of its work happens behind the scenes. Basic Knowledge of native Android development using Java.You will learn how to use the various types of services in your android application.You will learn about the service class & its types.This class represents a core component of the android framework and as such a concept every android developer must familiarize him/herself with. The service class in android represents one of the 4 primary components of android (the other 3 being Activity, Broadcast Receiver and Content Provider).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |