0

I have tried to search for it but couldn't find a proper solution. So Posting question here to seek help.

Our essential requirement is that child cannot uninstall the app or cannot perform a factory reset on the device without admin permission. Basically similar to the Family Link app.

We are unsure how to make this possible and looking for an expert to help us out with this.

Sanjay Kakadiya
  • 1,596
  • 1
  • 15
  • 32
  • https://developer.android.com/guide/topics/admin/device-admin – Sunny Jun 03 '22 at 09:16
  • @Sunny Device admin is deprecation. – Sanjay Kakadiya Jun 03 '22 at 11:29
  • My understanding is that you'll have to work with existing EMM providers: https://developers.google.com/android/work/requirements/fully-managed-device `4.17. Factory reset protection management` (Google or Knox) OR create your own custom ROM/phone like [Gabb Z2](https://android.stackexchange.com/q/241899/3573) – Morrison Chang Jun 03 '22 at 17:28

1 Answers1

0

Use of Device Admin have been deprecated and Android provides very limited functionality starting from Android 10. Application management permissions are part of Device Owner and Profile Owner deployment models in Android. You need to set your app as Device Owner, use below API :

For blocking Application uninstallation: https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setUninstallBlocked(android.content.ComponentName,%20java.lang.String,%20boolean)

To prevent Factory Reset : https://developer.android.com/reference/android/os/UserManager#DISALLOW_FACTORY_RESET

arjun
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32260255) – The Dreams Wind Jul 21 '22 at 11:34