Skip to content

Commit

Permalink
service stuck on swipe away fix (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriscsd authored and katzer committed Jan 9, 2018
1 parent 7285bec commit a2352f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/android/BackgroundMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public void onResume(boolean multitasking) {
public void onDestroy() {
stopService();
super.onDestroy();
android.os.Process.killProcess(android.os.Process.myPid());
}

/**
Expand Down

2 comments on commit a2352f5

@ruben82
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using Nexus 5x, and if I use this snippet, a message is thrown: "app close unexpectedly".

@shaolonger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not kill process here, otherwise the app will be killed when using cordova-plugin-inappbrowser plugin in order to open another website.

Please sign in to comment.