• <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 时崩溃

        时间:2023-05-21

            <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 时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:未安装 Visual Studio 的应用程序崩溃 下一篇:访问 SQL Server 的实体框架代码中的访问冲突

                  相关文章

                3. <small id='geeUj'></small><noframes id='geeUj'>

                  1. <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>
                  2. <tfoot id='geeUj'></tfoot>