My requirement is same as How can an app detect that it's going to be uninstalled?
So i am implementing it in exactly same way as answer suggested in the above linked question https://stackoverflow.com/a/18816716/4070142...
I am running it on Android 4.4 (Kitkat). But i am not receiving the QUERY_PACKAGE_RESTART intent in my BroadcastReceiver. I am registering the broadcastreceiver properly in manifest file. Is it problem of android version or something else... Any help?