0

I'm looking for a solution that helps me, with performing a restart to the native app programmatically.

I'm using the android platform only

1 Answers1

1

At the end I've used android.os.Process.killProcess(android.os.Process.myPid()); inside of setTimeout witch working in most cases... and for iphone i used exit(0) or exit();

my code is looks like this:

  • performRestart() { this.showIndicator(); if (isAndroid) { setTimeout(() => { android.os.Process.killProcess(android.os.Process.myPid()); // android.foregroundActivity.finish(); this.hideIndicator(); }, 5000); } else { setTimeout(() => { exit(0); this.hideIndicator(); }, 5000); } } – jawdat abdallh Dec 23 '20 at 09:41