IBMMobilePush.Forms

Forms.AttributeOperation

Attribute operation.

Forms.RegistrationUpdatedDelegate

Registration updated delegate.

Forms.AttributeResultsDelegate

Attribute queue results delegate.

Forms.EventResultsDelegate

Event queue results delegate.

Forms.InboxResultsDelegate

Inbox messages results delegate.

Forms.IIBMMobilePush

IBM Mobile Push interface

Forms.InAppManager

This class stores, manages and executes InApp messages.

Properties

Instance

This property returns a singleton object for the manager.

Methods

ExecuteRulesAsync(System.Collections.Generic.List{System.String})

This method will find the next InApp message with the specified rule to be displayed and execute it.

Parameters

rules: A list of rules to look for.

frame: The current apps Frame object to insert the message on to.

DeleteInAppMessage(IBMMobilePush.Forms.InAppMessage)

This method will delete an InApp message before it is expired or overviewed

Parameters

message: Message to be deleted.

Forms.InAppMessage

Class representing a single InAppMessage

Properties

Id

Unique primary key for identifying InAppMessages

Template

Template name to be used to display message.

MaxViews

Maximum number of views for the message.

NumViews

The number of times the message has been shown to the user.

TriggerTimestamp

The Unix timestamp that the message should start showing up.

TriggerDateString

TriggerTimestamp in ISO8601 format

TriggerDate

TriggerTimestamp in DateTimeOffset format

Attribution

The campaign name associated with this InApp message

ContentString

Json formatted string representing rich content, template developer defined.

Rules

JsonArray of Rules for this message.

Content

This property returns the Content property in the form of a JsonObject.

Unique primary key for identifying InAppMessages

Gets or sets the in app message identifier.

The in app message identifier.

Gets or sets the in app rule identifier.

The in app rule identifier.

Methods

IsTriggered

This method returns true if the InAppMessage is triggered, false otherwise.

Return Value

Return Value:

Constructor: Forms.InAppMessage

Empty default constructor

Constructor: Forms.InAppMessage(Newtonsoft.Json.Linq.JObject)

JsonObject to InAppMessage parser/constructor.

Parameters

jsonObject:

Constructor: Forms.InAppMessage

Initializes a new instance of the See: T:IBMMobilePush.Forms.InAppMessageRule class.

Constructor: Forms.InAppMessage(System.Int32,System.Int32)

Initializes a new instance of the See: T:IBMMobilePush.Forms.InAppMessageRule class.

Parameters

inAppMessageId: In app message identifier.

inAppRuleId: In app rule identifier.

Forms.InAppTemplateRegistry

Class to register InApp templates with.

Properties

Instance

This property returns a singleton object for the registry.

Methods

RegisterTemplate(IBMMobilePush.Forms.InAppTemplate,System.String)

Register template handler with registry to be used to display InboxMessage previews and messages.

Parameters

template: Template handler.

templateName: Template name.

RegisteredTemplate(System.String)

Retrieve registered handler for template name.

Parameters

templateName: Template name.

Return Value

Return Value: InboxTemplate registered for specified template name.

Forms.InboxMessage

Inbox message.

Properties

InboxMessageId

Gets or sets the inbox message identifier.

The inbox message identifier.

RichContentId

Gets or sets the rich content identifier.

The rich content identifier.

ExpirationDate

Gets or sets the expiration date.

The expiration date.

SendDate

Gets or sets the send date.

The send date.

TemplateName

Gets or sets the name of the template.

The name of the template.

Attribution

Gets or sets the attribution or campaign name.

The attribution.

IsRead

Gets or sets a value indicating whether this instance is read.

true if this instance is read; otherwise, false.

IsDeleted

Gets or sets a value indicating whether this instance is deleted.

true if this instance is deleted; otherwise, false.

Methods

Constructor: Forms.InboxMessage

Initializes a new instance of the See: T:IBMMobilePush.Forms.InboxMessage class.

Forms.RichContent

Rich content of Inbox Message.

Properties

RichContentId

Gets or sets the rich content identifier.

The rich content identifier.

Content

Gets or sets the content.

The content.

Methods

Constructor: Forms.RichContent

Initializes a new instance of the See: T:IBMMobilePush.Forms.RichContent class.

Forms.IInboxTemplate

Interface for inbox templates.

Forms.PushAction

Push action base abstract class.

Methods

HandleAction(Newtonsoft.Json.Linq.JObject,Newtonsoft.Json.Linq.JObject,System.String,System.Int32)

