2010-08-17 2 views
0

SlideMe에 추가하려는 버전의 앱에 SlideLock을 추가하려고합니다. 어떤 이유로 mainActivityInstance에서 오류가 발생하며 이유를 모르겠습니다. 어떤 아이디어가 잘못 되었나요? 감사.slideme slidelock

public void onCreate (번들 icicle) { super.onCreate (icicle); setContentView (R.layout.home);

com.slideme.slidelock.License myLicense = 
     new com.slideme.slidelock.License("My first license", 
              "4839206850342", 
              mainActivityInstance); 
    // There are other constructors available also. 
    // This one is just the most comfortable. 

    try{ 
     /* 
     * You can store the fetched data in a persistent storage and retrieve 
     * it from there on the next application startup, just in case you 
     * want to save the end-user's networking traffic and reduce startup 
     * delays. We strongly recommend you to refresh the license from 
     * time to time, just in case the end-user claims a refund, or any 
     * other corner case scenario 
     */ 
     myLicense.digest(myLicense.fetch()); 
    } catch(IOException ioe){ 
     // license couldn't initialize. Handle this 
    } 

    Rights someRights = myLicense.getFullRights(); 
    // Works even if you already reserved the SlideLock Key in the past. 

    if(someRights != null){ 
     // you have granted rights. 
    } else { 
     // You don't have any rights for the feature in cause. Try 
     // some features. (Currently not supporting multiple 'features') 
    } 

답변

0

난 당신이 어디서든 mainActivityInstance 변수를 선언 표시되지 않습니다. 당신이 활동 #에서 onCreate (번들 고드름) 방법이 코드를 사용하는 경우 직접 활동 인스턴스 참조를 전달하여 SlideLock2의 인스턴스를 시도 할 수 있습니다 :

 new com.slideme.slidelock.License("My first license", 
             "4839206850342", 
             this); 

당신이 더 문제가 있다면 알려주세요.

는 -SlideME SlideLock 팀, 감사 표시

+0

은 그것을 짓을 할 수 있습니다. 그것이 지금 작동하는지 잘 추측해라. 감사. –

+0

예. 이 모든 것이 제대로 작동하도록하기 위해 내가해야 할 일이 있습니까? 애플 리케이션을 다운로드하여 작동하는지 확인했다. 나는 힘을 가까이에서 얻고있다. 그리고 나의 로그인은 내가 무효의 라이센스를 가지고있다라고 말한다. 그래서 나중에. 문제가 있습니다. 슬라이드 잠금 키에는 동일한 키가 있지만 등록하지 않는 것 같습니다. 내 문제가 뭔지 알아? 나는 아무것도 잊어 버렸는가? 감사. –

+0

SlideME에서 응용 프로그램을 구입하면 유효합니다. 테스트 목적으로 에뮬레이터를 "선불"로 간주하고 기본적으로 에뮬레이터에 대한 유효한 라이센스를 반환 할 것입니다. 현재이 분야에서 작업이 진행 중입니다. –