ParsePush ClassParse
A utility class for sending and receiving push notifications.
Inheritance Hierarchy

SystemObject
  ParseParsePush

Namespace: Parse
Assembly: Parse.WinRT (in Parse.WinRT.dll) Version: 1.5.5.0 (1.5.5.0)
Syntax

public class ParsePush

The ParsePush type exposes the following members.

Constructors

  NameDescription
Public methodParsePush
Creates a push which will target every device. The Data field must be set before calling SendAsync.
Top
Properties

  NameDescription
Public propertyAlert
A conveninence method which sets Data to a dictionary with alert as its only field. Equivalent to
Data = new Dictionary<string, object> {{"alert", alert}};
This should not be used in tandem with Data.
Public propertyChannels
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);
This cannot be used in tandem with Query.
Public propertyData
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.
Public propertyExpiration
The time at which this push will expire. This should not be used in tandem with ExpirationInterval.
Public propertyExpirationInterval
The time from initial schedul when this push will expire. This should not be used in tandem with Expiration.
Public propertyQuery
An installation query that specifies which installations shoudl receive this push. This should not be used in tandem with Channels.
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberPushJson(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.
Public methodStatic memberPushJson(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.
Public methodStatic memberSendAlertAsync(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();
Public methodStatic memberSendAlertAsync(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();
Public methodStatic memberSendAlertAsync(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();
Public methodStatic memberSendAlertAsync(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();
Public methodSendAsync
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
Public methodSendAsync(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
Public methodStatic memberSendDataAsync(IDictionaryString, Object)
Pushes an arbitrary payload to every device. This is shorthand for:
var push = new ParsePush();
push.Data = data;
return push.SendAsync();
Public methodStatic memberSendDataAsync(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();
Public methodStatic memberSendDataAsync(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();
Public methodStatic memberSendDataAsync(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();
Public methodStatic memberSubscribeAsync(IEnumerableString)
Subscribe the current installation to these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.AddRangeUniqueToList("channels", channels);
installation.SaveAsync();
Public methodStatic memberSubscribeAsync(String)
Subscribe the current installation to this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.AddUniqueToList("channels", channel);
installation.SaveAsync();
Public methodStatic memberSubscribeAsync(IEnumerableString, CancellationToken)
Subscribe the current installation to these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.AddRangeUniqueToList("channels", channels);
installation.SaveAsync(cancellationToken);
Public methodStatic memberSubscribeAsync(String, CancellationToken)
Subscribe the current installation to this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.AddUniqueToList("channels", channel);
installation.SaveAsync(cancellationToken);
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberUnsubscribeAsync(IEnumerableString)
Unsubscribe the current installation from these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.RemoveAllFromList("channels", channels);
installation.SaveAsync();
Public methodStatic memberUnsubscribeAsync(String)
Unsubscribe the current installation from this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.Remove("channels", channel);
installation.SaveAsync();
Public methodStatic memberUnsubscribeAsync(IEnumerableString, CancellationToken)
Unsubscribe the current installation from these channels. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.RemoveAllFromList("channels", channels);
installation.SaveAsync(cancellationToken);
Public methodStatic memberUnsubscribeAsync(String, CancellationToken)
Unsubscribe the current installation from this channel. This is shorthand for:
var installation = ParseInstallation.CurrentInstallation;
installation.Remove("channels", channel);
installation.SaveAsync(cancellationToken);
Top
Events

  NameDescription
Public eventStatic memberParsePushNotificationReceived
An event fired when a push notification is received.
Public eventStatic memberPushNotificationReceived
An event fired when a push notification of any type (i.e. toast, tile, badge, or raw) is received.
Public eventStatic memberToastNotificationReceived
An event fired when a toast notification is received.
Top
See Also

Reference