KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

GCMMessage.Builder Class

Builder of GCMMessage.

Syntax

public class GCMMessage.Builder

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Methods

Build () : GCMMessage
Build and return GCMMessage.
Enable (bool) : GCMMessage.Builder
Set flag of GCM delivery If omit calling this method, GCM delivery is enabled. If KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableGCM(bool), This property would be overwritten.
WithCollapseKey (string) : GCMMessage.Builder
Build with collapse key. Send the message with collapse key which is an arbitrary string that is used to collapse a group of like messages when the device is offline, so that only the last message gets sent to the client. Corresponding to GCM's 'collapse_key'
WithDelayWhileIdle (bool) : GCMMessage.Builder
Build with the flag of delay while device is idle. Corresponding to GCM's 'delay_while_idle'.
WithGCMData (GCMData) : GCMMessage.Builder
Create a builder with the data that will be sent only to android-GCM devices. Corresponding to GCM's "data" The data specified here will be merged with the data specified on KiiPushMessage.BuildWith(KiiPushMessage.Data)
WithRestrictedPackageName (string) : GCMMessage.Builder
Send restricted package name which is a string containing the package name of the application. When set, messages will only be sent to registration IDs that match the package name. Corresponding to GCM's "restricted_package_name"
WithTimeToLive (int) : GCMMessage.Builder
Indicates how long (in seconds) the message should be kept on GCM storage if the device is offline. Corresponding to GCM's "time_to_live" property.

Member Details

Build Method

Build and return GCMMessage.

Syntax

public GCMMessage Build ()

Returns

GCMMessage

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Enable Method

Set flag of GCM delivery If omit calling this method, GCM delivery is enabled. If KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableGCM(bool), This property would be overwritten.

Syntax

public GCMMessage.Builder Enable (bool enabled)

Parameters

enabled
if true message would be delivered via GCM. If false, this message would not delivered thru GCM.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithCollapseKey Method

Build with collapse key. Send the message with collapse key which is an arbitrary string that is used to collapse a group of like messages when the device is offline, so that only the last message gets sent to the client. Corresponding to GCM's 'collapse_key'

Syntax

public GCMMessage.Builder WithCollapseKey (string collapseKey)

Parameters

collapseKey
Arbitrary string that is used as collapse key.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithDelayWhileIdle Method

Build with the flag of delay while device is idle. Corresponding to GCM's 'delay_while_idle'.

Syntax

public GCMMessage.Builder WithDelayWhileIdle (bool delayWhileIdle)

Parameters

delayWhileIdle
If true, the message will not be sent immediately if the device is idle.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithGCMData Method

Create a builder with the data that will be sent only to android-GCM devices. Corresponding to GCM's "data" The data specified here will be merged with the data specified on KiiPushMessage.BuildWith(KiiPushMessage.Data)

Syntax

public GCMMessage.Builder WithGCMData (GCMData data)

Parameters

data
Data.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithRestrictedPackageName Method

Send restricted package name which is a string containing the package name of the application. When set, messages will only be sent to registration IDs that match the package name. Corresponding to GCM's "restricted_package_name"

Syntax

public GCMMessage.Builder WithRestrictedPackageName (string restrictedPackageName)

Parameters

restrictedPackageName
Restricted package name.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithTimeToLive Method

Indicates how long (in seconds) the message should be kept on GCM storage if the device is offline. Corresponding to GCM's "time_to_live" property.

Syntax

public GCMMessage.Builder WithTimeToLive (int timeToLive)

Parameters

timeToLive
time(in seconds).

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0