I'm experimenting with ACTION_PACKAGE_REPLACED.
From my research it looks like it is called on the newly installed package after the previous one has been stopped, but the documentation for this is not clear (to me) and I read that PACKAGE_REPLACED is called on the package being replaced (the old one).
What I've tried:
- old package WITHOUT receiver for ACTION_PACKAGE_REPLACED, new package WITH receiver for ACTION_PACKAGE_REPLACED: the action PACKAGE_REPLACED is broadcasted to the new package as soon as the replace terminates
- old package WITH receiver for ACTION_PACKAGE_REPLACED, new package WITHOUT receiver for ACTION_PACKAGE_REPLACED: the action PACKAGE_REPLACED IS NOT broadcasted to any package
I'm testing by manually launching the APK packages with different versions of the app on Android 4.1
My question is: is this specific to Android 4.1 or is this the intended behaviour? Should I expect a different behavior from the automatic update in Google Play?