-
-
Notifications
You must be signed in to change notification settings - Fork 32
Enabling notifications
This feature is completely optional. If you don't want to implement this, you can just ignore the content of this page.
Note
OneSignal collects some data, and this should be reflected in the “Data safety” section of your app’s Play Store listing. In the Play Console, declare that your app collects data of the “Device or other IDs” type. See the OneSignal documentation and the Play Console documentation for more information.
-
Create an account on OneSignal.
-
Generate the required API keys following this tutorial.
-
Open this file:
app/build.gradle -
Just so you know, the comment marks are these:
/*and*/and// -
Do NOT sync gradle until you reach step 8. This is important.
-
Check these lines and remove the comments in them:
Careful! When you remove lines, the lines numbers will change, but you can easily find them by the comment marks.
-
Open the file
buildSrc/src/main/java/OneSignal.kt -
You can now sync gradle
-
Go to this file:
app/src/main/kotlin/your/package/name/NotificationServiceExtension.ktand remove the comment marks at lines3and29. -
Go to this file:
app/src/main/kotlin/your/package/name/MyApplication.ktand remove the comment marks at lines6,7,8,14and26. -
Go to this file:
app/src/main/AndroidManifest.xmland remove the comment marks at lines114,115and118. -
Clean and rebuild your project.
-
Run your app and test notifications from OneSignal's console.
-
If you want to change your notifications icon, just create a Vector Drawable XML icon and put it inside this folder:
app/src/main/res/drawablewith the nameic_notification.xml.
Copyright 2022 by Jahir Fiquitiva. This work is licensed under the CreativeCommons Attribution-ShareAlike 4.0 International License.
This list represents the step-to-step process to setup Kuper. It's organized so it's easier to follow. (Although you can do it in the order you want.)
- First steps
- Setting
build.gradleup - Setting
AndroidManifest.xmlup - Change app icons
- Setting colors up
- Setting
MainActivity.ktup - Setting
strings.xmlup - Setting
kuper_setup.xmlup - Setting
frames_setup.xmlup - Setting custom styles
- Adding Zooper widgets
- Adding Kustom assets
- Setting up Credits
- Optimize your wallpapers
- Setting up the wallpapers JSON file
- Enabling notifications
- Update your app's changelog
- Publish your app! 😃
- Update to latest version