I would like my app to wake up after it has been updated using the market (play store).
How can I accomplish that?
By waking up, I mean the Application.onCreate() to be executed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Commonsware mentions, the ACTION_PACKAGE_REPLACED does the trick. You just need to compare your package name with the data for the intent, otherwise you catch all packages being replaced.
In newer API’s (12 on up) there is the ACTION_MY_PACKAGE_REPLACED which is only sent to the application that was replaced.