Here are the instructions for creating example app:
- Create a new MyAndroidPush app using the blank template, as follows, and go to the MyAndroidPush folder:
$ ionic start MyAndroidPush blank $ cd MyAndroidPush
- Install the Cordova plugin and Ionic native wrapper for OneSignal:
$ ionic cordova plugin add onesignal-cordova-plugin$ npm install --save @ionic-native/onesignal
- Open and edit ./src/app/app.module.ts with the following content:
import { BrowserModule } from '@angular/platform-browser';import { ErrorHandler, NgModule } from '@angular/core';import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';import { SplashScreen } from '@ionic-native/splash-screen';import { StatusBar } from '@ionic-native/status-bar'; ...