Closed FokkeZB closed 10 years ago
See my comment here: https://github.com/dbankier/TiShadow/issues/373#issuecomment-62973184
@FokkeZB usually you don't have numbers as nulls....since it is optional it is provide as a string.
It uses the standard alarm function, so feel free to debug.
@benbahrenburg So the method (only) takes a string like this?
platform.restartApp('0');
Also, relating to our use case for https://github.com/dbankier/TiShadow/issues/373#issuecomment-62973184 - any thoughts on the best way to have TiShadow restart an app asap?
@FokkeZB is it the exit part of the restart part you are having issues with? @dbankier seemed to indicate everything is working as expected.
@benbahrenburg, this issue is that android.os.Process.killProcess(android.os.Process.myPid());
which is basically your exitApp()
, the OS interprets as a crash and restart the app immediately.
i.e.:
exitApp()
doesn't exit, it restarts.restartApp()
restarts the app twice.Have you tried just calling finish(); ?
finish()
?
The finish() method was mentioned in a post on SO. At the moment I'm not near a computer with the mobile stack installed. Will be able to try something different alittle later this week.
I see
restartApp()
has an argument for a day that default to 15000ms: https://github.com/benbahrenburg/benCoding.Android.Tools/blob/master/src/bencoding/android/tools/PlatformProxy.java#L68-L75Why is this a string? And why - if the default is 15000ms - do I see the app restarting almost instantly?