0

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?

3
  • Turn on Flight Mode, Launch the application, Enter valid details in 'SMS Contacts' and 'Settings' pages in Panoramic view, Select 'red' button in 'Emergency Call' page in panoramic view. Then probably your App throws an exception. Try to put that code into try {} catch{} and see what happens. You probably try to connect with internet or make a call when it's not possible. Commented Jan 21, 2014 at 9:10
  • I understand the steps to reproduce. I only have a problem with step 1. Flightmode, OK. It seems, that it is a combination of more than one setting (flightmode, data connection, roaming)!? Commented Jan 21, 2014 at 9:29
  • Flightmode in this case is only an example what can happen windowsphone.com/en-us/how-to/wp7/start/whats-airplane-mode. You may be in a place with no cellurar network, no wifi = no calls, no data transfer. Or user forgets turning off flightmode and uses your App. The App should handle those situations. The simpliest solution probably is to catch exception and show Message "No network or something". Commented Jan 21, 2014 at 9:53

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.