2017-10-02 9 views

답변

0

녹스 API (표준 또는 프리미엄)별로 Knox가 이미 활성화되었는지 여부를 간단하게 쿼리 할 수있는 방법이 없습니다. 특히 간단한 부울 리턴 "knoxlib.isKnoxActivated();"가 없습니다.

  1. 귀하 녹스 사용 앱이 ELM & KLM (엔터프라이즈 라이센스 관리 및 녹스 라이센스 관리 클래스 모두에 대해 'activateLicense'을 호출해야 : 모든

    첫째, 나를 녹스 활성화 프로세스가 어떻게 작동하는지 살펴 보자).

  2. 장치는 Samsung의 중앙 집중식 온라인 서비스 나 조직의 구내 Knox 라이센스 서버와 상관없이 Knox 라이센스 서버에 대한 네트워크 경로가 있어야합니다.

  3. Knox 라이센스 앱은 Knox 라이센스 서버로부터 응답을 받으려면 브로드 캐스트 리시버가 있어야합니다.

또한이 같은 매니페스트에 방송 수신기를 등록하는 것을 잊지 마세요 :

<receiver> 
    android:name=".KnoxLicenseReceiver" 
    android:enabled="true" 
    android:exported="true" 
    <intent-filter> 
     <action android:name="edm.intent.action.license.status" /> 
     <action android:name="edm.intent.action.knox_license.status" /> 
    </intent-filter> 
</receiver> 

귀하의 방송 수신기 클래스는 다음과 같이 보일 것이다.

public class KnoxLicenseReceiver extends BroadcastReceiver { 

    private final String LOGTAG = KnoxLicenseReceiver.class.getSimpleName(); 

    @Override 
    public void onReceive(Context context, Intent intent) { 
     SharedPreferences.Editor sharedPrefEditor = context.getSharedPreferences(Constants.SHARED_PREF_NAME, Context.MODE_PRIVATE).edit(); 
     String action; 
     int errorCode; 
     if (intent != null) { 
      action = intent.getAction(); 
      if (action != null) { 
       // If received an ELM response 
       if (EnterpriseLicenseManager.ACTION_LICENSE_STATUS.equals(action)) { 
        errorCode = intent.getIntExtra(EnterpriseLicenseManager.EXTRA_LICENSE_ERROR_CODE, Constants.DEFAULT_ERROR); 
        // If successfully activated 
        if (errorCode == EnterpriseLicenseManager.ERROR_NONE) { 
         Log.i(LOGTAG, "ELM activated successfully."); 
         sharedPrefEditor.putBoolean(Constants.ELM_ACTIVATED, true); 
        } else { 
         Log.i(LOGTAG, "ELM failed to activate with error code: " + errorCode); 
         sharedPrefEditor.putBoolean(Constants.ELM_ACTIVATED, false); 
        } 
       } 

       // If received a KLM response 
       if (KnoxEnterpriseLicenseManager.ACTION_LICENSE_STATUS.equals(action)) { 
        errorCode = intent.getIntExtra(KnoxEnterpriseLicenseManager.EXTRA_LICENSE_ERROR_CODE, Constants.DEFAULT_ERROR); 
        // If successfully activated 
        if (errorCode == KnoxEnterpriseLicenseManager.ERROR_NONE) { 
         Log.i(LOGTAG, "KLM activated successfully."); 
         sharedPrefEditor.putBoolean(Constants.KLM_ACTIVATED, true); 
        } else { 
         Log.i(LOGTAG, "KLM failed to activate with error code: " + errorCode); 
         sharedPrefEditor.putBoolean(Constants.KLM_ACTIVATED, false); 
        } 
       } 
      } 
     } 
     // Store shared pref changes 
     sharedPrefEditor.apply(); 
    } 
} 
+0

당신이 염두에 두어야 할 또 다른 한가지는 삼성이 자신의 dev에 포럼 (링크 참조), 당신 녹스 앱을 사용할 수 있음을, 'activateLicense'을 호출해야합니다에 확인했다고 또 다른 녹스 응용 프로그램을 활성화 이미에 이렇게 경우에도 같은 장치. 라이선스는 Knox를 기기의 Knox 사용 앱에 대해 단순히 활성화하는 것이 아니라 'activateLicense'를 호출하는 앱에만 해당됩니다. 즉, 두 개의 녹스 지원 앱이있는 경우 해당 단일 기기를 완전히 활성화하려면 두 개의 녹스 라이선스가 필요합니다. https://seap.samsung.com/forum-topic/piggy-backing-activation-possible –