How can I check when I start my app whether a runnable from a previously started app instance is running in the background? The runnable is there to send notifications at regular intervals. I tried it with shared preferences. The start can be very well documented, but if the app is abruptly closed, there is no corresponding feedback in the shared preferences. How can I find out securely whether the runnable was only launched once or whether the system terminated it? Only turning on is consistently perceptible when preferences are shared. The issue is that the executable shouldn't run more than once concurrently.
Although I tried sharing preferences, it's not very dependable.