A utility class for sending and receiving push notifications.
Inheritance Hierarchy
ParseParsePush
Namespace: Parse
Assembly: Parse.WinRT (in Parse.WinRT.dll) Version: 1.5.5.0 (1.5.5.0)
Syntax
The ParsePush type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ParsePush |
Creates a push which will target every device. The Data field must be set before calling SendAsync.
|
Properties
Name | Description | |
---|---|---|
Alert |
A conveninence method which sets Data to a dictionary with alert as its only field. Equivalent to
Data = new Dictionary<string, object> {{"alert", alert}}; | |
Channels |
A short-hand to set a query which only discriminates on the channels to which a device is subscribed.
This is shorthand for:
var push = new Push(); push.Query = ParseInstallation.Query.WhereKeyContainedIn("channels", channels); | |
Data |
The contents of this push. Some keys have special meaning. A full list of pre-defined
keys can be found in the Parse Push Guide. The following keys affect WinRT devices.
Keys which do not start with x-winrt- can be prefixed with x-winrt- to specify an
override only sent to winrt devices.
alert: the body of the alert text.
title: The title of the text.
x-winrt-payload: A full XML payload to be sent to WinRT installations instead of
the auto-layout.
This should not be used in tandem with Alert.
| |
Expiration |
The time at which this push will expire. This should not be used in tandem with ExpirationInterval.
| |
ExpirationInterval |
The time from initial schedul when this push will expire. This should not be used in tandem with Expiration.
| |
Query |
An installation query that specifies which installations shoudl receive
this push.
This should not be used in tandem with Channels.
|
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PushJson(ILaunchActivatedEventArgs) |
Helper method to extract the full Push JSON provided to Parse, including any
non-visual custom information. Overloads exist for all data types which may be
provided by Windows, I.E. LaunchActivatedEventArgs and PushNotificationReceivedEventArgs.
Returns an empty dictionary if this push type cannot include non-visual data or
this event was not triggered by a push.
| |
PushJson(PushNotificationReceivedEventArgs) |
Helper method to extract the full Push JSON provided to Parse, including any
non-visual custom information. Overloads exist for all data types which may be
provided by Windows, I.E. LaunchActivatedEventArgs and PushNotificationReceivedEventArgs.
Returns an empty dictionary if this push type cannot include non-visual data or
this event was not triggered by a push.
| |
SendAlertAsync(String) |
Pushes a simple message to every device. This is shorthand for:
var push = new ParsePush(); push.Data = new Dictionary<string, object>{{"alert", alert}}; return push.SendAsync(); | |
SendAlertAsync(String, ParseQueryParseInstallation) |
Pushes a simple message to every device matching the target query. This is shorthand for:
var push = new ParsePush(); push.Query = query; push.Data = new Dictionary<string, object>{{"alert", alert}}; return push.SendAsync(); | |
SendAlertAsync(String, IEnumerableString) |
Pushes a simple message to every device subscribed to any of channels. This is shorthand for:
var push = new ParsePush(); push.Channels = channels; push.Data = new Dictionary<string, object>{{"alert", alert}}; return push.SendAsync(); | |
SendAlertAsync(String, String) |
Pushes a simple message to every device subscribed to channel. This is shorthand for:
var push = new ParsePush(); push.Channels = new List<string> { channel }; push.Data = new Dictionary<string, object>{{"alert", alert}}; return push.SendAsync(); | |
SendAsync |
Request a push to be sent. When this task completes, Parse has successfully acknowledged a request
to send push notifications but has not necessarily finished sending all notifications
requested. The current status of recent push notifications can be seen in your Push Notifications
console on http://parse.com
| |
SendAsync(CancellationToken) |
Request a push to be sent. When this task completes, Parse has successfully acknowledged a request
to send push notifications but has not necessarily finished sending all notifications
requested. The current status of recent push notifications can be seen in your Push Notifications
console on http://parse.com
| |
SendDataAsync(IDictionaryString, Object) |
Pushes an arbitrary payload to every device. This is shorthand for:
var push = new ParsePush(); push.Data = data; return push.SendAsync(); | |
SendDataAsync(IDictionaryString, Object, ParseQueryParseInstallation) |
Pushes an arbitrary payload to every device matching target. This is shorthand for:
var push = new ParsePush(); push.Query = query push.Data = data; return push.SendAsync(); | |
SendDataAsync(IDictionaryString, Object, IEnumerableString) |
Pushes an arbitrary payload to every device subscribed to any of channels. This is shorthand for:
var push = new ParsePush(); push.Channels = channels; push.Data = data; return push.SendAsync(); | |
SendDataAsync(IDictionaryString, Object, String) |
Pushes an arbitrary payload to every device subscribed to channel. This is shorthand for:
var push = new ParsePush(); push.Channels = new List<string> { channel }; push.Data = data; return push.SendAsync(); | |
SubscribeAsync(IEnumerableString) |
Subscribe the current installation to these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.AddRangeUniqueToList("channels", channels); installation.SaveAsync(); | |
SubscribeAsync(String) |
Subscribe the current installation to this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.AddUniqueToList("channels", channel); installation.SaveAsync(); | |
SubscribeAsync(IEnumerableString, CancellationToken) |
Subscribe the current installation to these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.AddRangeUniqueToList("channels", channels); installation.SaveAsync(cancellationToken); | |
SubscribeAsync(String, CancellationToken) |
Subscribe the current installation to this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.AddUniqueToList("channels", channel); installation.SaveAsync(cancellationToken); | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UnsubscribeAsync(IEnumerableString) |
Unsubscribe the current installation from these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.RemoveAllFromList("channels", channels); installation.SaveAsync(); | |
UnsubscribeAsync(String) |
Unsubscribe the current installation from this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.Remove("channels", channel); installation.SaveAsync(); | |
UnsubscribeAsync(IEnumerableString, CancellationToken) |
Unsubscribe the current installation from these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.RemoveAllFromList("channels", channels); installation.SaveAsync(cancellationToken); | |
UnsubscribeAsync(String, CancellationToken) |
Unsubscribe the current installation from this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation; installation.Remove("channels", channel); installation.SaveAsync(cancellationToken); |
Events
Name | Description | |
---|---|---|
ParsePushNotificationReceived |
An event fired when a push notification is received.
| |
PushNotificationReceived |
An event fired when a push notification of any type (i.e. toast, tile, badge, or raw) is
received.
| |
ToastNotificationReceived |
An event fired when a toast notification is received.
|
See Also