automatically calls this function. Initialization is generally performed in this function, for example, creating a thread.OnDestroy (): You do not need to implement it, depending on your needs. When a service is destroyed, the system automatically calls this function. In this function, purge the job, for example, terminate and recycle the thread.
(03) The client starts the service through startService.
(04
Android Service is divided into two types:
Local Service: called in the same apk
Remote Service: called by another apk
Remote services must be completed using AIDL.What is AIDL?
AIDL (Android Interface Definition Language) is an IDL Language used to generate code for int
Android study note 26. Cross-process call Service (AIDL Service) and androidaidlCross-process call Service (AIDL Service) I. AIDL Service1. What is AIDL Service?AIDL, that is, Android I
The previously mentioned Service is a Local Service, that is, the Service and Client are in the same process (that is, within the same application), and the Service lifecycle is subject to the process lifecycle. In practical applications, sometimes you want to use the Service
Detailed explanation of Service (Background Service) in Android
This article mainly introduces the Service (Background Service) details in Android. This article describes the concept, role, lifecycle, startup method, and code inst
thread to do that work. (Service is not a separate process and not a separate thread)The service provides two main functions:Context.startservice () is used to start a service in the background;Context.bindservice () is used to bind other services in order to obtain services provided by another service;locally served
The most important component services and activities of Android are the communication problems between them. Of course, today we will not study the underlying implementation issues. I will study how to use the upper-layer applications.
First, the activity calls the service
This is relatively basic, and there are two common methods;
First, using intent, this is relatively simple. You can specify the package
About Web Service
Android applications usually run on mobile platforms. The hardware resources of mobile systems are far inferior to those of PC platforms. Whether it is storage or computing, it is possible to run some small applications on Android platforms, however, for a large amount of data processing, complex computing can only be deployed on remote servers,
Android-bind a service to call a serviceThe Service can be started in two ways:1. StartedStarted Service is Started by using the startService (Intent intent) method in the Application. Once started, this type of Service will run endlessly, even if its Activity is Destroy. To
First, Service brief introductionService is one of the four components of the Android system (activity, Service, Broadcastreceiver, ContentProvider), which is almost identical to the level of activity. But you can't do it on your own, only in the background, and you can interact with other components. Service can be us
service can be divided into two types depending on how it is started:1, Startedstarted service is initiated by using the StartService (Intent Intent) method in application. Once this type of service is started, it will run indefinitely, even if the activity that started it is destroy off. To stop this type of service,
Intent = new Intent () to start the service; Set the Action property intent.setaction ("Com.example.service.FIRST_SERVICE") for intent; Start.setonclicklistener (New Onclicklistener () {@Override public void onclic K (View arg0) {//Start specified service Startser Vice (intent); } }); Stop.setonclicklistener (New Onclicklistener () {@Override
Digress: As one-to-one is explained orally by a colleague for consultation, it is not convenient for multiple parties to spread and inherit. Therefore, I would like to write this article to explain it.
1. Brief description of android service:
Android Service, also known as Java Ser
Article reprinted to: http://blog.csdn.net/guolin_blog/article/details/9797169This is written by Guo Lin .... is to write "the first line of code," The Great Man, Master is the master, and the master wrote the article compared to his own poor very muchThe article is very well written ... Feel oneself also can not write so good introduction service article, hope more reprint, let more people seeIn the previous article, we learned many important things
This two-day review of Android service knowledge, before the memory fades, to summarize. This article mainly explains the basic concept and use of service, the use of cross-process call service, System common service. So this article is very difficult, only for the students
Invoking Service (aidl service) across processesFirst, Aidl Service1. What is Aidl Service?Aidl, that is, Android Interface definition Language. Is Android used to define the remote interface, the syntax of the Aidl interface definition language is relatively simple, the int
Bmob mobile backend cloud service platform-Android starts from scratch-(2) android Quick Start, bmob-androidBmob mobile backend cloud service platform-Android starts from scratch-(2) android Quick Start
In the previous blog, we br
First, Service brief introductionService is one of the four components of the Android system (activity, Service, Broadcastreceiver, ContentProvider), which is almost identical to the level of activity. But you can't do it on your own, only in the background, and you can interact with other components. Service can be us
First, Service brief introductionService is one of the four components of the Android system (activity, Service, Broadcastreceiver, ContentProvider), which is almost identical to the level of activity. But you can't do it on your own, only in the background, and you can interact with other components. Service can be us
First, Service brief introductionService is one of the four components of the Android system (activity, Service, Broadcastreceiver, ContentProvider), which is almost identical to the level of activity. But you can't do it on your own, only in the background, and you can interact with other components. Service can be us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.