D
D
dali2013-06-27 06:57:27
Android
dali, 2013-06-27 06:57:27

How to make a restriction so that the user can use only one program? [Android]?

Greetings, habrasobshchestvo!
Tell me how to solve the following problem:
Ideally, the user could run only one program on the device.
Or close access to the Internet to everyone except this program, and remove all entertainment, and prohibit them from being installed.
Or give limited rights to the account and let it be used only.
In general, that the device is used only to work with this one single program.
I hope that someone has already encountered a similar issue and knows how to solve it =)

Answer the question

In order to leave comments, you need to log in

8 answer(s)
I
Ivan Arxont, 2013-06-27
@arxont

To the user the limited uchetka on most I can not. Also, if it's in Windows, I advise you to start by replacing the shell with explorer in the registry with the desired program and the task manager block (via gpedit).

A
anitspam, 2013-06-27
@anitspam

I use this play.google.com/store/apps/details?id=com.whisperarts.kidsshell&feature=search_result
you can search for something with similar functionality

V
vaail, 2013-06-27
@vaail

Something like play.google.com/store/apps/details?id=com.whisperarts.kidsshell&feature=search_result and for internet chop play.google.com/store/apps/details?id=com.googlecode.droidwall.free&feature =search_result or similar.

F
freeek, 2013-06-27
@freeek

Is custom firmware not an option?

R
recompileme, 2013-06-28
@recompileme

OU! I wrote such utility. hang the service on the onbootloader and check the timer, if your process is not in the foreground, throw it in the foreground. All. With a check timeout of 200ms, it is no longer possible to leave the kiosk. Moreover, you can custom allow processes, homescreen, for example, so that the user can see how much time and use your app)

R
recompileme, 2013-06-28
@recompileme

NOOO!

Runnable appsChecker = new Runnable()
    {
         //@Override  
         public void run() {
        	 
        	 boolean inForeground = false; 
        	 List<RunningAppProcessInfo> appProcesses= null;
        	 appProcesses = activityManager.getRunningAppProcesses();
       if (appProcesses!=null) {
         
         for (RunningAppProcessInfo appProcess : appProcesses) {
           if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {//.IMPORTANCE_FOREGROUND) {
            // Log.d("timer vis",appProcess.processName+":"+appProcess.importance);
             if (appProcess.processName.equals("com.bigbuzzy.business")) {
               inForeground = true;
             }
           }
               }
       }
       //Log.d("timer",inForeground+":"+ inWiFi);
       if (!inForeground) {
         /*
         boolean isSystem = false;
         for (RunningAppProcessInfo appProcess : appProcesses) {
           if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {
            PackageInfo p = null;
                  try {
              p = ForegroundService.this.getPackageManager().getPackageInfo(
                  appProcess.pkgList[0], PackageManager.GET_PERMISSIONS);
            } 
                  catch (NameNotFoundException e) 
            {
            }
                  if (p != null) {
                  	String ss = "";
                  	if (p.requestedPermissions==null) ss = null;
                  	else {
                  	for (String s : p.requestedPermissions) {
                  		ss= ss + s;
                  	}
                  	}
                  	boolean issSystem = (p.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 1;


                  	Log.d("System", appProcess.processName+":"+p.versionCode);
                  }
           }
         }
         */
         Intent i =new Intent();
             i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             i.setClassName("com.dgdfgdfgd.business", "com.dfgdfgdfgdfgdgdgf.business.MainMenuActivity");
             startActivity(i);
             i = null;
       }
       appProcesses= null;
             handler.postDelayed(appsChecker, INTERVAL);
              
        	 //}
         }
    };

B
bestime, 2017-10-29
@besttime

Did you find a way to implement this? is also required.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question