locked
GeoFence + Background task + httpclient RRS feed

  • Question

  • Hi all

    I created a windows Phone 8.1 app (silverlight) which uses geofence to enable the user to execute a background task when the user enters a certain area. The idea is that when the user enters the area, the app is able to switch on a light using a json call. The problem is however that I am not able to use HTTPclient (pcl) in the background task. I constantly get the error  ID_CAP_NETWORKING is not defined in the manifest file. I checked the manifest file of my windows Phone app multiple times and it's there. The task is a windows runtime component which runs in a seperate proces on the windows Phone but that proces does not have a manifest file. Anyone knows how to solve this issue? Thanx!

    Thursday, September 25, 2014 8:37 PM

Answers

  • I don't know exactly what happend but when I rebuild the Background task and cleaned everything out, the problem was solved. Thanx anyway
    • Marked as answer by PSCNed Monday, September 29, 2014 9:42 AM
    Monday, September 29, 2014 9:42 AM

All replies

  • Do calls using the HTTPClient work from the main App? Can you insert a call there just for testing purposes.

    Did you add the ID_CAP_NETWORKING manually in the XML of the manifest file or did you use the editor? Is it possible that you have some kind of typo in the Manifest?

    Thursday, September 25, 2014 9:58 PM
  • I don't know exactly what happend but when I rebuild the Background task and cleaned everything out, the problem was solved. Thanx anyway
    • Marked as answer by PSCNed Monday, September 29, 2014 9:42 AM
    Monday, September 29, 2014 9:42 AM
  • I'm having the same issue. Cleaning doesn't help. Anyone know what the cause is and how to fix it?
    Friday, November 28, 2014 7:27 PM
  • Answered my own question too. I had 2 manifest files. One the app used before migration to 8.1 and Project.appmanifest.xml. ID_CAP_NETWORKING had been enabled in the old manifest file but not Project.appmanifest file. Enabling it and rebuilding the project fixed the issue.
    Friday, November 28, 2014 11:28 PM
  • Hi. I've got the same issue. Can you please write file names and what did you add?
    Wednesday, December 3, 2014 7:31 PM