Handles the action.

Parameters

action: Action as a JSON Object.

payload: Entire payload as a JSON Object.

attribution: Attribution or campaign name of sending push.

id: Push identifier used only in Android to remove a notification already sent.

Forms.SDK

IBMMobilePush SDK Main forms interface class.

Fields

loggingLevel

The logging level for C# code. Not currently connected to specified logging level in MceConfig.json.

Properties

RegistrationUpdated

Gets or sets the registration updated callback delegate.

The registration updated.

AttributeQueueResults

Gets or sets the attribute queue callback delegate.

The attribute queue results.

EventQueueResults

Gets or sets the event queue result delegate.

The event queue results.

Badge

Gets or sets the badge.

The badge.

Icon

Gets or sets the icon used in pushed messages.

The icon.

InboxMessagesUpdate

Gets or sets the inbox messages update callback delegate.

The inbox messages update.

Methods

UserId

UserId for current user.

Return Value

Return Value: UserId

ChannelId

ChannelId for the current device.

Return Value

Return Value: ChannelId

AppKey

Application AppKey currently in use.

Return Value

Return Value: AppKey

Version

Native SDK Version number.

SetUserAttribute``1(System.String,``0,IBMMobilePush.Forms.AttributeResultsDelegate)

Replace current user attributes with specified attribute.

Parameters

key: Key.

value: Value.

callback: Callback.

UpdateUserAttribute``1(System.String,``0,IBMMobilePush.Forms.AttributeResultsDelegate)

Add or replace specified user attribute.

Parameters

key: Key.

value: Value.

callback: Callback.

DeleteUserAttribute(System.String,IBMMobilePush.Forms.AttributeResultsDelegate)

Delete specified user attribute.

Parameters

key: Key.

callback: Callback.

SetChannelAttribute``1(System.String,``0,IBMMobilePush.Forms.AttributeResultsDelegate)

Replace current channel attributes with specified attribute.

Parameters

key: Key.

value: Value.

callback: Callback.

UpdateChannelAttribute``1(System.String,``0,IBMMobilePush.Forms.AttributeResultsDelegate)

Add or replace specified channel attribute.

Parameters

key: Key.

value: Value.

callback: Callback.

DeleteChannelAttribute(System.String,IBMMobilePush.Forms.AttributeResultsDelegate)

Delete specified channel attribute.

Parameters

key: Key.

callback: Callback.

QueueSetUserAttribute``1(System.String,``0)

Queue replacement of current user attributes with specified attribute.

Parameters

key: Key.

value: Value.

QueueUpdateUserAttribute``1(System.String,``0)

Queue adding or replacing specified user attribute.

Parameters

key: Key.

value: Value.

QueueDeleteUserAttribute(System.String)

Queue removal of sepcified user attribute.

Parameters

key: Key.

QueueSetChannelAttribute``1(System.String,``0)

Queue replacement of current channel attributes with specified attribute.

Parameters

key: Key.

value: Value.

QueueUpdateChannelAttribute``1(System.String,``0)

Queue adding or replacing specified channel attribute.

Parameters

key: Key.

value: Value.

QueueDeleteChannelAttribute(System.String)

Queue removal of sepcified channel attribute.

Parameters

key: Key.

QueueAddEvent(System.String,System.String,System.DateTimeOffset,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Boolean)

Add event to event queue to be sent to the server.

Parameters

name: Name.

type: Type.

timestamp: Timestamp.

attribution: Attribution.

attributes: Attributes.

flush: If set to true flush.

AddEvent(System.String,System.String,System.DateTimeOffset,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},IBMMobilePush.Forms.EventResultsDelegate)

Send event to server.

Parameters

name: Name.

type: Type.

timestamp: Timestamp.

attribution: Attribution.

attributes: Attributes.

callback: Callback.

FlushEventQueue

Flushs the queued event queue to server.

IsMceRegistered

Query if SDK has registered with MCE server.

Return Value

Return Value: true if registered with MCE; otherwise, false.

IsProviderRegistered

Query if device has registered with push provider.

Return Value

Return Value: true if this device has registered with push provider; otherwise, false.

IsRegistered

Query if device has registered with push provider and SDK is registered with MCE.

Return Value

Return Value: true if this instance is registered with MCE and Push Provider; otherwise, false.

RegisterAction(System.String,IBMMobilePush.Forms.PushAction)

Registers a custom action handler.

Parameters

name: Name.

handler: Handler.

PhoneHome

