I want to check if service is running or not after the application is force closed by user. How can I do this. I am doin this in onReceive of broadcastReceiver. But even after force closing it shows service running Toast.
boolean isServiceRunning = AppSettings.getServiceRunning(context);
if (isServiceRunning)
{
Toast.makeText(context,"service running", Toast.LENGTH_LONG).show();
}
else
{
Toast.makeText(context,"service stopped", Toast.LENGTH_LONG).show();
}