无法实现Knox的EnterpiseDeviceManager

时间:2017-07-19 09:03:05

标签: android sdk standards samsung-knox

我正在尝试使用文档中的给定示例实现Knox Standard SDK的EnterpriseDeviceManager类:Documentation

但是我收到以下错误:Error

我的应用拥有MDM_RESTRICTION权限,而且我属于派生自Activity的类。

有任何已知问题吗?

2 个答案:

答案 0 :(得分:0)

显然它没有任何效果,只是一个令人讨厌的错误。 尽管如此,我还是能够使用这门课程。

答案 1 :(得分:0)

您是正确的,这是尝试使用此代码时显示的常见错误。如果添加以下警告抑制行,则错误下划线将消失:

@SuppressLint("WrongConstant")
EnterpriseDeviceManager edm = (EnterpriseDeviceManager) getSystemService(EnterpriseDeviceManager.ENTERPRISE_POLICY_SERVICE);