Questions tagged [background-agents]

Background agents are a facility in Windows Phone 7/8 API that lets you run some processing when your application is not in the foreground.

Background agents are a facility in Windows Phone 7/8 that lets you run code when your application is not in the foreground.

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202942(v=vs.105).aspx

92 questions
1
vote
2 answers

How to use PlayStateChanged event of BackgroundAudioPlayer?

In my app, I want to be know when play state changes. But I don't know how to subscribe to the event and get the current state. How can I do that? thanks. I see an statement in MSDN, but couldn't understand what it means and how to implement it: In…
1
vote
1 answer

Windows phone: using periodic agent

I have an Windows Phone markeplace app. Users reports that app sometimes crashes at Windows Phone 8. Here is my data from windows phone dev center report: Problem funciton: Microsoft.Phone.Scheduler.SystemNotificationInterop.CheckHr Exception…
Karloss
  • 817
  • 3
  • 9
  • 27
1
vote
2 answers

Does WP7 background agent have to be in a separate DLL?

Reading up on background agents in Windows Phone. All guides say I should start with creating a new project specifically for the agent. Is that a requirement? Cite place. The bigger question is - how does the framework find the class that implements…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
1
vote
1 answer

WriteableBitmap or PNG writer memory leak?

I am building a small Windows Phone 8 app (a Christian-Orthodox calendar) which has a background agent which should update the live tile. The app will require access to the contacts in the phone so I opted out of internet access so backend tile…
1
vote
1 answer

How to check from scheduled agent if the foreground app is running

Is it possible to check if the foreground app is running from a scheduled task? In my case, it duplicates a functionality of the app - so I could skip that part in the agent to preserve resources. Thanks
1
vote
1 answer

GeoCoordinateWatcher in BackgroundAgent WP 7.5

I want to ask you, if I understand it. When I create GeoCoordinateWathcer in method OnInvoke of BackgroundAgent like this: protected override void OnInvoke(ScheduledTask task) { _watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High) …
Pupino
  • 81
  • 8
1
vote
1 answer

Simultaneous Lotus notes server-side agents

In my Lotus Notes workflow application, I have a scheduled server agent (every five minutes). When user's act on a document, a server-side agent is also triggered (this agent modifies the said document, server-side). In the production, we are…
John Bautista
  • 1,480
  • 3
  • 29
  • 60
1
vote
1 answer

Windows phone calculate distance

I am working on windows phone app. public void watcher_PositionChanged(object sender, GeoPositionChangedEventArgs e) {} Does this event work on every position change when application run in background not in foreground? I want to calculate traveled…
1
vote
1 answer

How to use mutex for a database between background agent and foreground app?

How to use mutex for a database sync between background agent and foreground app? Can any one please help me to learn both of these for wp7(implementable code for wp7). Please try to add some code snippets that help me to understand the techniques…
1
vote
2 answers

How can you update location data in Windows Phone in the background?

I just read that while Windows Phone 7.5 background tasks can poll for a location, they don't actually poll real-time from the GPS but rather the location API calls return a system-cached position that's only updated once every fifteen minutes. That…
0
votes
2 answers

How to set the expiration of a background task agent in windows phone 7 to never expire?

I am designing an application where the user selects the option to update his live tile and can forget about the app. Once he picks the option to update, I kick off a background task agent. But it looks like as per msdn, the background task agent…
Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106
0
votes
1 answer

Windows Phone 7 BackgroundAudioPlayer Buffering Progress always returning 0 or 1

Actually I'm developing a live streaming app for WP7 and I'm facing a problem. I'm trying to update the UI so the user can get live information about the buffering progress but the BackgroundAudioPlayer.Instance.BufferingProgress is not reporting…
Waleed
  • 3,105
  • 2
  • 24
  • 31
0
votes
2 answers

Multithreaded BackgroundAgent?

I'm writing a BackgroundAgent for my WP7 app that periodically downloads an image from the internet, modifies it, then updates the live tile with it. I've found that loading the bitmap image is asynchronous, and requires registering the ImageOpened…
0
votes
2 answers

How to detect if the main app is running from a background agent

I'm working on a WP7.5 app where I use a background agent to update tiles in the background (when the app is not running). In the OnInvoke method of the agent, is there a way to know if the main app is currently running ? I'd like to detect that…
japf
  • 6,598
  • 3
  • 33
  • 30
0
votes
1 answer

Background Agent in UWP

In Windows 8.1 and WP 8.1, there was a slight difference between the way Background Agent used to work: WinRT: In WinRT, in most cases the OS will not terminate the background agent when the background agent exhausts its quota. …
tavier
  • 1,744
  • 4
  • 24
  • 53