androidadbwear-ossony-smartwatch

Kiosk Mode Android wear


I'm trying to make kiosk mode in smart watch. I'm having now two big problems in an attempt to implement Device Administration :

  1. The following uses-feature are undefined: android.software.managed_users android.software.device_admin
  2. The flag "ro.config.low_ram" is set , I try to make it undefined .

[According to https://source.android.com/devices/tech/admin/implement.html]

In addition , I will be happy, if you have a better idea to make kiosk mode in smart watch .


Solution

  • I keep the screen on with:

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    

    Then I disabled the left swipe by creating a new style.

    AndroidManifest.xml

    <application  android:theme="@style/AppTheme">
    

    res/values/styles.xml

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <style name="AppTheme" parent="@android:style/Theme.DeviceDefault">
            <item name="android:windowSwipeToDismiss">false</item>
        </style>
    </resources>
    

    Now the only way to close the app is through the button. Maybe there is a way to override this but worst case there is always super-glue.