How to restart app?

GaNdAlF89

Active Member
Licensed User
Longtime User
I want to restart my app pressing a button. How can I do this?
Can you post an example code?
 

mc73

Well-Known Member
Licensed User
Longtime User
One way I can think of, is to start a service module before your activity.finish command. Then, use a timer in your service module, in which you can start again your app.
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Using a service module with a timer/Activity.Finish will not restart the app. It will only restart the activity.

Can you tell us more about the behaviour of your app?
Maybe it is possible to trigger on some phone intents?
Or you can set up your service to start later with StartServiceAt(later) and then use ExitApplication.
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Please help. I have used a combination of Simple_Alarm and WheelView to create an alarm clock. It works perfectly but once I have scheduled the alarm and "closed" the app I want the app to come "alive" when alarm starts sounding so that I can shut the alarm or select for eg "snooze" that will silent the alam for 5 or 10 or 15 minutes (user selecteable) i.e I want to be able to interface/interact with the app. How do I make the app come "alive" again so that I can interface/interact with it?
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
I am starting the alarm service by making use of StartServiceAt. I need to "kick start" the app to come "alive" so that I can interface/interact with it once the alarm triggered. I am a bit lost in the "kick start" process that should be followed.
 
Upvote 0
Top