The service doesn't stop until all activities connected to it have exitted.
Each time the application is openned using the notification icon, a new activity is started. If the service is stopped (using the buttons that come up after pressing the menu button), the service doesn't stop immediately. Instead it keeps on running, until all the activities have been closed (aren't being displayed anymore).
Two solutions exist:
- Either, redesign the service so that it stops and destroy itself when prompted to be stopped.
- Or simply, when the application is started using the notification icon or any other means, don't start a new instance of the activity. Instead bring the previous instance up for display.
The service doesn't stop until all activities connected to it have exitted.
Each time the application is openned using the notification icon, a new activity is started. If the service is stopped (using the buttons that come up after pressing the menu button), the service doesn't stop immediately. Instead it keeps on running, until all the activities have been closed (aren't being displayed anymore).
Two solutions exist: