Jaa


RawNotification Class

Definition

Encapsulates the app-defined content of a raw notification (a push notification that does not involve UI). Its contents can be used in an app's background task, if the app has that capability, or otherwise consumed by the app and acted on as needed.

public ref class RawNotification sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class RawNotification final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RawNotification final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class RawNotification
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RawNotification
Public NotInheritable Class RawNotification
Inheritance
Object Platform::Object IInspectable RawNotification
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

A RawNotification object is obtained through the TriggerDetails property.

A background task that is intended to run in response to a notification must be registered with a PushNotificationTrigger. If it is not registered, the task will not run when a raw notification is received. For more info, see Raw notification overview.

Version history

Windows version SDK version Value added
1703 15063 ChannelId
1703 15063 Headers
2004 19041 ContentBytes

Properties

ChannelId

Gets the Channel ID of the raw notification.

Content

Gets the content of the raw notification as a string. This string specifies a background task associated with the app.

ContentBytes

Gets the content of the raw notification as an IBuffer.

Headers

Gets the raw header content from the notification.

Applies to

See also