Kiosk Mode Android wear
Asked Answered
P

1

6

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 .

Payoff answered 9/6, 2016 at 6:24 Comment(0)
L
2

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.

Lamm answered 5/12, 2016 at 14:14 Comment(2)
Use can also use <uses-permission android:name="android.permission.WAKE_LOCK" /> to keep it running in the background if another notification etc closes the app.Lamm
@mike I had it inside onCreate()Lamm

© 2022 - 2024 — McMap. All rights reserved.