• <legend id='4Nb2x'><style id='4Nb2x'><dir id='4Nb2x'><q id='4Nb2x'></q></dir></style></legend><tfoot id='4Nb2x'></tfoot>
    • <bdo id='4Nb2x'></bdo><ul id='4Nb2x'></ul>

      <i id='4Nb2x'><tr id='4Nb2x'><dt id='4Nb2x'><q id='4Nb2x'><span id='4Nb2x'><b id='4Nb2x'><form id='4Nb2x'><ins id='4Nb2x'></ins><ul id='4Nb2x'></ul><sub id='4Nb2x'></sub></form><legend id='4Nb2x'></legend><bdo id='4Nb2x'><pre id='4Nb2x'><center id='4Nb2x'></center></pre></bdo></b><th id='4Nb2x'></th></span></q></dt></tr></i><div id='4Nb2x'><tfoot id='4Nb2x'></tfoot><dl id='4Nb2x'><fieldset id='4Nb2x'></fieldset></dl></div>
    1. <small id='4Nb2x'></small><noframes id='4Nb2x'>

        WP8.1 应用程序在调用 RequestProductPurchaseAsync 时崩溃

        WP8.1 application crashes on calling RequestProductPurchaseAsync(WP8.1 应用程序在调用 RequestProductPurchaseAsync 时崩溃)

            <tbody id='vmNwC'></tbody>

            <bdo id='vmNwC'></bdo><ul id='vmNwC'></ul>

            <small id='vmNwC'></small><noframes id='vmNwC'>

                <legend id='vmNwC'><style id='vmNwC'><dir id='vmNwC'><q id='vmNwC'></q></dir></style></legend>

                1. <i id='vmNwC'><tr id='vmNwC'><dt id='vmNwC'><q id='vmNwC'><span id='vmNwC'><b id='vmNwC'><form id='vmNwC'><ins id='vmNwC'></ins><ul id='vmNwC'></ul><sub id='vmNwC'></sub></form><legend id='vmNwC'></legend><bdo id='vmNwC'><pre id='vmNwC'><center id='vmNwC'></center></pre></bdo></b><th id='vmNwC'></th></span></q></dt></tr></i><div id='vmNwC'><tfoot id='vmNwC'></tfoot><dl id='vmNwC'><fieldset id='vmNwC'></fieldset></dl></div>
                2. <tfoot id='vmNwC'></tfoot>

                  本文介绍了WP8.1 应用程序在调用 RequestProductPurchaseAsync 时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在为 Windows Phone 8.1 (Runtime) 编写 Audio Player,我为 audio 使用 IBackgroundTask.

                  I'm writing Audio Player for Windows Phone 8.1 (Runtime) and I use IBackgroundTask for audio.

                  我想使用应用内购买,但调用时应用程序崩溃

                  I want to use in-app purchase, but applications crashes on calling

                  var result = await CurrentAppSimulator.RequestProductPurchaseAsync(ProProductId);
                  

                  没有任何例外.

                  这个方法在 try-catch 块中被调用.

                  This method is called within try-catch block.

                  当应用程序已经通过调用 BackgroundMediaPlayer.Current 启动 IBackgroundTask 时会发生这种情况(在调用 RequestProductPurchaseAsync 几秒钟后发生).

                  It happens when application already start IBackgroundTask by calling for BackgroundMediaPlayer.Current (happens after few seconds after call RequestProductPurchaseAsync).

                  如果我在启动应用程序后调用 RequestProductPurchaseAsync 而不调用 BackgroundMediaPlayer.Current,它可以正常工作.

                  If I call RequestProductPurchaseAsync after start app without calling BackgroundMediaPlayer.Current, it works normally.

                  这种行为的原因是什么?有一些方法可以解决这个问题吗?

                  What the reason of this behaviour? There are some ways to solve this problem?

                  推荐答案

                  我也遇到了同样的问题,app只是崩溃了,没有抛出异常.发生在 CurrentAppSimulatorCurrentApp 上.

                  I am having the same problem, app just crashes, no exception thrown. Happens with CurrentAppSimulator as well as CurrentApp.

                  我想出的唯一解决方案是杀死后台任务

                  The only solution I came up with was to kill the Backround task

                  BackgroundMediaPlayer.Shutdown()
                  

                  在进行 IAP 之前.确保你在调用关机后也放了一点延迟,有时应用程序在没有它的情况下仍然崩溃(但不那么频繁,所以我猜在关机过程中会有一些延迟)

                  before making the IAP. Make sure you also put in a bit of delay after calling shutdown, sometimes the app still crashed without it (but not as often, so I guess there was some delay during the shutdown process)

                  这篇关于WP8.1 应用程序在调用 RequestProductPurchaseAsync 时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  Parameter count mismatch with Invoke?(参数计数与调用不匹配?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  How delegates work (in the background)?(代表如何工作(在后台)?)
                  C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                3. <small id='geeUj'></small><noframes id='geeUj'>

                      • <i id='geeUj'><tr id='geeUj'><dt id='geeUj'><q id='geeUj'><span id='geeUj'><b id='geeUj'><form id='geeUj'><ins id='geeUj'></ins><ul id='geeUj'></ul><sub id='geeUj'></sub></form><legend id='geeUj'></legend><bdo id='geeUj'><pre id='geeUj'><center id='geeUj'></center></pre></bdo></b><th id='geeUj'></th></span></q></dt></tr></i><div id='geeUj'><tfoot id='geeUj'></tfoot><dl id='geeUj'><fieldset id='geeUj'></fieldset></dl></div>
                        <legend id='geeUj'><style id='geeUj'><dir id='geeUj'><q id='geeUj'></q></dir></style></legend>
                          <bdo id='geeUj'></bdo><ul id='geeUj'></ul>
                        • <tfoot id='geeUj'></tfoot>
                              <tbody id='geeUj'></tbody>