I'm making an android anti-thief app. I want to prevent a thief to uninstall the anti-thief app.
The app is a device administrator. So I used DeviceAdminReceiver.onDisabled
to start a “always on top” password prompt Activity (the password is setup by the user during the app configuration). This works fine.
But, Google Play rejected the app. Email extract:
Read through the Device and Network Abuse policy and make the
appropriate changes to your app. You’ll need to remove any
functionality that prevents a user from removing or uninstalling the
app from their device.
My Question:
What other ways can I use to prevent unauthorized user to:
uninstall my device administrator app ?
disable the device administrator permission ?
Thanks
EDIT: reformulate the question to clarify that the question is not about google play policy, but about alternative implementation.
Related
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.
I am working on anti theft Application.I want only authorized users to uninstall my app.Like, when they try to uninstall my app they must enter a valid password and proceed.I dont wanna block uninstallation of other apps that user have installed..is there a specific way to do that..?
If you're on an un-rooted device without a custom version of Android the only way that could be possible is making your app a device-admin app:
To uninstall an existing device admin application, users need to first unregister the application as an administrator.
You wanna protect apps from unauthorised access right? First, you need to download APPLOCK from play store. Setup the applock app after you download it by registering it with your email and create a pin password, then on the app you can lock the apps you want to lock. The applock app will b useless as at this point because any smart person can simply just uninstall the applock app and then all the locks you put on your apps will disappear with the applick app thereby rendering complete unauthorised access to all your apps.
What you to do then is to go to your phone's administrative setting and make the applock app an administrator.
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.
From what I read on SO, it seems that I want the impossible (?)
I have a kiosk-like app that is supposed to run 24/24, 7/7, 365/365. This makes it hard/impossible to update the app. As far as I know, Google Play will not start the update (even if Autoupdate is set for my app) while my app is running.
I read across SO and several forums an found a lot of NO's and CON's. My current answer is that is not possible without rooting the device or without some system certificates and so on.
But still, I have the following scenario:
I created a google account myGoogleAccount#gmail.com
On my device I add this account and install my application from Google Play store.
On my desktop machine I log into GPlay with the same account and I go to my application and I see that my app is Installed. If I click on the Installed button I can see my device.
I publish a new version of the app, when the app becomes available, from my application's page open on desktop I can send a command to update the app.
I get the prompt to accept the terms bla-bla, and once I accept it, the app is automatically updated even if it is currently running.
Basically this is the behavior I am interested in. My question is: can I run this scenario from my device [invoking some GPlay api's] given the fact that I can provide the google account credentials to the app, so that no user intervention is required to update the app and to accept whatever unchanged permissions?
I am trying make security app for keeping tracking your lost phone.I made app as device admin app so it can't uninstall directly but using unregister app to device admin we can un- installed it.so i wants make password protected app at un-installation time.when user try to un-install the app one dialog box appear to ask password.i know some apps do that functionality.can anyone knows about it?
You can't do this on a stock device. If you want to prevent people from uninstalling your app you have to make it a system app (part of the ROM). Even so, on recent Android versions users can choose to disable it. On Android 4.3 you have the option of marking the device admin (system app) as a 'device owner' so that users cannot deactivate it. This is obviously not available on earlier versions.