how to prevent service to run again if already running android
A service will only run once, so you can call startService(Intent) multiple times. You will receive an onStartCommand() in the service. So keep that in mind. Source: Note that multiple calls to Context.startService() do not nest (though they do result in multiple corresponding calls to onStartCommand()), so no matter how many times it is started … Read more