Hello is it possible to know if the user tries to uninstall an application and ask for password in order to continue? I have a security application and I would like to ask the user to authenticate before uninstalling the application is it possible and how?
Hello is it possible to know if the user tries to uninstall an application and ask for password in order to continue?
No, sorry. Applications do not get control when they get uninstalled.
Yes. It is possible. I do not know HOW but some security applications like AndroidLost, SeekDroid and so on do that. (I'm not sure now which one exactly do that, but I'm sure it does). Try to decompile some of these applications (if I was you I'd do that).
I guess they ask for Administration permission in your mobile and intercept the unnistall. Obviously if you remove the app from the Administration apps list, it does not work anymore.
Related
I'm using in my app Device Admin API but it requires actions from user to enable it - I was wondering that is it somehow install app and automatically enable admin on it without asking user?
Does anyone tried to do something like this
Enable Device Admin without asking user
Not a good idea. If that would allowed by android then anyone can play with users and user's data. Android not allowed , not allowing and will not allow this thing in future. You better stop wondering ;)
This is not possible because of OS security
This isn't possible, the device admin provides certain rights to the device for an app, that a standard app does not have. It would be a huge security risk if the user installed an app and it automatically set itself as a device admin without the users consent or knowledge.
There is no way to enable or disable Device Admin without asking the user for security purposes.
OK after long time I have to say that it's impossible to do it without OS moddification. Even I have tried to use Android hidden API by reflection but then looks that you need some system permission.
Use dpm set-active-admin, if you have root or system/signature privileges.
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.
How can I skip the "are you sure" dialog while uninstalling an android app from another app?
I guess that is not possible due to android security policy. And that policies have reasons to be there.
Otherwise every app would be able to uninstall another one causing troubles to the users if that operation is performed by a rogue app.
You have no control over other apps as far as install/uninstall, basic Android security.
The best you can do is have your app check for the existence of the app you are concerned about your students using and not letting your app run if it is present.
Then it is up to the student. They have the choice to uninstall said app to allow yours to run, or not run your app.
I'm developing an application for parents to watch out for their children. So this application cannot be removed by the child. I need to know how to make it uninstallable or the user need password to remove that application.
Ankur,
I think the closest thing to what your looking for is the Device Administration feature introduced in 2.2.
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.
While the Device Admin API doesn't allow for password protection of this particular feature, you can password protect your application to prevent someone from tampering with the Device Admin features in the app.
I use an app called SeekDroid that has a similar functionality.
I've only seen one app that does this, its called Prey and is used to track lost phones and computers. The project is open source so you could go through their code and see how they do it or contact the developer and maybe they'll tell you how they do it.
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.