Home Reference Source
public class | source

MFPPush

This class represents a singleton MFPPush.

Method Summary

Public Methods
public

Retrieves all the subscriptions of the device

public

async getTags(): Promise<string[], Error>

Retrieves all the available tags of the application

public

hold()

Request MFPPush to stop delivering incoming push messages.

public

initialize(timeout: number)

Initializes the MFPPush instance

public

listen()

Request MFPPush to deliver incoming push messages.

public

Registers the device with the push service.

public

async subscribe(tags: Array): Promise<string[], Error>

Subscribes the device to the given tags

public

Unregisters the device from the push service.

public

async unsubscribe(tags: Array): Promise<string[], Error>

Unsubscribes the device from the given tags

Public Methods

public async getSubscriptions(): Promise<string[], Error> source

Retrieves all the subscriptions of the device

Return:

Promise<string[], Error>

public async getTags(): Promise<string[], Error> source

Retrieves all the available tags of the application

Return:

Promise<string[], Error>

public hold() source

Request MFPPush to stop delivering incoming push messages. After hold() is called, MFPPush will store the latest push message in private shared preference and deliver that message during the next MFPPush.listen().

public initialize(timeout: number) source

Initializes the MFPPush instance

Params:

NameTypeAttributeDescription
timeout number

Integer value that specifies time out for the push requests made to the MFP server

public listen() source

Request MFPPush to deliver incoming push messages.

public async registerDevice(options: object): Promise<string, Error> source

Registers the device with the push service.

Params:

NameTypeAttributeDescription
options object

Android notification options.

Return:

Promise<string, Error>

public async subscribe(tags: Array): Promise<string[], Error> source

Subscribes the device to the given tags

Params:

NameTypeAttributeDescription
tags Array

An array of string 'tags'

Return:

Promise<string[], Error>

public async unregisterDevice(): Promise<string, Error> source

Unregisters the device from the push service.

Return:

Promise<string, Error>

public async unsubscribe(tags: Array): Promise<string[], Error> source

Unsubscribes the device from the given tags

Params:

NameTypeAttributeDescription
tags Array

An array of string 'tags'

Return:

Promise<string[], Error>