Question

Update: Going further with my investigation, I just submitted a test app in beta store to just show the values of CurrentApp.LicenseInformation.IsActive and CurrentApp.LicenseInformation.IsTrial. Both returns false. Is this a normal behavior?


I just published an app in the WP8 Store that has trial and purchase full version option. As WP8 does not have any mechanism to test trial purchase other than Simulation, I had to send to store anyway. To my surprise, I completed the purchase in my phone but still the app seem to remain in trial, and showing the Buy option. I am using code from msdn sdktrialexperiencesample

The main parts of the code are

public static void RefreshCache()
    {
        LicenseManager.isActiveCache = CurrentApp.LicenseInformation.IsActive;
        LicenseManager.isTrialCache = CurrentApp.LicenseInformation.IsTrial;
        LicenseManager.RaiseLicenseChanged();
    }

and

    public static LicenseModes LicenseMode
        {
            get
            {
#if DEBUG
                return simulatedLicMode;
#else // DEBUG
                if (LicenseManager.isActiveCache)
                {
                    return LicenseManager.isTrialCache ? LicenseModes.Trial : LicenseModes.Full;
                }
                else // License is inactive.
                {
                    return LicenseModes.MissingOrRevoked;
                }
#endif // DEBUG
            }
        }

I can see that the refresh method is getting called at proper places and when it is required to be refreshed.

So the only possibility for this code not to work is CurrentApp.LicenseInformation.IsActive returns false always.

I searched in SE and Google and some people mention that IsActive is always false, and somewhere I have seen that it is refreshed after 24+ hours and starts returning true.

Yes, I have seen Microsofts Trial Guide in msdn and my code is compliant with it because it also checks CurrentApp.LicenseInformation.IsActive first before checking IsTrial.

Can anybody tell me if I have anything wrong, or does Windows Phone 8 app purchase really takes long hours to refresh license on the phone?

NB:

  • In the web store, the app is showing as purchased in my account
  • I did a factory reset of the phone, went to store and the app still showed as trial. But after download, and clicking buy, it refreshed (said re-installing) and now buy button is gone from the store.
  • I am using the same phone used for development & debugging/testing, so it was dev unlocked, but did a factory reset\app reinstall already but without luck.
  • My app does not have in-app puchase and has nothing to do with such code.

No correct solution

OTHER TIPS

This is to update that CurrentApp.LicenseInformation.IsActive is ALWAYS FALSE for WP. Which means the sdktrialexperiencesample is a throwaway stuff. You need to only check the IsTrial is true to understand if the trial mode is on, else force assume that the app is already paid.

Yes, at least the app deployed in beta store returns false for both IsActive and IsTrial. As mentioned the checking of IsActive becomes invalid. In fact, this is very confusing too!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top