locked
Windows Phone 8 App fails to launch under Windows Phone 8.1 RRS feed

  • Question

  • My app that was certified under Windows Phone 8, doesn't work anymore after I upgraded my Lumia 920 to Windows Phone 8.1 today.   Now it seems to be executing code that it wasn't doing before ( from an async method)  I mean it wasn't hitting the code before, but now it is and generating an error because the method never came back with the data yet.

    I'm just wondering why this wasn't a problem before?

    EDIT, here is the basics of the code I'm executing on the MainPage

     protected override async void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    {
    	double minutes = timeSpan.TotalMinutes;
    	if (minutes >= 60)
    		await RunTasks();
    	else 
    	{ 
    	}
    }
    
     private async Task RunTasks()
     {
    	tasks[0] = HttpExtensions.GetMyData("");
        tasks[1] = HttpExtensions.GetMyData("");
    	if ((bool)IsolatedStorageSettings.ApplicationSettings["LocationConsent"] != true)
    	{
    		// The user has opted out of Location.
    		locationServiceProblem = true;
    	}
    	else
    		tasks[2] = GeoLocate.OneShotGeoLocate();
    		
    	try
    		{
    			await Task.WhenAll(tasks);
    		
    			//do stuff with data
    			
    			drawMapItems();
    		}
    		catch (Exception ae)
    		{
    		}
     }
     
    private void drawMapItems()
    {
    
    	//draw map stuff
    
    	//zomm into specific area
    	var bounds = new LocationRectangle(center, width, height);
    	try
    	{
    		MyMap.SetView(bounds);  <== ERROR HERE (because geolocation task never came back with coordinate yet)
    	}
    
    }

    So basically it error out at MyMap.SetView(bounds); because the geolocation task didn't set the coordinates yet required for the the SetView method.  However in Windows Phone 8, this never caused an error and the app worked fine. 

    I'm able to fix it by placing a try catch around that piece.


    • Edited by Sal_S Tuesday, April 15, 2014 2:18 AM
    Tuesday, April 15, 2014 1:32 AM

All replies

  • Does it run under the 8.1 emulator?
    Tuesday, April 15, 2014 2:17 AM
  • Does it run under the 8.1 emulator?
    No it behaves the exact same way in the emulator
    Tuesday, April 15, 2014 2:22 AM