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.