Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class OnClearFromRecentService extends Service {
- @Override
- public IBinder onBind(Intent intent) {
- return null;
- }
- @Override
- public int onStartCommand(Intent intent, int flags, int startId) {
- Log.i("ClearFromRecentService", "ClearFromRecentService Service Started");
- return START_NOT_STICKY;
- }
- @Override
- public void onDestroy() {
- super.onDestroy();
- Log.i("ClearFromRecentService", "ClearFromRecentService Service Destroyed");
- }
- @Override
- public void onTaskRemoved(Intent rootIntent) {
- Log.e("ClearFromRecentService", "ClearFromRecentService END");
- //Code here
- }
- }
- try {
- startService(new Intent(PSApplicationClass.this, OnClearFromRecentService.class));
- } catch (Exception e) {
- Utils.appendLog("Error trying to start OnClearFromRecentService: " + e.getMessage(), "E", Constants.OTHER);
- }
- OTHER Error trying to start OnClearFromRecentService: Not allowed to start service Intent { cmp=nl.hgrams.passenger/.services.OnClearFromRecentService }: app is in background uid UidRecord{9531e38 u10a172 RCVR idle change:uncached procs:1 seq(0,0,0)}
Add Comment
Please, Sign In to add comment