Android Intentservice fully parse when service encounters handler

Source: Internet
Author: User
<span id="Label3"></p> <blockquote> <blockquote> <p>Reprint please indicate the source:<br>http://blog.csdn.net/lmj623565791/article/details/47143563;<br>This article is from: "Zhang Hongyang's blog"</p> </blockquote> </blockquote>An overview<p><p>As we all know, in the development of android, any time-consuming operation will be given to the service to do as much as possible, for example, we upload a number of images, upload process users may put the application in the background, and then do other things, our activity is likely to be killed, therefore, you can consider the upload operation to the service to do, if you are worried about the service is killed, but also by setting <code>startForeground(int, Notification)</code> the method to promote its Priority.</p></p><p><p>then, in the service we certainly can not directly take the time-consuming operation, generally need to open the Sub-thread to do something, to manage the service life cycle and sub-threading is not an elegant approach; fortunately, Android gives us a class, called <code>IntentService</code> , Let's take a look at the Note.</p></p> <blockquote> <blockquote> <p>Intentservice is a base class for {@link service}s that handle asynchronous<br>Requests (expressed as {@link Intent}s) on Demand. Clients send requests<br>Through {@link android.content.context#startservice (Intent)} calls; The<br>Service is started as needed, handles each Intent in turn using a worker<br>thread, and stops itself when the it runs out of the Work.</p> </blockquote> </blockquote><p><p>Meaning that Intentservice is a service-based class that handles asynchronous Requests. You can submit a request through StartService (Intent), which is created when needed, and shuts down after all tasks are completed, and the request is processed by the worker Thread.</p></p><p><p>so, we use the Intentservice at least two benefits, on the one hand do not need to go to new thread, on the other hand do not need to consider when to shut down the Service.</p></p><p><p>well, then let's look at a complete example.</p></p>The use of two Intentservice<p><p>We will show a number of pictures upload case, of course, we will simulate the time-consuming upload, after all, our focus on the use of Intentservice and source Resolution.</p></p><p><p>First Look at the</p></p><p><p><strong></strong></p></p><p><p></p></p><p><p>Whenever we click a button, a task is assigned to the service in the background, and the backend service completes a request to the activity, and then the activity updates the Ui. When all tasks are completed, the backend service exits and does not occupy any memory.</p></p><p><p><strong>Service</strong></p></p><pre class="prettyprint"><code class="language-java hljs "><span class="hljs-keyword"><span class="hljs-keyword"></span> package</span>com.zhy.blogcodes.intentservice;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.app.IntentService;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.Context;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.Intent;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.util.Log;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-class"><span class="hljs-class"> <span class="hljs-keyword">class</span> <span class="hljs-title">uploadimgservice</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">intentservice</span>{</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Static</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Final</span></span>String action_upload_img =<span class="hljs-string"><span class="hljs-string">"com.zhy.blogcodes.intentservice.action.UPLOAD_IMAGE"</span></span>;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">Static</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Final</span></span>String Extra_img_path =<span class="hljs-string"><span class="hljs-string">"com.zhy.blogcodes.intentservice.extra.IMG_PATH"</span></span>;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">Static</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">startuploadimg</span></span>(context context, String Path) {Intent Intent =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Intent (context, uploadimgservice.class); Intent.setaction (action_upload_img); Intent.putextra (extra_img_path, PATH); Context.startservice (intent); }<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-title"><span class="hljs-title">Uploadimgservice</span></span>() {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>(<span class="hljs-string"><span class="hljs-string">"uploadimgservice"</span></span>); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword">protected</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">onhandleintent</span></span>(Intent Intent) {<span class="hljs-keyword"><span class="hljs-keyword">if</span></span>(intent! =<span class="hljs-keyword"><span class="hljs-keyword">NULL</span></span>) {<span class="hljs-keyword"><span class="hljs-keyword">Final</span></span>String action = intent.getaction ();<span class="hljs-keyword"><span class="hljs-keyword">if</span></span>(action_upload_img.equals (ACTION)) {<span class="hljs-keyword"><span class="hljs-keyword">Final</span></span>String Path = Intent.getstringextra (extra_img_path); Handleuploadimg (path); } } }<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">handleuploadimg</span></span>(String Path) {<span class="hljs-keyword"><span class="hljs-keyword">Try</span></span>{<span class="hljs-comment"><span class="hljs-comment">//analog upload time-consuming</span></span>Thread.Sleep (<span class="hljs-number"><span class="hljs-number"></span> the</span>); Intent Intent =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Intent (intentserviceactivity.upload_result); Intent.putextra (extra_img_path, PATH); Sendbroadcast (intent); }<span class="hljs-keyword"><span class="hljs-keyword">Catch</span></span>(interruptedexception E) {e.printstacktrace (); } }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">onCreate</span></span>() {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>. onCreate (); LOG.E (<span class="hljs-string"><span class="hljs-string">"TAG"</span></span>,<span class="hljs-string"><span class="hljs-string">"onCreate"</span></span>); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">OnDestroy</span></span>() {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>. OnDestroy (); LOG.E (<span class="hljs-string"><span class="hljs-string">"TAG"</span></span>,<span class="hljs-string"><span class="hljs-string">"ondestroy"</span></span>); }}</code></pre><p><p>Code is very short, is mainly inherited <code>IntentService</code> , and then the replication onhandleintent method, according to the incoming intent to select the specific Operation. <code>startUploadImg</code>I wrote an auxiliary method, save every time to build intent,startservice.</p></p><p><p><strong>Activity</strong></p></p><pre class="prettyprint"><code class="language-java hljs "><span class="hljs-keyword"><span class="hljs-keyword"></span> package</span>com.zhy.blogcodes.intentservice;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.BroadcastReceiver;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.Context;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.Intent;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.IntentFilter;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.Bundle;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.support.v7.app.AppCompatActivity;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.view.Menu;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.view.MenuItem;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.view.View;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.widget.LinearLayout;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.widget.TextView;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>com.zhy.blogcodes.r;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-class"><span class="hljs-class"> <span class="hljs-keyword">class</span> <span class="hljs-title">intentserviceactivity</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">appcompatactivity</span>{</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">Static</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Final</span></span>String Upload_result =<span class="hljs-string"><span class="hljs-string">"com.zhy.blogcodes.intentservice.UPLOAD_RESULT"</span></span>;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span>LinearLayout mlytaskcontainer;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span>Broadcastreceiver Uploadimgreceiver =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Broadcastreceiver () {<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">OnReceive</span></span>(context context, Intent Intent) {<span class="hljs-keyword"><span class="hljs-keyword">if</span></span>(intent.getaction () = = Upload_result) {String Path = Intent.getstringextra (uploadimgservice.extra_img_path); Handleresult (path); } } };<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">Handleresult</span></span>(String Path) {TextView TV = (TextView) Mlytaskcontainer.findviewwithtag (path); Tv.settext (path +<span class="hljs-string"><span class="hljs-string">"upload Success ~ ~ ~"</span></span>); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword">protected</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">onCreate</span></span>(Bundle Savedinstancestate) {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>. onCreate (savedinstancestate); Setcontentview (r.layout.activity_intent_service); Mlytaskcontainer = (linearlayout) Findviewbyid (r.id.id_ll_taskcontainer); Registerreceiver (); }<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">Registerreceiver</span></span>() {intentfilter filter =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Intentfilter (); Filter.addaction (upload_result); Registerreceiver (uploadimgreceiver, filter); }<span class="hljs-keyword"><span class="hljs-keyword">int</span></span>i =<span class="hljs-number"><span class="hljs-number">0</span></span>;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">AddTask</span></span>(view View) {<span class="hljs-comment"><span class="hljs-comment">//analog Path</span></span>String Path =<span class="hljs-string"><span class="hljs-string">"/sdcard/imgs/"</span></span>+ (++i) +<span class="hljs-string"><span class="hljs-string">". png"</span></span>; Uploadimgservice.startuploadimg (<span class="hljs-keyword"><span class="hljs-keyword"></span> this</span>, path); TextView TV =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>TextView (<span class="hljs-keyword"><span class="hljs-keyword"></span> this</span>); Mlytaskcontainer.addview (tv); Tv.settext (path +<span class="hljs-string"><span class="hljs-string">"is Uploading ..."</span></span>); Tv.settag (path); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword">protected</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">OnDestroy</span></span>() {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>. OnDestroy (); Unregisterreceiver (uploadimgreceiver); }}</code></pre><p><p>activity, whenever I click on a button to call addtask, back to the simulation to create a task, and then hand over to Intentservice to deal with.</p></p><p><p>Note that when each task of the service is completed, a broadcast is sent, and we register the broadcast separately in the Activity's OnCreate and ondestroy, and the specified UI is updated when the broadcast is Received.</p></p><p><p><strong>Layout file</strong></p></p><pre class="prettyprint"><code class="language-xml hljs "><span class="hljs-tag"><span class="hljs-tag"><<span class="hljs-title">linearlayout </span> <span class="hljs-attribute">android:id </span> =<span class="hljs-value"> "@+id/id_ll_taskcontainer" </span> <span class="hljs-attribute">xmlns:android </span> =<span class="hljs-value"> "http://schemas.android.com/apk/res/android" </span> <span class="hljs-attrib Ute ">xmlns:tools </span> =<span class=" hljs-value ">" http://schemas.android.com/tools "</span> <span class=" hljs- Attribute ">android:layout_width </span> =<span class=" hljs-value ">" match_parent "</span> <span class=" Hljs-attri Bute ">android:layout_height </span> =<span class=" hljs-value ">" match_parent "</span> <span class=" hljs-attribute ">android:orientation </span> =<span class=" hljs-value " " vertical "< span>; </span></span></span> <span class="hljs-tag"><span class="hljs-tag"><<span class="hljs-title">button</span> <span class="hljs-attribute">android:layout_width</span>=<span class="hljs-value">"wrap_content"</span> <span class="hljs-attribute">android:layout_height</span>= <span class="hljs-value">"wrap_content"</span> <span class="hljs-attribute">Android:onclick</span>=<span class="hljs-value">"addtask"</span> <span class="hljs-attribute">android:text</span>=<span class="hljs-value">"add Task"</span>/> </span></span><span class="hljs-tag"><span class="hljs-tag"></<span class="hljs-title">linearlayout</span>></span></span></code></pre><p><p>ok, so that we have completed our needs, through the above example, you can see that we can use intentservice very convenient to handle background tasks, shielding a lot of details, and service and activity communication, we choose the way of broadcasting (of course, it can also use <code>LocalBroadcastManager</code>).</p></p><p><p>After learning to use it, let's look at its internal implementation bang.</p></p>Three Intentservice source code analysis<p><p>Direct View Intentservice Source code</p></p><pre class="prettyprint"><code class="language-java hljs "><span class="hljs-comment"><span class="hljs-comment">/* Copyright (C) the Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "licen Se "); * You are not a use this file except in compliance with the License. * Obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * unless required by appli Cable law or agreed into writing, software * Distributed under the License is distributed on a "as is" BASIS, * without Warranties or CONDITIONS of any KIND, either express OR Implied. * See the License for the specific language governing permissions and * Limitations under the License. */</span></span><span class="hljs-keyword"><span class="hljs-keyword"></span> package</span>android.app;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.content.Intent;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.Handler;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.HandlerThread;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.IBinder;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.Looper;<span class="hljs-keyword"><span class="hljs-keyword">Import</span></span>android.os.Message;<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">Abstract</span></span> <span class="hljs-class"><span class="hljs-class"> <span class="hljs-keyword">class</span> <span class="hljs-title">intentservice</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Service</span> {</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">volatile</span></span>Looper mservicelooper;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">volatile</span></span>Servicehandler mservicehandler;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span>String mname;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Boolean</span></span>mredelivery;<span class="hljs-keyword"><span class="hljs-keyword">Private</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Final</span></span> <span class="hljs-class"><span class="hljs-class"> <span class="hljs-keyword">class</span> <span class="hljs-title">servicehandler</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Handler</span> {</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-title"><span class="hljs-title">Servicehandler</span></span>(Looper Looper) {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>(looper); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">Handlemessage</span></span>(Message Msg) {onhandleintent (Intent) msg.obj); Stopself (msg.arg1); } }<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-title"><span class="hljs-title">Intentservice</span></span>(String Name) {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>(); Mname = name; }<span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">Setintentredelivery</span></span>(<span class="hljs-keyword"><span class="hljs-keyword">Boolean</span></span>Enabled) {mredelivery = enabled; }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">onCreate</span></span>() {<span class="hljs-keyword"><span class="hljs-keyword">Super</span></span>. onCreate (); Handlerthread thread =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Handlerthread (<span class="hljs-string"><span class="hljs-string">"intentservice["</span></span>+ Mname +<span class="hljs-string"><span class="hljs-string">"]"</span></span>); Thread.Start (); Mservicelooper = Thread.getlooper (); Mservicehandler =<span class="hljs-keyword"><span class="hljs-keyword">New</span></span>Servicehandler (mservicelooper); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">OnStart</span></span>(Intent Intent,<span class="hljs-keyword"><span class="hljs-keyword">int</span></span>Startid) {Message msg = Mservicehandler.obtainmessage (); MSG.ARG1 = startid; Msg.obj = intent; Mservicehandler.sendmessage (msg); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">int</span></span> <span class="hljs-title"><span class="hljs-title">Onstartcommand</span></span>(Intent Intent,<span class="hljs-keyword"><span class="hljs-keyword">int</span></span>Flags<span class="hljs-keyword"><span class="hljs-keyword">int</span></span>Startid) {onStart (intent, startid);<span class="hljs-keyword"><span class="hljs-keyword">return</span></span>mredelivery? start_redeliver_intent:start_not_sticky; }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">OnDestroy</span></span>() {mservicelooper.quit (); }<span class="hljs-annotation"><span class="hljs-annotation">@Override</span></span> <span class="hljs-keyword"><span class="hljs-keyword"></span> public</span>IBinder<span class="hljs-title"><span class="hljs-title">Onbind</span></span>(Intent Intent) {<span class="hljs-keyword"><span class="hljs-keyword">return</span></span> <span class="hljs-keyword"><span class="hljs-keyword">NULL</span></span>; }<span class="hljs-keyword"><span class="hljs-keyword">protected</span></span> <span class="hljs-keyword"><span class="hljs-keyword">Abstract</span></span> <span class="hljs-keyword"><span class="hljs-keyword">void</span></span> <span class="hljs-title"><span class="hljs-title">onhandleintent</span></span>(Intent Intent);}</code></pre><p><p>You can see that it initializes a handlerthread in the oncreate, about the use of Handlerthread and the source Code.<br>Analysis Reference: Android Handlerthread fully parse, see this estimate has been able to guess its logic:</p></p><p><p>Is that every time you call onstartcommand, a message is sent through Mservicehandler that contains our Intent. Then go back to Onhandleintent (intent) in the handlemessage of the mservicehandler;</p></p><p><p>Then we specifically look at the source code, sure enough, Onstartcommand callback in the Onstart,onstart in the Mservicehandler to send messages to the handler Handlemessage. The last Handlemessage callback Onhandleintent (intent).</p></p><p><p>Note: call Stopself (msg.arg1) back when the callback is complete, and note that this msg.arg1 is an int value, which is the equivalent of a Request's unique Identity. Each time a request is sent, a unique identity is generated, and then the request is placed in the queue when all execution is complete (the Last request is the equivalent of Getlaststartid = = startid), or the currently sent identity is the one recently issued (getlaststartid = = startid), Our service will be Destroyed.</p></p><p><p>If 1 is passed in, it is destroyed directly.</p></p><p><p>then, when the task finishes destroying the service callback ondestory, you can see that our Looper:mServiceLooper.quit () is released in Ondestroy.</p></p><p><p>ok~ If you need to use Intentservice to do, you can use as much as possible, the design is still quite good. of course, If you need to consider concurrency and so on, you may need to expand the thread pool Yourself.</p></p><p><p>SOURCE Click to download</p></p><p><p>ok~~</p></p><p><p>Welcome to follow my Weibo http://weibo.com/u/3165018720</p></p> <blockquote> <blockquote> <p>Group No.: 463081660, Welcome into the group</p> <p>Public Number: Hongyangandroid<br>(welcome attention, The first time to push the blog post Information)<br></p> </blockquote> </blockquote> <p style="font-size:12px;"><p style="font-size:12px;">Copyright Notice: This article for Bo Master original article, without Bo Master permission not Reproduced.</p></p> <p><p>Android Intentservice fully parse when service encounters handler</p></p></span>

Contact 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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.