open up the project and go to the settings -> project settings -> Cloud Messaging section and get a server key and Sender ID. and preserve it as it will be needed in future.
Now go the the OneSinal website and create an account if you don’t have one through the link given below.
After that add an app to the onesignal platform and integrate it to the android project.
Now place these Firebase Server Key and Firebase Sender ID into the relevant Fields and hit save button. Select Native android and you will get the App ID, now skip to the next step. Close the popup box. Save the App id to your notepad.
- Open build.gradle (Module).
- Put your Onesignal App ID in stirngs.xml
- Clean and Rebuild your Project