Fix application close (suggest to kill background service on close)
This commit is contained in:
parent
9a7d006fc2
commit
4d653825d6
1 changed files with 4 additions and 0 deletions
|
@ -381,6 +381,10 @@ public class OsmandApplication extends Application {
|
|||
manager.close();
|
||||
}
|
||||
applicationInitializing = false;
|
||||
if(getNavigationService() != null) {
|
||||
final Intent serviceIntent = new Intent(this, NavigationService.class);
|
||||
stopService(serviceIntent);
|
||||
}
|
||||
// http://stackoverflow.com/questions/2092951/how-to-close-android-application
|
||||
System.runFinalizersOnExit(true);
|
||||
System.exit(0);
|
||||
|
|
Loading…
Reference in a new issue