OneSignal Push Notification

Last updated 8 months ago

Creating one signal app

Login or Signup in‚Äč

Add an app

Add you app name and click create

After that select platform and hit next:

After that you need to add Google Server API Key

Visit the Firebase Console and sign in with your Google account.

Press "CREATE NEW PROJECT" or select an existing one below.

Enter a project name and press "CREATE PROJECT".

Getting your Firebase Cloud Messaging token and Sender ID

Copy server key And sender Id And Add it in OneSignal app and click next

Select your target SDK PhoneGap, Cordova, ionic and hit next:

After that Copy App ID

And add App id And Sender Id (googleProjectId) in src/providers/service/config.ts file.

oneSignalAppId: any = '28195d62-44f6-4934-a7f0-1551g200eb20';
googleProjectId: any = '575406234046';

googleProjectId is Sender ID

After that Build apk and Subscribe at least one user by launching your app on mobile. Then you need to hit subscribe user and done here

Sending push notification from WordPress

Install OneSignal Push notification plugin and configure according to OneSignal official documents.

Add APP id and Rest API Key. Which you have created before Created in before

Go Push Notification menu and send notifications. You can send a notification to email id, pin code, city, state etc

You can send a notification when a new product is added in WooCommerce. One signal will automatically send notification on product publish