Kiosk mode in Android

后端 未结 11 1833
感情败类
感情败类 2020-11-22 11:26

I\'m in the process of evaluating if and how a CF .NET enterprise application can be ported to run on Android devices. The application on Windows Mobile phones are run in ki

相关标签:
11条回答
  • 2020-11-22 11:49

    Xposed framework can do this. It needs root and there is a possibility that it won't work on every and all platforms. Look for disable() method in class android.app.StatusBarManager.

    Here in Android source code

    Look here on how to write your own module: Xposed development tutorial

    It's much easier than you think at first glance. Good Luck!

    0 讨论(0)
  • 2020-11-22 11:50

    Kiosk mode is nothing but locking a single or set of applications when you switch on an android device. This can be achieved by lock task mode. When the device runs in lock task mode, users typically can’t see notifications, access non-whitelisted apps, or return to the home screen.

    The Device policy controller (DPC) can whitelist the app that can run when the system is in lock task mode. Since its a dedicated device for a specific purpose the person using the device can't leave lock task mode. The device which are Android 5.0 and higher can run in lock task mode.

        •        Whitelisting the applications
    

    First step is to whitelist the application by DPC. DPC can whitelist the apps which can be used in lock task mode by calling

    DevicePolicyManager.setLockTaskPackages()

        ▪         Start lock task mode
    

    Once the whitelisting is done, DPC can call the below function to start the lock task.

    ActivityOptions.setLockTaskEnabled()

    You can find more details regarding the lock task mode here. https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode

    0 讨论(0)
  • 2020-11-22 11:51

    You could customise this (disable access to menu, limit application addition etc) to enable kiosk. http://code.google.com/p/android-launcher-plus/

    0 讨论(0)
  • 2020-11-22 11:51

    Google recently released the Android Management API which allows to easily set up kiosk mode for any Android devices running Android 5.1 or above, and also to set various other policies.

    0 讨论(0)
  • 2020-11-22 11:57

    You can autostart applications on boot by listening to the android.intent.action.BOOT_COMPLETED intent in a BroadcastReceiver and start your Activity from there. In the Activity you can register yourself as the new default homescreen[1] and handle the keys.

    I think there are some instances that you can't handle without modifying the framework (like longpress on Home to show currently active Applications) - I could also be mistaken though.

    But for a prototype that could be sufficient.

    Have fun tinkering!

    [1]:

    <intent-filter>
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.HOME" />
     <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
    
    0 讨论(0)
提交回复
热议问题