WE have Android application in the play store, we would like to send communication to all uninstalled app users, is there any way we come to know who are the users who have uninstalled. kindly help
ACTION_PACKAGE_REMOVED is the Broadcast Auction that informs removal of application but you can't receive it on that Application which is removed. Yes if you have other application of you on same device, you can do whatever you want "Like sending that event to server" on removal of any application package!
Broadcast Action: An existing application package has been removed
from the device. The data contains the name of the package. The
package that is being removed does not receive this Intent.
There is an other way that give functionality of uninstall in your application and track the event. App can be uninstall this way!
//Uninstall event you can send to server before start activity
Intent intent = new Intent(Intent.ACTION_DELETE, Uri.fromParts("package",
getPackageManager().getPackageArchiveInfo(apkUri.getPath(), 0).packageName,null));
startActivity(intent);
There is another way that is get root Access in your Application for that purpose this link may help you after becoming the SU you can do lot of things that you cant do normally!
Related
I want to trigger the logout process for the user in case the user uninstalls my app.
This way I want to ensure that I reach the user via other means like SMS / email instead of sending app Notification.
Is it possible to run some code just before uninstallation of my Android App ?
Is it possible to run some code just before uninstallation of my Android App?
No. You can get the broadcast for any other package getting uninstalled but never for your own package.
But you can observe other packages being removed by registering for this event.
android.intent.action.PACKAGE_REMOVED
I want to register gcm_id imidiatly after app was install or updated (as gcm_id may change over application or android id) to be able to send user news asap.
I can listen for broadcast android.intent.action.MY_PACKAGE_REPLACED if my package is updated. However broadcast for android.intent.action.PACKAGE_INSTALL is deprecated and does not seems to work (have not seen logs with such intent) and broadcast for android.intent.action.PACKAGE_ADDED is never send to newly installed application as stated in docs.
Is there a work around to listen, when my app is installed?
Is there a work around to listen, when my app is installed?
No. Nothing of your app will get control until the user clicks on the launcher icon for one of your activities, or until something else uses an explicit Intent to start up one of your components.
Please register for GCM on the first run of your app.
I'm using the Android notification system.
This system save an id for all devices for which notification will be sent.
When any user uninstall the APP and the attempts to send one notification throws an error.
Can I code any method when the user unistall the app? Android has a method that runs on the app when it is uninstalled?
No. your app will not get any notification while being uninstalled. There's ACTION_PACKAGE_REMOVED broadcast, but your app will not get it as it is being broadcasted once the package is removed, so your app is already gone at that time. Docs read (here):
Broadcast Action: An existing application package has been removed
from the device. The data contains the name of the package. The
package that is being installed does not receive this Intent.
There is no way for an app to tell if it has been uninstalled or to receive notification of it's pending uninstallation.
When an application is removed, the ACTION_PACKAGE_REMOVED intent will be sent out to all receivers except for your own. Read the docs for more.
There is no callback that you will get when your app get uninstalled.
while an app is uninstalled ACTION_PACKAGE_REMOVED intent will be sent to all receivers except the currently uninstalled app so by another app you can know that.
Your code is inside your app, not outside to send any notification at a time of uninstalling it.
Outsider coding is done by Android OS so leave it to him.
I am working on an app in which i need to log, if user uninstalls the app. So i am following this approach How can an app detect that it's going to be uninstalled?
But i am facing the same problem as in this post
Can't get receiver when the app uninstall. As my phone is Android 4.4... Can anybody post the exact solution (code) to solve this problem???
Edit: During uninstallation QUERY_PACKAGE_RESTART intent should be broadcasted but i am not recieving it. I declared it in manifest as well i created a broadcastreceiver which is listening for this intent... I did it exactly same way as Can't get receiver when the app uninstall. I am not receiving the intent. What to do?
folks,
i have one security application in which i want the notification where package is
uninstalled by user perform some action on that event
please give me some solution
Thanks
If you want to monitor application installations or uninstallations, you may want to register a BroadcastReceiver that listens for the actions Intent.ACTION_PACKAGE_REMOVED, Intent.ACTION_PACKAGE_ADDED and so on (see the full list in the Intent class documentation under "Standard Broadcast Actions"). You'll get supplied with the packagename of the app that was uninstalled in the intents data.
If you want to perform an action when your own app gets uninstalled: Thats not possible at the moment.