Fix application close (suggest to kill background service on close)

This commit is contained in:
Victor Shcherb 2012-11-11 20:55:59 +01:00
parent 9a7d006fc2
commit 4d653825d6

View file

@ -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);