Interface PushNotification

This plugin allows to receive push notifications. The Android implementation uses Google's GCM (Google Cloud Messaging) service, whereas the iOS version is based on Apple APNS Notifications

Index

Methods

Methods

public register(successCallback: (registrationId: string) => void, errorCallback: (error: any) => void, registrationOptions: RegistrationOptions)

Registers as push notification receiver.

Parameters

  • successCallback: (registrationId: string) => void

    Called when a plugin method returns without error.

  • errorCallback: (error: any) => void

    Called when the plugin returns an error.

  • registrationOptions: RegistrationOptions

    Options for registration process.

public setApplicationIconBadgeNumber(successCallback: (result: any) => void, errorCallback: (error: any) => void, badgeCount: number)

Sets the badge count visible when the app is not running. iOS only.

Parameters

  • successCallback: (result: any) => void

    Called when a plugin method returns without error.

  • errorCallback: (error: any) => void

    Called when the plugin returns an error.

  • badgeCount: number

    An integer indicating what number should show up in the badge. Passing 0 will clear the badge.

public unregister(successCallback: (result: any) => void, errorCallback: (error: any) => void)

Unregisters as push notification receiver.

Parameters

  • successCallback: (result: any) => void

    Called when a plugin method returns without error.

  • errorCallback: (error: any) => void

    Called when the plugin returns an error.