-1

I am trying to implement the EnterpriseDeviceManager class of the Knox Standard SDK using the given example in the documentation: Documentation

However i am getting the following error:Error

My app has the MDM_RESTRICTION permission and I am within a class deriving from Activity.

Is there any known issue?

2 Answers2

0

Apparently it has no effect whatsoever and is just an obnoxious error. I was able to use the class nontheless.

0

You're correct that this is a common error shown when attempting to use this code. If you add the following warning suppression line, then the error underline will go away:

@SuppressLint("WrongConstant")
EnterpriseDeviceManager edm = (EnterpriseDeviceManager) getSystemService(EnterpriseDeviceManager.ENTERPRISE_POLICY_SERVICE);
Wesley Bunton
  • 135
  • 1
  • 11