Skip to content

Commit a95b505

Browse files
authored
fix(android): properly force quit the application (#57)
1 parent b1dc525 commit a95b505

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/stop-process.android.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import { Application } from '@nativescript/core';
2+
13
export function killProcess() {
4+
if(android.os.Build.VERSION.SDK_INT >= 21) {
5+
Application.android.startActivity?.finishAndRemoveTask();
6+
} else {
7+
Application.android.startActivity?.finishAffinity();
8+
}
29
java.lang.System.exit(0);
310
}

0 commit comments

Comments
 (0)