3

I am developing an app to be installed on children's phones, and once it is installed I would like it to prevent them from being able to install certain apps, let's say from a black list (not completely disabling the play store app).

It would also be great if it blocked launching pre-installed apps from the "black-list".

I am trying to avoid creating a "kiosk mode" app.

Is this possible?

Jorge
  • 1,350
  • 2
  • 10
  • 19
  • Neither you can stop users from installing a certain app from Google Play Store nor you can prevent them from opening any app. The first part is in Google hand, but in second part, you can actually create a lock apps sort of feature by displaying a lock screen when certain app is being opened by user. – iDecode May 21 '20 at 02:45
  • Looks like you can delete packages at the very least: https://stackoverflow.com/a/21854473/5513788 and https://stackoverflow.com/a/24757278/5513788 – Code Poet May 21 '20 at 09:43
  • I am not exactly sure but you could create a custom launcher and on the click listener, you could check if the current clicked app package is from black-list – Taseer May 27 '20 at 05:49

2 Answers2

1

Your application need to have admin privileges to control such conditions.

Scroll through this link for more detailed explanation.

Go through this link for Device administration feature This is irrespective of Cross Platform apps or Native Apps.

In Flutter, even if you try creating a plugin which can communicate to native layer, still the restrictions remain the same.

Moreover this ability gives you much more access than usual applications. Which is considered as dangerous.

Few API's are deprecated considering the security aspects. Details are given below.

With the release of Android 9.0, the following policies are marked as deprecated when invoked by a device admin, but the APIs otherwise continue to function.

USES_POLICY_DISABLE_CAMERA
USES_POLICY_DISABLE_KEYGUARD_FEATURES
USES_POLICY_EXPIRE_PASSWORD
USES_POLICY_LIMIT_PASSWORD
Sreehari
  • 5,621
  • 2
  • 25
  • 59
0

You could start by using flutter_package_manager to get the details of preinstalled apps, but that won't be much help for what you want to achieve.

I think that you will need to work natively with Android, and communicate with Flutter via Method Channels.

In android you can use PackageManager which has a lot of functionalities, for instance: setApplicationEnabledSetting etc

Using PackageManager, you should be able to achieve what you want.

Code Poet
  • 6,222
  • 2
  • 29
  • 50