El servicio fijo no se reinicia cuando se crea en un objeto personalizado

Tenía un objeto Singleton que tenía un servicio vinculado. Quería que se reiniciara, y cuando inicio mi aplicación desde el iniciador, el objeto singleton se inicializará y se vinculará a esta instancia de servicio existente.

Aquí está el código para crear y enlazar servicios en singleton:

public class MyState {

    private static MyState sState;

    private MyService mService;
    private Context mContext;
    private boolean mBound = false;


    private ServiceConnection mConnection = new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            MyService.MyBinder binder = (MyService.MyBinder) service;
            mService = binder.getService();
            mBound = true;
        }

        @Override
        public void onServiceDisconnected(ComponentName name) {
            mBound = false;
        }
    };

    public static MyState get(Context context) {
        if (sState == null) {
            sState = new MyState(context);
        }
        return sState;
    }

    public MyState(Context context) {
        mContext = context.getApplicationContext();
        startService();
    }

    private void startService() {
        Intent intent = new Intent(mContext, MyService.class);
        mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
        // this won't create another instance of service, but will call onStartCommand
        mContext.startService(intent);
    }
}

Y aquí está el código insice Servicio

public class MyService extends Service {

    private final IBinder mBinder = new MyBinder();

    public class MyBinder extends Binder {
        MyService getService() {
            return MyService.this;
        }
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        return START_STICKY;
    }

    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }

    // this method is called by singleton object to stop service manually by user                                                                                                              
    public void stop() {
        stopSelf();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        // some cleanup code here                                                                                                                                                              
    }
}

Desafortunadamente, cuando deslizo mi aplicación en la lista de tareas, este servicio nunca se reinicia. El método onDestroy del servicio nunca se llama en este caso.

Moví el enlace a una actividad en la que el usuario puede interactuar con el servicio, y sorprendentemente comenzó a funcionar como esperaba. Traté de llamar a la creación de servicios utilizando el contexto de la aplicación dentro de mi actividad, y todavía funciona.

¿Iniciar el servicio desde la actividad es diferente de iniciarlo desde un objeto Java normal?

Respuestas a la pregunta(1)

Su respuesta a la pregunta