2013-07-11 11 views
1

구매가 가능합니다 & windows 전화에서 옵션을 시도하십시오. Windows 앱을 좋아하는 것 같습니다.Windows Phone 8에서 구매 및 사용해보기

Windows 스토어에서 내 게임 중 하나는 다운로드 당일부터 일주일 동안 완전한 액세스 권한을 갖습니다. 그 후 창문 자체가 게임을 잠급니다 (우리가 대시 보드에서 1 주일을 준다면).

마찬가지로 Windows Phone 8에는 기능이 있습니다. .

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286402(v=vs.105).aspx#BKMK_Runningtheapplication


심지어 내가 구입 &에 대해 위의 링크를 사용하려고 시도했다.

아래와 같이 checklicense()를 변경했습니다.

private void CheckLicense() 
    { 
     if DEBUG 
     string message = "This sample demonstrates the implementation of a trial mode in an application." + 
          "Press 'OK' to simulate trial mode. Press 'Cancel' to run the application in normal mode."; 
     if (MessageBox.Show(message, "Debug Trial", 
      MessageBoxButton.OKCancel) == MessageBoxResult.OK) 
     { 
      _isTrial = true; 
     } 
     else 
     { 
      _isTrial = false; 
     } 
     else 
     _isTrial = _licenseInfo.IsTrial(); 
     //Included lines 
     if(_isTrail) 
      freeversion = true; //Here Free version trigger when user presses Try 
     else 
      freeversion = false; //Here fullversion trigger when user presses Buy 
     //Included lines 
     endif 
    } 

내가 이것을 좋아한다면. 마스터 모드로 실행합니다. 항상 freeversion은 false입니다 (예 : _isTrail은 항상 false를 반환합니다).

왜냐하면 나는 아직 전화 상점이나 다른 문제를 업로드하지 않았기 때문입니까 ??

이 문제를 해결하는 데 도움이 되나요 ??

답변

1

은 내가 사용하는 코드입니다 ' 장치. 이것은 무료가 아니므로 연결할 수없는 경우 앱이 계속 작동하는지 확인해야 할 수 있습니다. 또한 앱이 이미 인터넷 기능을 요청하지 않은 경우이를 수행해야합니다.
2

Windows Phone에서 자동으로 수행 할 수있는 방법이 없으므로 직접 응용 프로그램에서 시험 사용 제한을 구현해야합니다.

Windows Phone에서 앱을 제거해도 흔적이 남지 않습니다. 따라서 사용자가 앱을 제거/재설치하면 평가판 기간을 다시 시작할 수 있습니다.

private void CheckLicense() 
{ 
    LicenseInformation licenseInformation = CurrentApp.LicenseInformation; 
      try 
      { 
       var listing = await CurrentApp.LoadListingInformationAsync(); 
       var _price = listing.FormattedPrice; 
       // start product purchase 
       await CurrentApp.RequestProductPurchaseAsync("FeatureName", false); 

       ProductLicense productLicense = null; 
       if (CurrentApp.LicenseInformation.ProductLicenses.TryGetValue("FeatureName", out productLicense)) 
       { 
        if (productLicense.IsActive) 
        { 
         MessageBox.Show("Product purchased"); 

         CurrentApp.ReportProductFulfillment("FeatureName"); 
         ProductPurchased();  // It display product purchased & trigger full version 
         return; 
        } 
        else 
        { 
         str = "Purchase failed"; 
         ShowErrorPopup(str); // It shows error msg. purchase failed. 
         return; 
        } 
       } 
      } 
      catch (Exception) 
      { 
       str = "Purchase failed. Check internet connection and try again"; 
       ShowErrorPopup(str); 
       return; 
      } 
} 
+0

감사를 그냥 추가 참고로 응답 – SaravanaKumar

+0

를 들어,하지만 (예 : 푸른 모바일 서비스 등) 클라우드 서비스에 응용 프로그램을 연결하고 '등록 : 여기 –