Using background agents on Windows Phone 8.1 to save user location after device reset -


so, problem i'm trying solve using background agents: need continue on logging user location when goes offline in background after device reset (thing of running app context).

to try , solve i've used periodic task this approach word-for-word, did work in debug mode. but, left phone unattended overnight i've had 1 log user after half hour of leaving phone. no further entries have been recorded (have in mind i've used test log entry , not real gps signal, means triggered simple log writing test purposes).

am missing something? not valid solution problem. if so, please provide reason this, unable find documentation speaks of sort of limitation.

the os on wp 8.1 has strict rules when background agent run , how long. once every 30 minutes consistent msdn documentation here , observations. if code correctly written should see 1 entry approximately each 30 minutes. if write store application tablet you'd have more options. there, os behavior vis-à-vis of background agents little bit more lax (some of not documented). since targeting win phone not going go details regarding background agents on tablet.

i not sure if work use case 1 thing comes mind have user keep app running. can prevent phone going low power state , suspend app (like navigation app does). see phoneapplicationservice.useridledetectionmode. if make sure make screen black (or black) , use sleeps (await task.delay(...)) appropriately in order conserve battery.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -