I am developing an Android application that has a background launch of a service.
When I replace the application from the "Recent Application List", this will disable the application and terminate the service. (The following method has code for the same.)
@Override
public void onTaskRemoved(Intent rootIntent)
{
super.onTaskRemoved(rootIntent);
}
The service start code is in the Application class (onCreate ()), it will never be executed if the application resumes.
Positive scenario
1) If I restarted the application after the service was successfully completed, a new instance of the application will be and the service will also start.
Negative scenario
1) , , , ( ). , , , .
, , .
, , .
?
1) .
2) .
.