Kill and restart app using service

sangee

Member
Licensed User
Longtime User
Hi,

I am making a app which is going to work on its own with out user intervention to capture and transmit images. Basically like a remote webcam/security cam.

I have managed to do the app which does capture and upload it to the website using PHP via GPRS internet.

The problem starts when I dont get a update from the device due to some error in GPRS signal not available etc.

I am planning to create a service module in the same application which will be registered to autostart when the phone reboots. This service app will listen to incoming SMS data. If the SMS text contains "RESAPP" then I would want to service module to kill the foreground app and start the app again.

Can some one help me in letting me know how a application can be killed and restarted from a service module. Need help please..

I am following Erel's post on making a SMS interceptor. I have not succeeded yet on this but i will eventually.

Ps: Near NewBie and this is the second project on this :sign0104:

Thanks,
Sangee
 

mc73

Well-Known Member
Licensed User
Longtime User
A simple way I can think of, Is calling a sub at your main activity where you'll use activity.finish. Then set a timer and after a few seconds, call startactivity. Guess it may work.
 
Upvote 0
Top