【问题标题】:Failed certification process of the Windows Phone 8 App StoreWindows Phone 8 App Store 认证过程失败
【发布时间】:2014-01-21 08:53:22
【问题描述】:

我正在开发一个 Windows Phone 8 应用程序。应用程序检测当前的地理坐标并尝试确定检测到的坐标的地址。 它在模拟器和我的设备(HTC 8X)上、在家里(WLAN 可用)以及在外面的某个地方都可以正常工作(即使移动设备上的“数据连接”设置(见下文)已关闭)。

我将应用部署到 Microsoft Store,Microsoft 的认证过程返回以下错误报告(我不允许上传报告的图片...):

Requirements
The app must handle exceptions raised by the any of the managed or native System 
API and not close unexpectedly. During the certification process, the app is 
monitored for unexpected closure. An app that closes unexpectedly fails 
certification. The app must continue to run and remain responsive to user input 
after the exception is handled.

Tip:
A Windows Phone 7 or 8 application may run flawlessly during development and testing, 
but after submitting it for certification testing, the application may crash or 
perform unexpectedly. Along these same lines, your application may not perform as 
expected after publication. 
This resource, http://support.microsoft.com/kb/2859130, explains the most common 
reasons for this along with remedies.

Expected Result
1. Launch your app.
2. Navigate throughout the app, and then close the app.
3. Verify that unexpected behavior does not occur during the closing process.
4. Verify that the app remains responsive to user input and user interaction following 
   an app error.

Comments: 
Result: Fail
When the device does not have an active data connection, the application terminates 
unexpectedly in response to user input.

Steps to Reproduce:
1. Disable active data connections on the device.
2. Launch the application.
3. Enter valid details in 'SMS Contacts' and 'Settings' pages in Panoramic view.
4. Select 'red' button in 'Emergency Call' page in panoramic view.
5. Observe the application unexpectedly terminates.

我的问题: 我无法重现错误。

我的问题: 在“重现步骤”中,报告中的“禁用设备上的活动数据连接”到底是什么意思?

这些是我手机上的当前设置:

  • Internet 共享 = 关闭
  • WiFi = 开启
  • 飞行模式 = 关闭
  • 移动网络:
    • 数据连接 = 关闭
    • 数据漫游选项 = 不漫游
    • 定位服务 = 开启

在我的代码中,我插入了以下条件,但我不确定这是否真的解决了问题:

if (!NetworkInterface.GetIsNetworkAvailable())
{
    MessageBox.Show(AppResources.ErrMsg_NoDataConnection);
    return;
}

谁有好主意?

【问题讨论】:

  • 开启飞行模式,启动应用程序,在全景视图的“短信联系人”和“设置”页面中输入有效的详细信息,在全景视图的“紧急呼叫”页面中选择“红色”按钮。那么您的应用程序可能会引发异常。尝试将该代码放入 try {} catch{} 中,看看会发生什么。您可能会尝试连接互联网或在无法连接时拨打电话。
  • 我了解重现的步骤。我只有第 1 步有问题。飞行模式,好的。看起来,它是多个设置(飞行模式、数据连接、漫游)的组合!?
  • 这种情况下的飞行模式只是windowsphone.com/en-us/how-to/wp7/start/whats-airplane-mode 可能发生的一个例子。您可能处于没有蜂窝网络、没有 wifi = 没有电话、没有数据传输的地方。或者用户忘记关闭飞行模式并使用您的应用程序。该应用程序应处理这些情况。最简单的解决方案可能是捕获异常并显示消息“No network or something”。

标签: c# windows-phone-8


【解决方案1】:

在我看来,您应该打开禁用many things 的飞行模式并调试您的应用程序 - 尝试每个按钮和选项。然后您应该会看到您的应用程序崩溃的位置。
为确保您的应用程序能够处理所有情况,我会将有风险的代码(崩溃)放入 try-catch 块中。然后根据抛出的异常,我会从用户那里得到。
当然你可以先检查网络,如果不可用就禁用一些选项,这很好,但在这种情况下,我也会用 Fligthmode 检查应用程序并将有风险的代码放入 try-catch - 以防万一 - 这对你和您的应用程序处理异常而不是退出到开始的用户。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-21
    • 1970-01-01
    • 2016-06-09
    • 1970-01-01
    • 2013-11-04
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多