Search code examples
androidandroid-4.0-ice-cream-sandwich

Service stops by install other applications


I develop a mobile device manager with a service in it. I've got a strange problem under Android 4.0.3, if I install another application, my service stops.

I got no errors, I just see it when I want to open my application again. I do some searches before, but found nothing about that.

Does anyone know where does it come form, or maybe got the same problem?


Solution

  • I found a solution to fix it for my case.

    I start my Service with

    public int onStartCommand(Intent intent, int flags, int startId) {
                //some code
        return START_STICKY;
    }
    

    The Service still crashs but this allows it to start again.