PJ
I have an KNOX enabled application. Now, I want that if application is running on KNOX supported devices then app should go for activation of licenses and creation of kiosk mode. But if application is running on other devices, which are not having built in support for KNOX. Then there can be two posibilities:
1. Is there any way to or workaround through which we can support KNOX features on those devices?
2. Is there any API which will check that, whether the running device is KNOX enabled or not? On the basis of that value we can bypass the license activation and other flow.
Please suggest.
Thanks.
4 Replies
5 years ago
Hi Kieran,
I tried the above solution. But I'm getting NullPointerException on below line when run on non-samsung device.
So, here we can put a null check to differentiate between Samsung and non-samsung device.
so the overall code is:
I ran this code on Samsung device with android version 4.1.2, without Knox Support. While activating ELM license,I'm getting an exception with error message "Stub!".
So, is there any other API to check whether running Samsung device is Knox Supported or not?
5 years ago
Hi Prachi,
That is very strange, can you please provide me with the build number of the device?
5 years ago
Hi Kieran,
Following are the details:
Build Number: JZ054K.P3100DDCNA3
Model Number: GT-P3100
Android version: 4.1.2
5 years ago
Prachi, getEnterpriseSdkVer() is supported only since SDK Version 2!
Older SDK versions seem to have code like that:
public EnterpriseDeviceManager.EnterpriseSdkVersion getEnterpriseSdkVer() { throw new RuntimeException("Stub!"); }
So put a try/catch block around getEnterpriseSdkVer and you can distinguish between SDK <2.0 and SDK >=2.0.
For versions SDK >=2.0 getEnterpriseSdkVer will work subsequently.