Max Spirin
Sep 14, 2017
2:36 pm

How to check if Knox SDK was already activated for the application

Hi everyone.

Can someone tell me how to see (programmatically) if the Knox SDK was already activated for the application.

Currently the only way is to check status after the 

.activateLicense(ELMKey)
then the special intent is sent, and in 

.getStringExtra(EnterpriseLicenseManager.EXTRA_LICENSE_STATUS)
we can find "success" or "fail"

 

So the question is if there is a possibility to check if the activation was succesful without calling  .activateLicense() each time.

 

Regards,

 Max.

Similar topics

No similar topics found.
Samuel G.Samsung SEAP Moderator
Sep 14, 2017
4:03 pm

Hi Max,

Unfortunately our SDK does not have an API that excplicitly checks to see if a license is activated after activateLicense() is called. A workaround that many users and our sample apps use is to implement a BroadcastReceiver that filters by EnterpriseLicenseManager.EXTRA_LICENSE_STATUS. From here you can show a Toast with the error code, etc.

 

Thanks,

Sam

Comments

Hi Sam. The workaround you suggest with a BroadcastReceiver only works if Max's application is the one calling the 'activateLicense' API. I'm hoping to rely on another application (MDM), to handle the Knox activation for the device, and then simply invoking the Knox API's I wish to after that has occurred.

I also believe the Broadcast that occurs is targeted to the application that calls 'activateLicense', therefore it should not be possible to attempt to listen to another apps activation response.

Correct?

Thanks,

Wes

Wesley BuntonSep 19, 2017 at 6:24 pm