The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

[WP8.1]In app purchase windows phone 8.1 store app RRS feed

  • Question

  • I have simple issue in my windows phone 8.1 RT app. I have implemented in app purchase in my app. It works normally, If I do in app purchase while BackgroundAudioPlayer is running, then after opening store CONFIRM PURCHASE page app crashes after 5-6 seconds sometimes after 10 secs.

    Note: I am able to reproduce this issue in standard BackgroundAudioSample Uploaded in OneDrive

    Let me know if any one have come across this situations.


    • Edited by Krunal Parekh Wednesday, May 25, 2016 6:10 AM title tag
    • Edited by vitthal.patil Wednesday, May 25, 2016 9:28 AM updated onedrive line
    Tuesday, May 24, 2016 10:29 AM

All replies

  • Hi,

    >>Note: I am able to reproduce this issue in standard BackgroundAudioSample Uploaded in OneDrive

    Unfortunately I can not reproduce the issue on my emulator. As you described I started background task and once it started I do purchase but It doesn't crashes.

    Here is output window.

    Background Audio Task  starting...
    value found Active
    Background Task started
    Purchase Result:Succeeded

    The only exception I get sometimes is background task not started on time which is user thrown not system thrown.

    Even if the exception is thrown if you wait for a while the BG task does start.

        bool result = SererInitialized.WaitOne(2000);
                    //Send message to initiate playback
                    if (result == true)
                        var message = new ValueSet();
                        message.Add(Constants.StartPlayback, "0");
                        throw new Exception("Background Audio Task didn't start in expected time");

    Thanks MSDN Community Support Please remember to Mark as Answer the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, May 25, 2016 6:09 AM
  • Please check updated OneDrive link. It happens on real device. It happens randomly. I had waited for 2 secs in my application to bg task. Bg task starts no issues in that. but say if you have started playing song already and after that if we do purchase while song is playing .. app crashes in CONFIRM PURCHASE page after 5 to 10 secs. I tries Shutdown BackgroundMediaPlayer also with some delay, but that too could not helped!

    Here in sample on OneDrive you can also make purchase code on seperate button click so that you can do purchase once songs starts playing.


    Wednesday, May 25, 2016 9:21 AM