Executes SDK phone home immediately, useful after login / user merge.

SyncInboxMessages

Syncs the inbox messages with server.

FetchRichContent(System.String)

Fetchs the RichContent for a specified richContentId.

Parameters

richContentId: Rich content identifier.

Return Value

Return Value: The rich content.

FetchInboxMessage(System.String,IBMMobilePush.Forms.InboxMessageResultsDelegate)

Fetchs the inbox message using a specified inboxMessageId.

Parameters

inboxMessageId: Inbox message identifier.

callback: Callback.

DeleteInboxMessage(IBMMobilePush.Forms.InboxMessage)

Deletes the specified inbox message.

Parameters

message: Message.

ReadInboxMessage(IBMMobilePush.Forms.InboxMessage)

Sets the read status to true for specified inbox message.

Parameters

message: Message.

FetchInboxMessageWithRichContentId(System.String,IBMMobilePush.Forms.InboxMessageResultsDelegate)

Fetchs the inbox message for the specified richContentId.

Parameters

richContentId: Rich content identifier.

callback: Callback.

FetchInboxMessages(System.Action{IBMMobilePush.Forms.InboxMessage[]},System.Boolean)

Fetchs the inbox messages from the database.

Parameters

completion: Completion.

ascending: If set to true ascending.

StatusBarHeight

Get current status bar height.

Return Value

Return Value: The bar height.

ScreenSize

Get current screen size.

Return Value

Return Value: The size.

GetConnection(System.String)

Get SQLite connection for specifed filename.

Parameters

filename: Filename.

Return Value

Return Value: The connection.

DeleteInAppMessage(IBMMobilePush.Forms.InAppMessage)

Deletes specified InApp message.

Parameters

inAppMessage: In app message.

ExecuteInAppRule(System.String[])

Execute next InApp message that has any of specified rules.

Parameters

rules: Rules.

RegisterInAppTemplate(System.String,IBMMobilePush.Forms.InAppTemplate)

Register an InApp template.

Parameters

templateName: Template name.

template: Template.

ExecuteAction(Newtonsoft.Json.Linq.JToken,System.String,System.String)

Executes the specified Action.

Parameters

action: Action.

attribution: Attribution.

source: Source.

ExecuteInboxAction(Newtonsoft.Json.Linq.JToken,System.String)

Executes the specified inbox action.

Parameters

action: Action.

attribution: Attribution.

ExecuteInAppAction(Newtonsoft.Json.Linq.JToken,System.String)

Executes the specfied InApp action.

Parameters

action: Action.

attribution: Attribution.

RegisterInboxTemplate(System.String,IBMMobilePush.Forms.IInboxTemplate)

Registers the specified inbox template handler for the specified name.

Parameters

templateName: Template name.

template: Template.

RegisteredInboxTemplate(System.String)

Return the registered template handler for the speicifed name.

Parameters

templateName: Template name.

Return Value

Return Value: The inbox template.

Forms.Database

Database base class.

Forms.ExpiringMessage

Base class for all messages that can expire after a specific time has passed (such as Inbox and InApp messages).

Properties

ExpirationTimestamp

The Unix timestamp that the message shouldn't show up after.

ExpirationDateString

ExpirationTimestamp in ISO8601 format

ExpirationDate

ExpirationTimestamp in DateTimeOffset format

Methods

IsExpired

This method returns true if the Message is expired, false otherwise.

Return Value

Return Value:

Forms.LogLevel

This enumerated type represents logging levels.

Fields

NONE

This value represents no logging.

ERROR

This value represents logging only error messages.

WARN

This value represents logging error and warning messages.

INFO

This value represents logging error, warning and info messages.

VERBOSE

This value represents all logging turned on.

Forms.Logging

Logging.

Methods

Error(System.String)

Error the specified message.

Parameters

message: Message.

Error(System.String,System.Exception)

Error the specified message and ex.

Parameters

message: Message.

ex: Ex.

Warn(System.String)

Warn the specified message.

Parameters

message: Message.

Warn(System.String,System.Exception)

Warn the specified message and ex.

Parameters

message: Message.

ex: Ex.

Info(System.String)

Info the specified message.

Parameters

message: Message.

Info(System.String,System.Exception)

Info the specified message and ex.

Parameters

message: Message.

ex: Ex.

Verbose(System.String)

Verbose the specified message.

Parameters

message: Message.

Verbose(System.String,System.Exception)

Verbose the specified message and ex.

Parameters

message: Message.

ex: Ex.