Prevent unauthorized person from uninstalling my android app - android

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.

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.

Is there a way to prevent a user to uninstall an app?

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.

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.

Password Protected at Un installation time

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.

Android Security Application

Is it possible to make the application password protected in Android mobile? ie; if a user tries to install an unauthorized application, we shud prevent that. for tht we will have to make some applications password protected. like "LockMe" in symbian.
you can either develop your own system if you have your own database you contact it and check.
I'm not sure you can prevent somebody from pushing an app to their phone but you can look into
preparing app
there are some option like licensing in the android market

Categories

Resources