locked
Store validation error: 3203: 8.1 apps can’t have background tasks for location tracking (Geolocator)

    Question

  • This pertains to Geolocation in Silverlight 8.1 apps.

    The app works fine when I test it, but when I submit it to the store, I get this error:
    3203: Windows Phone 8.1 apps can’t have background tasks for location tracking. Remove them and then try submitting again.

    However, I am following the Geolocation sample at the below URL. I instantiate the (private) geolocator in the UI thread (on a PhoneApplicationPage) on OnNavigatedTo and subscribe to PositionChanged, and unsubscribe and set the geolocator to null in OnNavigatedFrom. I have no other Geolocators in my code.
    https://code.msdn.microsoft.com/windowsapps/Geolocation-2483de66

    Can you give more clarity as to what this validation error may be concerned about? This app was converted from an 8.0 app (where this was not a problem), but I have no need for background execution (when the app does not have focus) and having it disabled would be fine.

    Wednesday, December 03, 2014 7:44 AM

Answers

  • I discovered the cause of the problem. The upgrade from 8 to Silverlight 8.1 does not clean up WMAppManifest.xml. I had a lingering block that was not visible in UI, but caused this validation failure:

        <Tasks>
          <DefaultTask Name="_default" NavigationPage="MainPage.xaml">
            <BackgroundExecution>
              <ExecutionType Name="LocationTracking" />
            </BackgroundExecution>
          </DefaultTask>
        </Tasks>

    • Marked as answer by George Fisher Saturday, December 06, 2014 8:38 AM
    Saturday, December 06, 2014 8:38 AM

All replies

  • see: http://msdn.microsoft.com/library/windows/apps/dn642084%28v=vs.105%29.aspx

    Continuous background execution is not supported for Silverlight 8.1 apps

    Windows Phone 8 apps can continue to run in the background after the user navigates away from the app under certain conditions. This feature is not available for Silverlight 8.1 apps. If you need this feature, you should continue to use a Windows Phone 8 app. For more information, see Running location-tracking apps in the background for Windows Phone 8.


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。


    Wednesday, December 03, 2014 9:01 AM
  • I am familiar with the above documentation (http://msdn.microsoft.com/library/windows/apps/dn642084%28v=vs.105%29.aspx), but as I mentioned, I am not running a background action, I am subscribing to Geolocation events in the UI thread when the app is activated. There is no need for background Geolocation. Are you saying Geolocation is not supported at all? (this is contrary to this article: http://blogs.msdn.com/b/thunbrynt/archive/2014/04/22/windows-phone-8-1-for-developers-geolocation-and-geofencing.aspx and this one http://www.silverlightshow.net/items/Windows-8.1-Location-aware-apps-Part-1-What-s-new-in-geolocation.aspx)
    Thursday, December 04, 2014 2:30 AM
  • I discovered the cause of the problem. The upgrade from 8 to Silverlight 8.1 does not clean up WMAppManifest.xml. I had a lingering block that was not visible in UI, but caused this validation failure:

        <Tasks>
          <DefaultTask Name="_default" NavigationPage="MainPage.xaml">
            <BackgroundExecution>
              <ExecutionType Name="LocationTracking" />
            </BackgroundExecution>
          </DefaultTask>
        </Tasks>

    • Marked as answer by George Fisher Saturday, December 06, 2014 8:38 AM
    Saturday, December 06, 2014 8:38 AM
  • Sorry, but sticking with WP 8.0 is not a solution, it's a cop out. I need features of 8.1 for my app, but I also need background location tracking so that I can reliably record a tracklog and update the odometer. Please Microsoft listen to your developers, and allow this in 8.1, otherwise its really game over for using WP 8.1 for any apps which want to log a track, like my hiking app, Handy GPS.

    Please vote and/or post your feeling about this here:

    https://wpdev.uservoice.com/forums/110705-dev-platform/suggestions/6102994-background-location-tracking-in-windows-phone-8-1

    • Edited by Anthony3142 Monday, March 09, 2015 11:07 PM
    Monday, March 09, 2015 11:02 PM