DeviceNetworkInformation.NetworkAvailabilityChanged

Hello,

I have been working on a game for windows phone using unity.

In my game i need to check for the connectivity change. so i used the DeviceNetworkInformation.NetworkAvailabilityChanged event listener.

But due to this listener my app is crashing while resuming from background when the wi-fi is turning off.

So i checked with a sample app and found the same issue is there in the sample app too.

Steps to reproduce:

  1. Create a sample unity app and build for Windows phone 8

  2. Add the DeviceNetworkInformation.NetworkAvailabilityChanged listener to the game.

  3. Make it an xbox game by changing the apps.normal to apps.game in the manifest file.

  4. Also add ActivationPolicy=“Resume” to the default task in the manifest.

  5. Set the deployement config to Master & launch the app in a device.

  6. After it launched, stop it and relaunch it form phone with the Wi-Fi turned on.

  7. Now go to home screen using the home button in the device & turnoff the wi-fi.

  8. Immediately relaunch the game form background through the xbox app.

Now the game will show resuming state and will crash.

Without the event listener the game works fine without crash. How to fix this issue ?

I am not able to debug it since the issue is not happening when connected to debugger.

Unity Version used : 4.6.1p4

Hi,

what OS version is your phone running?

Hello Tautvydas,

The Issue is found in both 8.0 & 8.1

I meant the phone OS version, not the OS your app targets. If it’s at least 8.1, it will create a crash dump in Documents\Debug folder on the phone, which you can examine afterwards to see where it crashes and why it happens.

currently i was checking in device which has 8.0. I will check with the device with 8.1 and post the log as you said.

Hello Tautvydas,

The issue is happening only in 8.0 Os. Its not occurring in 8.1 Os.