Share via


GooglePushMessage Class

 

The GooglePushMessage helps generating a notification payload targeting Google Cloud Messaging for Chrome (GCM). Notifications can be sent using the PushClient class which is available from the ApiServices class.

Namespace:   Microsoft.WindowsAzure.Mobile.Service
Assembly:  Microsoft.WindowsAzure.Mobile.Service (in Microsoft.WindowsAzure.Mobile.Service.dll)

Inheritance Hierarchy

System.Object
  System.Collections.Generic.Dictionary<TKey, TValue>
    Microsoft.WindowsAzure.Mobile.Service.GooglePushMessage

Syntax

[SerializableAttribute]
public class GooglePushMessage : Dictionary<string, object>, IPushMessage
[SerializableAttribute]
public ref class GooglePushMessage : Dictionary<String^, Object^>, 
    IPushMessage
[<SerializableAttribute>]
type GooglePushMessage = 
    class
        inherit Dictionary<string, Object>
        interface IPushMessage
    end
<SerializableAttribute>
Public Class GooglePushMessage
    Inherits Dictionary(Of String, Object)
    Implements IPushMessage

Constructors

Name Description
System_CAPS_pubmethod GooglePushMessage()

Initializes a new instance of the GooglePushMessage class enabling creation of a notification message targeting Google Cloud Messaging for Chrome (GCM).Set the appropriate properties on the message and submit through the PushClient

System_CAPS_pubmethod GooglePushMessage(IDictionary<String, String>, Nullable<TimeSpan>)

Initializes a new instance of the GooglePushMessage class with a given set of data parameters and an optional timeToLive.

System_CAPS_protmethod GooglePushMessage(SerializationInfo, StreamingContext)

Initializes a new instance of the GooglePushMessage class with the specified serialization information and streaming context.

Properties

Name Description
System_CAPS_pubproperty CollapseKey

A collapse key is an arbitrary string that is used to collapse a group of like messages when the device is offline, so that only the most recent message gets sent to the client. For example, "New mail", "Updates available", and so on.

System_CAPS_pubproperty Comparer

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubproperty Count

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubproperty Data

A collection or name-value properties to include in the message. Properties must be simple types, i.e. they can not be nested.

System_CAPS_pubproperty DelayWhileIdle

Indicates whether the message should be delivered while the device is idle.

System_CAPS_pubproperty Item[TKey]

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubproperty JsonPayload

As an alternative to building the notification by initializing the GooglePushMessage directly, it is possible to provide a complete JSON representation which will be sent to the Notification Hub unaltered.

System_CAPS_pubproperty Keys

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubproperty TimeToLiveInSeconds

The Time to Live (TTL) property lets the sender specify the maximum lifespan of a message. The value of this parameter must be a duration from 0 to 2,419,200 seconds, and it corresponds to the maximum period of time for which GCM will store and try to deliver the message. Requests that don't contain this field default to the maximum period of 4 weeks.

System_CAPS_pubproperty Values

(Inherited from Dictionary<TKey, TValue>.)

Methods

Name Description
System_CAPS_pubmethod Add(TKey, TValue)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod Clear()

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod ContainsKey(TKey)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod ContainsValue(TValue)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetEnumerator()

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetObjectData(SerializationInfo, StreamingContext)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod OnDeserialization(Object)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod Remove(TKey)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubmethod ToString()

Provides a JSON encoded representation of this GooglePushMessage(Overrides Object.ToString().)

System_CAPS_pubmethod TryGetValue(TKey, TValue)

(Inherited from Dictionary<TKey, TValue>.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue>)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue>)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[], Int32)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue>)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICollection.CopyTo(Array, Int32)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IDictionary.Add(Object, Object)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IDictionary.Contains(Object)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IDictionary.GetEnumerator()

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IDictionary.Remove(Object)

(Inherited from Dictionary<TKey, TValue>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

(Inherited from Dictionary<TKey, TValue>.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsAzure.Mobile.Service Namespace

Return to top