First of all, you aren't supposed to call "onDestroy", but "stopSelf" instead.
Second, it's better to have a foreground service instead, to keep it staying, and to avoid the notification of the OS telling that the app has something that's drawn on top.
First of all, you aren't supposed to call "onDestroy", but "stopSelf" instead.
Second, it's better to have a foreground service instead, to keep it staying, and to avoid the notification of the OS telling that the app has something that's drawn on top.