我继承了一个IntentService,所以我必须要温柔.当我覆盖onStartCommand()时,它对我有用
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
return START_STICKY;
}
Run Code Online (Sandbox Code Playgroud)
也就是说,让父母做它应该做的事情并返回START_STICKY.
| 归档时间: |
|
| 查看次数: |
14342 次 |
| 最近记录: |