0.0.10 • Published 5 years ago

@egoi/push-ionic v0.0.10

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

Installation

Basic setup

1. Install the plugin using NPM or Yarn
  npm install @egoi/push-ionic
  yarn add @egoi/push-ionic
2. Register the app and the device
import { EgoiPushIonicService } from '@egoi/push-ionic';

export class NotificationsService {
  constructor(
      private egoiPushService: EgoiPushIonicService
  )

  registerEgoiPush() {
    this.egoiPushService.register({
      apiKey: 'your api here',
      appId: 'your app id here',
      os: 'android|ios',
      twoStepsField: 'the field to set on new/edit register (e.g. id, email) (optional)',
      twoStepsValue: 'the field value to set on new/edit register (optional)', 
      deepLinkHandler: 'link handler to redirect the user on notification open (optional)',
      notificationHandler: 'notification handler to work with the notification content (optional)'
    });
  }

  registerDevice(user) {
    this.egoiPushService.registerDevice('email', user.email).then((response) => {
      // proccess the resolve
    });
  }
}
0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago