Relaunch app on Restart?

How can I emulate on Android what “UIApplicationExitsOnSuspend = true” does on iOS?

I’m using a WebView and want it to refresh on every start of the app, but right now my app just goes back to how I closed it. Thanks! [import]uid: 10284 topic_id: 35048 reply_id: 335048[/import]

What you need to do is request the Android activity to exit when the app is being suspended. That will force it to exit.
[lua]local function onSystemEvent(event)
if event.type == “applicationSuspend” then
native.requestExit()
end
end
Runtime:addEventListener(“system”, onSystemEvent)[/lua]

Documentation for the above can be found here…
http://docs.coronalabs.com/api/library/native/requestExit.html
http://docs.coronalabs.com/api/event/system/type.html

Please note that the [lua]native.requestExit()[/lua] function only works on Android. It does nothing on iOS or in the Corona Simulator, regardless if you’re simulating an Android device.
[import]uid: 32256 topic_id: 35048 reply_id: 139370[/import]

Thanks so much!! [import]uid: 10284 topic_id: 35048 reply_id: 139374[/import]

What you need to do is request the Android activity to exit when the app is being suspended. That will force it to exit.
[lua]local function onSystemEvent(event)
if event.type == “applicationSuspend” then
native.requestExit()
end
end
Runtime:addEventListener(“system”, onSystemEvent)[/lua]

Documentation for the above can be found here…
http://docs.coronalabs.com/api/library/native/requestExit.html
http://docs.coronalabs.com/api/event/system/type.html

Please note that the [lua]native.requestExit()[/lua] function only works on Android. It does nothing on iOS or in the Corona Simulator, regardless if you’re simulating an Android device.
[import]uid: 32256 topic_id: 35048 reply_id: 139370[/import]

Thanks so much!! [import]uid: 10284 topic_id: 35048 reply_id: 139374[/import]