locked
Why is it that CurrentApp does not seem to work

    Question

  • I'm trying to switch my app over from a free trial / purchase model to a free / in-app purchase model. When I switch out CurrentAppSimulator for CurrentApp in my code, I get garbage information and exceptions. E.g. the following gives me garbage information. E.g. it claims that the expiration date for my app is 12/31/1600, and that the Count property of Licensinfo threw a System.Reflection.TargetCountParameterCountException.

    LicenseInformation LicenseInfo = CurrentApp.LicenseInformation;

    The following has to be implemented within a Try Catch statement, or else it will crash my app. It also gives me similar garbage information:

    string AppReceipt = await CurrentApp.GetAppReceiptAsync();

    ListingInformation Listing = await CurrentApp.LoadListingInformationAsync();

    One other thing, CurrentApp itself, reports for its LinkUri property: Windows.ApplicationModel.Store.CurrentApp.Uri threw an exception of type 'System.Exception'.

    I feel like I'm operating blind. Microsoft's documentation says that you should swap out CurrentAppSimulator for CurrentApp, and everything should work fine. If that is the case, why doesn't CurrentApp seem to work when examined in debug mode, when I have a good Internet connection (which I need in order to sign in with my Microsoft account, to create app packages) and my app has already been published in the Windows Store for several months?

    Saturday, March 29, 2014 1:54 AM

Answers

  • You can't use the CurrentApp purchasing calls in your development. They simply won't work.

    Unless you're testing the released version of your app from the actual Windows Store it seems like the results are as expected.

    Have you actually tried purchasing an item from your 'live' app? Are you 100% sure your product names are correct.

    Post your code for purchasing an in-app item. I had a few issues getting this to work, but my issues were different.


    I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

    Wednesday, April 9, 2014 1:55 AM

All replies

  • Hello

    I'm experiencing similar issues.

    Did you by any chance reach a solution on this problem?

    Friday, April 4, 2014 12:53 PM
  • You can't use the CurrentApp purchasing calls in your development. They simply won't work.

    Unless you're testing the released version of your app from the actual Windows Store it seems like the results are as expected.

    Have you actually tried purchasing an item from your 'live' app? Are you 100% sure your product names are correct.

    Post your code for purchasing an in-app item. I had a few issues getting this to work, but my issues were different.


    I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

    Wednesday, April 9, 2014 1:55 AM