Share via


BackgroundAgent.Abort Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Informs the operating system that the agent is unable to perform its intended task and that it should not be launched again until the foreground application mitigates the blocking issue and reenables the agent.

Namespace:  Microsoft.Phone
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Protected Sub Abort
protected void Abort()

Remarks

If the background agent is an AudioPlayerAgent or a AudioStreamingAgent, calling Abort cancels audio playback and releases the media queue resources.

If the background agent is a ScheduledTaskAgent, calling Abort will set the IsScheduled property of the associated ScheduledTask object to false. The operating will not launch the agent again until it has been reenabled by the application.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

BackgroundAgent Class

Microsoft.Phone Namespace