c# - LicenseInformation IsTrial is always true, even after buying the app -


i have published app in windows store, it's hidden moment, test.

there trial in app, giving access level. didn't put time limit. when buy game, should have access levels. "istrial" true.

private static licenseinformation _licenseinformation = currentapp.licenseinformation;  public static bool islevelenabled(levelviewmodel level) { #if debug   return true; #else   if (_licenseinformation.isactive)   {     if (_licenseinformation.istrial) //problem, true     {       if ([...])//some logic check level enabled in trial.       {         return true;       }       else       {         return false;       }     }     else //should go here when buy app.     {       return true;     }   }   else   {     return false;   } #endif } 

my code base on https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn532253(v=win.10).aspx.

thanks

edit

someone else bought app on store, don't think tried trial. fine him. had access levels. , i'm still stuck in trial.

make sure app associated dev account .

and running app in debug mode ? while have #if debug .. returning true if it's running in debug mode !

and try make prop method :

private bool istrial()     {         var li = currentapp.licenseinformation;         if (li.isactive)         {             return li.istrial;         }         else         {             return true;         }      } 

Comments