Android Question how do I reset(restart) a app using a button?

John Woodsmall

Active Member
Licensed User
Longtime User
I would like to put a button on the screen that resets or restarts an app?
How do I do this?
thanks
 

John Woodsmall

Active Member
Licensed User
Longtime User
Thanks for this...but It does not tell me how to "Restart" an app. I need to have
a button that allows me to reset the variables to their orginal values and begin
the app again.
any thought on this?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Just build a button and a button_click and in this sub you reset al variables to their default. Where is the problem? You don not neet to quit and restart it
 
Upvote 0

John Woodsmall

Active Member
Licensed User
Longtime User
There are a number of things that have to happen when it starts for the 1st time
can I just put those in the button as well?
Things like

VR
.Initialize("VR") and TTS1.Initialize("TTS1")

or not...
?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
In the thread posted above you can find possible solutions i think.

The point is that you want to restart at your Mainactivity. So i suggest you do a start_activity(Main) or such? Then the mainactivity is initialized, created; You have the code there which do all that for you. Is it not enough to start your main again?
 
Upvote 0
Top