R
R
run1822021-12-16 21:41:24
Java
run182, 2021-12-16 21:41:24

What do you need to set the conditions for running third-party applications?

The task is a parental control application.
What methods make it possible to restrict access to the launch (use) of other applications?

- tracking switching to applications or their launch
- checking the conditions for which to allow applications to run or to prohibit

Where can I read about this or what methods should I learn?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan, 2021-12-16
Hasanly @azerphoenix

I'm certainly not an android developer, but I think you'll need a permission like "Display on top of other apps". For example, to prohibit the use of the selected application when a condition is met (limitation is triggered).
https://stackoverflow.com/questions/40355344/how-t...
To check if the selected application is running, you can use the ActivityManager
https://stackoverflow.com/questions/28652076/detec...

checking the conditions by which to allow the launch of applications or prohibit

Conditions may vary. For example, a time limit (for example, 60 minutes) or a certain time (for example, 23:00), etc.
Detect if the application is running. Then you check whether it falls under a specific condition or not. If not, then block the application (as above). If yes, then update the condition from time to time. And it will be necessary to write down the information somewhere.

O
Oleg, 2021-12-17
@402d

Go to play and watch parental controls. You choose with the worst rating. Perfect with 1 star.
Why is that. Children minus really working ones. Read the reviews yourself.
For example, the permission set for mcafee
Development tools
test access to protected storage
Your personal information
read your Web bookmarks and history, write web bookmarks and history
Your location
approximate (network-based) location, precise (GPS) location
Network communication
view network connections, view Wi -Fi connections, full network access, Google Play billing service, Google Play license check, receive data from Internet
Storage
modify or delete the contents of your USB storage
Phone calls
read phone status and identity
System tools
retrieve running apps, run at startup, draw over other apps, prevent phone from sleeping, toggle sync on and off
Extra
android.permission.ACCESS_BACKGROUND_LOCATION, android.permission.FOREGROUND_SERVICE, android.permission.QUERY_ALL_PACKAGES, android.permission.READ_APP_BADGE, android.permission.READ_PHONE_NUMBERS, com.anddoes.launcher.permission.UPDATE_COUNT, com.google.android.finsky.permission. BIND_GET_INSTALL_REFERRER_SERVICE, com.htc.launcher.permission.READ_SETTINGS, com.htc.launcher.permission.UPDATE_SHORTCUT, com.huawei.android.launcher.permission.CHANGE_BADGE, com.huawei.android.launcher.SETpermission.READ_TINGS, com.huawei. android.launcher.permission.WRITE_SETTINGS, com.majeur.launcher.permission.UPDATE_BADGE, com.mcafee.safefamily.core.permission.USAGE, Can receive cloud messages, com.oppo.launcher.permission.READ_SETTINGS, com.oppo.launcher .permission.WRITE_SETTINGS, com.sec.android.provider.badge.permission.READ, com.sec.android.provider.badge.permission.WRITE, com.sonyericsson.home.permission.BROADCAST_BADGE, com.sonymobile.home.permission.PROVIDER_INSERT_BADGE, me.everything.badger.permission.BADGE_COUNT_READ, me.everything.badger.permission.BADGE_COUNT_WRITE

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question