简体   繁体   中英

Failed certification process of the Windows Phone 8 App Store

I am developing a Windows Phone 8 App. The App detects the current geo-coordinates and tries to determine the address of the detected coordinates. It works fine in emulator and on my device (HTC 8X), at home (WLAN available) and also somewhere outside (even if the setting 'Data Connection' on the mobile (see below) is off).

I deployed the App to the Microsoft Store and Microsoft's certification process returned the following error Report (I'm not allowed to upload an image of the report...):

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.

My Problem: I can't reproduce the error.

My question: In the 'steps to reproduce', what does the report exactly mean with "Disable active data connection on the device"?

These are the current settings on my mobile:

  • Internet sharing = off
  • WiFi = on
  • Flight Mode = off
  • Mobile Network:
    • Data Connection = off
    • Data Roaming Options = don't roam
    • Location Services = on

In my code I have inserted the following condition, but I'm not sure if this does really fix the problem:

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

Has anyone a good idea?

In my opinion you should turn on Flightmode which disables many things and debug threw your App - try every buton and option. Then you should see where your App crashes.
To ensure that your App can handle every situation I would put that risky code (which crashes) into try-catch block. Then depending on thrown Exception I would infrom the user.
Of course you can check for network first and disable some options if it's not available, that's good, but in this case I would also check the App with Fligthmode and put risky code into try-catch - just in case - it's better for you and user that your App handles Exception rather thatn exits to Start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM