Start service at boot and after app has been installed
I know you can start a service on Boot,开发者_开发问答 but how do I start the service after the app has been installed or reinstalled?
I would like to start the service once the app is put on device by Debug/Run of Eclipse.
but how do I start the service after the app has been installed or reinstalled?
You do not get control after an install, so you have to start the service through your activity or something.
There's an ACTION_PACKAGE_REPLACED
broadcast Intent
you can monitor for the reinstall scenario, though I have not tried it.
精彩评论