android IntentService生命周期问题

假设须要在onHandleIntent之前运行一些操作。比方须要停止当前正在运行的任务。可在onStart做这个操作。

须要注意的是必须在onStart函数的最后(运行完我的操作后)调用super.onStart(intent, startId),由于调用super.onStart后就会開始运行onHandleIntent。

原文地址:https://www.cnblogs.com/claireyuancy/p/6789097.html