is there a way to autostart the client's app after the client just press the power button on the device?
Imagine 10 spectators, a single presentation and -
everybody has to configure each controller for the device, scroll through the main menu, select the
specific app, start the app, ...
As the app is hand based on handtracking we wouldn't need a controller at all - just a way to autostart
@pepone assuming you don't want to implement Lock task mode yourself in your application / make your device managed by an MDM app we have a CLI service I referenced here.
You will need one of the more recent release builds to use the service above but it would allow you to set an application into an auto-start fashion that you described. I would strongly suggest trying this first.
If you still want to implement this in your app programmatically then the two approaches I would suggest is implementing Lock Task Mode in your application or making your app a custom Android launcher. These two options can introduce a lot of added complexity to your application if you choose to pursue them (you are basically turning your app into an MDM provider!)
"adb shell am start-service -n com.magicleap.locktaskservice/.LockTaskService -e "com.magicleap.locktaskservice.EXTRA_ADD_AND_LAUNCH" "com.myclient.xr"
gives me "adb.exe: more than one device/emulator".
Any idea how I can address my my device only?
"adb devices" gives me: >> List of devices attached
G862XTXXXX device
192.168.178.XX:5555 device
Did you run the following commands before? You need to set the service as the device owner. I briefly tried this myself and was able to get a small sample locked in.
I am trying to do the same thing as the original poster and have also had trouble getting this to work.
I'm in developer mode, I ran the command to set the device owner and then the start service command with my app id. I don't get any errors, but I'm not seeing the app launch into kiosk mode either initially or on device boot (which is my goal).
Are we sure this is still working in ML OS 1.8.0?
PS I tried it with my own app as well as the Magic Leap Unity Examples app and it didn't work with either.
Just to make sure I understand, does enabling kiosk mode for an app make it automatically launch on startup? And does this behavior persist between reboots?