How to integrate OneSignal push notifications?

How to integrate OneSignal push notifications?

Step 1 :

Use Firebase to generate Google server key, Go to (https://console.firebase.google.com/)


 

Step 2 :

Create a new project and enter the Project details

 

Step 3 :

Click the settings icon at the top left and select Project Settings, and select the Cloud Messaging tab.


 

Step 4 :

Copy the Server key and Sender ID


Step 5 :

Goto OneSignal site(https://onesignal.com/) and create an account if you haven’t already.


 

Step 6 :

        After login to One Signal account, click on add new app option.


Step 7 :

Next, type your app name.

  

 

Step 8 :

Select the Google Android (GCM) and click next 

 

Step 9 :

Now paste the copied the Server key and Sender ID from firebase

(Step 4) and click Save  


 

Step 10 :     

Next, select the target SDK for your app then click next 

 

 

Step 11 :

Next step copy the OneSignal App ID and click done. 

 

 

 

Step 12 :

Next Goto to the android Project and find the build. Gradle and change One Signal App ID in onesignal_app_id location.


 

Step 13 :

Next Goto to one Signal Dashboard and select your app.

 

 

 

Step 14 :

Then Select the Messaging Tab in the top.


 

 

Step 15 :

Then Select the New Push Option.


Step 16 : 

Then checked, Send to Subscribed Users

 

Step 17 :

Next Type the Message, In Title Box enter the Notification Title, In Message, Box enter the message what you need to send a message to User. 

You can send both normal Text Notification or Text with Image Notification to all users.

 

To Send Text with Image Notification

Click the Platform Setting option and Upload the Image using the Big Picture option.

Result:

Text with Image Notification 


                                 

 

 

 



    • Related Articles

    • Do you know? “Mobile Application” plays an important for your online business

      The future of business lies in our hands!  Do you know how?          The answer is very simple, we are in the 21st  generation where we all have a mobile phone in our hands. Nowadays due to conditions prevailing in the environment, never before many ...
    • Do you know? “Mobile Application” plays an important for your online business

      The future of business lies in our hands!  Do you know how?          The answer is very simple, we are in the 21st  generation where we all have a mobile phone in our hands. Nowadays due to conditions prevailing in the environment, never before many ...
    • Steps to launch i.am.retailer eCommerce app

      1.  To change the App Name:         Change your app name in string.xml file         app/src/main/res/values/strings.xml --> app_name   2. To change App icon:         Change app icon (ic_launcher) in all app/src/main/res/res/mipmap folders. For that ...
    • How to add Razorpay payment gateway to store

      Online payment is the best solution for every e-commerce store's growth. There are many more payment gateways, but some options are very trustful and Fast Settlements. The payment gateway plays the role of a third party transferring your money ...
    • Customer

      Here you can get customer information, which is automatically stored in the admin panel, and the customer's details can be viewed efficiently in any transaction made on their account. Let’s take a tour by exploring the setup of Customer. Log in to ...