Hello,
I wonder if you can tell me how to turn a Tizen Web App into Kiosk Mode, so the the app can't be closed or the phone can't get shutdown without a Admin password. I have to make an app that is publicily used by users in a museum and have to use a Gear S2 due to its NFC feature.
Last year I made a similar app in Android Wear and there it was relativley easy to achieve the functionality of a Kiosk Mode.
After some research I managed to disable the back button and the return to the app after screen off with this code:
$(window).on("tizenhwkey", function(e) { if (e.originalEvent.keyName === "back") { $("#text").text("Back pressed!"); e.originalEvent.stopPropagation(); e.originalEvent.preventDefault(); } }); tizen.power.request("SCREEN", "SCREEN_NORMAL"); tizen.power.setScreenStateChangeListener(function(previousState, changedState) { if (currState === 'SCREEN_NORMAL' && prevState === 'SCREEN_OFF') { var app = tizen.application.getCurrentApplication(); tizen.application.launch(app.appInfo.id, function() {}); } });
But the menu/more button is still working. The user shouldn't be able to leave the app. Only admins should be able to do that.