Background Services not work while application remove from task manager?

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Aug 6, 2016, 2:38:48 PM via Website

I used service in the application for make application continuously active at the background. It works all the version of android except in lollipop. Please help me for this. I used Alarm service for this. Please help
me for the lollipop device. In the menifest i used following
android:exported="false" >

This is the Service.

public class MyTestService extends IntentService {

public MyTestService() {

protected void onHandleIntent(Intent intent) {
    // Do the task here
    Log.i("MyTestService", "Service running");

   // Toast.makeText(getApplicationContext(),"Start background",Toast.LENGTH_LONG).show();

public int onStartCommand(Intent intent, int flags, int startId) {

    return START_STICKY;


public IBinder onBind(Intent intent) {
    return super.onBind(intent);

public void onDestroy() {
    Log.i("MyTestService", "Service Destroy");


Recommended by NextPit