> I had a similar issue. What I wanted to do was to run a short service
> on boot up and initialize a few items and then stop the service. I
> understand that its not a good idea to leave the service running for
> the entire life-cycle of the phone. I was able to achieve this by
> creating a broadcast receiver and starting my service (and do some
> post delay items). I still need to figure out how to stop the service
> part. Please chime in if any one has any comments on this.

I do not know what you mean by "how to stop the service part". If a
service wants to stop itself, it can call stopSelf().

> Can any one point to another strategy for starting up my
> service after my package installation?

Let the user start it by launching your activity.

> An alternative would be to
> "force phone re-boot" after the package is installed (obviously after
> giving the choice to the user if he wants to continue or not) but I
> dont know how to force that either. Any ideas how to achieve that?

You can't reboot the phone programmatically, unless you are part of the
firmware, AFAIK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to