Notify when Application uninstall from Android Device - android

I want to create an Application such that if it is uninstalled by user then I want to stop uninstallation of Application.
How I can do this ?
Thanks

You can't. There is no such event in Android. Also you can't stop uninstallation of your or any other app. For this you'll need some permissions that are only granted to system applications.

why? why? why? As a user, if I want to uninstall an app, then I no longer want it, and it should be uninstalled if I am uninstalling it. It should also not be reinstalled unless I exclusively do so.
But there are some applications which we cannot uninstall unless we have a rooted device. Those are the apps like market, Google maps, camera etc which are installed by the manufacturers. You would want to create an app which is so good and useful and then convince the manufacturers or service providers to preinstall the app and prevent the users from uninstalling it. Examples : Swype, Skype, Facebook, Twitter etc
But if the app is a normal app then I would recommend against such a thing.
For your question, you cannot do so unless you are the manufacturer.

Related

How to uninstall app which is set by password?

I developed one parent and child communication Android application in which I wanted to restrict the child from uninstalling application. I have one solution that uses DevicePolicyManager. But still the application can be uninstalled without asking for password. If I remove the Device Administrator permission from the settings, then application is uninstalled from device?
Can anyone provide the valid solution for this cause?
You cannot prevent a user from uninstalling an app, from within the app code itself.
There is suggestions here How to prevent an application from being uninstalled?, but they are not foolproof.
The way around this is to use an android device with lollipop and upwards, so you can create a user account.
On the admin account, install an app that requires a password to uninstall apps. They are on the market (and free) I've used them. Or write one yourself.
Then on the child's account allow them whatever privileges you want them to have. They will be unable to touch the apps and uninstall them, unless on the admin account and with the password required for that app to uninstall other apps.
I have tried and tested this and it works.

How do i prevent my app from uninstalling?

I am working on a security app. everything is fine, except there is a backdoor. the security can be easily removed by just uninstalling the app. is there a way i can protect my app from getting uninstalled by intruders? i'm sure this is possible as i have seen apps on google play store which cannot be uninstalled from settings.
Please refer Device Administrator
Once the application is registered as a Device Administrator, it can't be uninstalled unless its unregistered. This will prevent the app from being uninstalled.
For example this application is using same functionality.
Make sure if you install above application(SeekDroid) you must sign up then it will ask for device admin permission. :)

Android permissions not requested after reinstall

I am testing my Android app on my own phone. When I first run it on my phone, it asks for permission to user my gmail account. When I reinstall my app, it no longer does that? I would like to make it so that it re-requests permission every time I reinstall the app for testing purposes. If, on the other hand, I change the package name, it re-requests the permission. Does anyone know how to do that? Much help would be appreciated!
Thanks!
Note: By reinstall, I mean both pressing the run button and actually resinstalling the application by first uninstalling via settings.
This is not an actual Android permission, it's actually an account access grant specific to AccountManager. Technically, when you uninstall an app all grants should be cleared, but this appears broken on some devices. If you have a rooted device or are using the emulator, you can find accounts.db (usually in /data/system/users/0/accounts.db on newer versions) and clear the grants and extras tables (that could affect other apps, so handle with care). If you don't, clearing the data for Google Account Manager and Google Play Services could help.
What do you mean by reinstall? Does reinstall simply meaning pressing the "run" button? Or are you actually uninstalling and reinstalling the application. Once the Android OS detects that a permission is needed, it will request it from the user. But after that first time, it won't ask again. If you completely uninstall the application from the device and then reinstall, it should work. I don't know of any other way you can bypass that.

Make android app non erasable

Is is possible to make an android app non deletable.. What i mean is, I want to install a app, but I cant remove/ uninstall it. If I want to uninstall it then it should prompt me for password which I would have set during installation of the app.
When I read the docs they tell it can be done using Device Admin, but it doesnt provide security, interms of it doesn't ask the user for the password and deletes if its correct..
Is it possible to make an app such that even if there is a factory reset the app will still be there on the phone ?
Is is possible to make an android app non deletable
No, unless you want to create your own ROM and preload it with your app, just like some manufactures preload their devices with their own software and other bloatware.
No it is possible to restrict any user to delete the app from android device.
As google already maintaining this scenario by using the concept known as Device Management System.
Google Eyeing on apps which are published by the developer / installed or deleted by the user.
Although you can make your own app which will notify your admin that user is trying to delete the app or deleted the app, using Service Intent concept.

Silent Uninstallation

I am working for manufacture of cell phones. we develop for the Android platform, therefore we can sign our applications and have system permissions, for example we can use
the packagemanager.installPackage(|..) method, which gives us the ability to install APK's without the user involvement.
I would like to know, if any one you know about an Un-instantiation method which would uninstall apk's silently without user-involvement?
thanks,
ray.
There is functionality in there some where to do this - Google uses remote kill switch to uninstall Android apps, but I haven't seen any details on where you would find this. But as a user I would be very unhappy with a handset which silently removed apps without telling me - even if the app was a security threat, if I had installed it, I would want to be told it was being removed.

Categories

Resources