Peter Peterson
Sep 08, 2017
4:01 pm

Which Knox SDK do I need for the following use case?

There should be only one specific app running on a Samsung Galaxy S8+ phone. This app should automatically start whenever the phone is started (or restarted).

The hardware buttons should be completely disabled. Like the 3 software buttons (back, home and app switcher) too.
The bottom bar in which the buttons ***** should be completely invisible and should also not be shown when swiping up from the button.
Furthermore the notification drawer and statusbar should also be completely disabled and hidden. No swiping or other gestures to show them should be allowed.

So this is basically something like a single app device as it runs in a special environment.
Can this be done with the help of one of your Knox SDKs at all?

I also enrolled for the SEAP and setup an according license key but was not able to run one of your sample apps.
Whenever I call the elmMgr.activateLicense method nothing happens. No log messages, toast or anything.
Did I miss something?

Peter Peterson
Sep 20, 2017
7:03 pm

As I am using the sample app from your website I already tried out all the APIs. Unfortunatetly the bottom bar is always shown weather I call hideNavigationBar or hideSystembar. Is this a known issue on the Galaxy S8+? Should I update the device?

Samuel G.Samsung SEAP Moderator
Sep 08, 2017
6:00 pm

Hi Peter,

All the functionality you mentioned should be able to be achieved using the Knox Standard SDK. As for only allowing a single app to be used, you'll want to look at our Kiosk Mode APIs

The activateLisence API does not provide user feedback on whether or not the license was acticated on its own. If you'd like a toast or something to appear, I'd create a broadcast receiver filtering by the ACTION_LICENSE_STATUS action.

 

Thanks,

Sam

Peter Peterson
Sep 12, 2017
5:38 pm

Sorry but I receive an ERROR_UNKNOWN (102). I have knox version 2.8 and standard sdk version 5.8.0.

Is this ok for the example app at:

https://seap.samsung.com/sample-app/kiosk-mode

Is this the correct way to achive the desired features?

Thanks in advance

Samuel G.Samsung SEAP Moderator
Sep 13, 2017
11:31 pm

Hi Peter,

There is a rule regarding our ELM licenses that any app package name can only activate a maximum of 5 licenses. On the 6th license activation, it will return an error code of 301 on Android 6 and 102 on Android 7. It might be worth it to try creating a new project (with a new app package name) and activating your licenses there. 

Please let me know if it helps or still returns the errors. 

Thanks,

Sam

Peter Peterson
Sep 19, 2017
7:37 pm

Thank you. This worked fine for me. I have also checked to code and your API and was able to deactivate statusbar and the notification drawer.

With the help of the general system settings I was also able to hide the navigation bar at the bottom (the one with the app drawer, home and back button inside). Unfortunately I am not able to prevent the system from showing these bar when I swipe up from the bottom of the screen. Do you know How I can achieve this?

Thanks in advance.

Samuel G.Samsung SEAP Moderator
Sep 20, 2017
6:13 pm

Hi Peter,

Which API are you using to hide the navigation bar? If it's hideNavigationBar(), try using hideSystemBar() instead.

 

Thanks,

Sam

Peter Peterson
Oct 11, 2017
4:10 pm

Hello Samuel. I was on vacation so sorry for the late reply. I also tried the hide systembar method but it was not working on the S8+. Could you please verify if this is really working on this device at all?

The other thing is about the single app mode. There is an overload of the enableKioskMode method which takes a string which is the "kiosk package". Should a pass the package name of the single which I want to run on the phone? Because this does not work either.

Thanks in advance.

Comments

Yes, the kioskPackage parameter indicates which package will be the home application of the kiosk mode.

I was able to replicate the issue on my end with an S8 with the hideSystemBar API. I'll bring it up with the R&D team, but in the meantime what you can do is disable the navigation keys individually with APIs like allowHardwareKeys and setHomeKeyState.

Samuel G.Oct 11, 2017 at 4:57 pm

So we are not able to completely hide the bottom bar at the moment, right? Can you give us information how long it will take to get this feature? It is absolutely necessary for our app to completely hide everything besides the app itsself.

The other thing is about the Hardware buttons. Is there a table where I can have a look at which Integer stands for which button? Because I was not able to deactivate the app switcher button on the left (recent apps) and the back button.

The kiosk package name which is passed into the enableKiosk mode method does not have any impact. Do I have to pass a specific format of the package name? Is there a sample app which shows the kiosk mode with that one home application? Because whenever I call that enableKioskMode overload the kiosk mode starts but the app which I passed does not.

 

Peter PetersonOct 23, 2017 at 4:02 pm
2
Ben Malavazi
Oct 26, 2017
12:52 am

I'd like to piggyback on Peter Paterson's question. I'm able to hide the status bar by using the hideSystemBar() API, but I'm not able to hide the navigation bar by calling the hideNavigationBar() API. Blindly disabling all of the HW keys returned in getHardwareKeyList() has no effect on the Back and Task Switcher buttons, but the Home button seems to be blocked correctly. Peter Paterson: The way to disable those other buttons is by adding the values: 4, 52, and 187 to the List returned by getHardwareKeyList(), and calling allowHardwareKeys() with the modified List<Integer>.

We still need a way to completely hide the NAV bar! If we're already hiding the status bar (which we've observed to be happening), why can't the NAV bar be hidden as well? We know that this must be possible, because apps like SureFox are able to do this without rooting the phone, and by using the Knox SDK.

We really need your help on this! Please advise.