notifications on rank drop
parent
835824d971
commit
8377062189
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 46da62dafd452134c8fbba35f20d7f72
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: da3a82e05a8f859448ed6c4432431912
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4eae7acb92dcf39438f85efa7a685ef6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,32 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 57854d4ffbb8b964197c5a820fbe8c8a
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Android: Android
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
WARNING: Do NOT Modify! Changes will be overwritten by the OneSignal plugin.
|
||||||
|
Make your changes to Assets/Plugins/Android/AndroidManifest.xml instead.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.onesignal.onesignalsdk"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
</manifest>
|
@ -0,0 +1,63 @@
|
|||||||
|
_see a more detailed version of this guide at https://documentation.onesignal.com/docs/customize-notification-icons#how-to-add-default-icons_
|
||||||
|
|
||||||
|
# Android Notification Icons
|
||||||
|
|
||||||
|
Icons are a way to provide a more unique, branded experience for your Android and Amazon app.
|
||||||
|
|
||||||
|
You may add a default icon that appears with every notification you send, or you may add icons to just certain types of
|
||||||
|
notifications. The below tutorial shows you how to do both.
|
||||||
|
|
||||||
|
## About Notification Icons
|
||||||
|
Android supports both Small and Large Notification Icons.
|
||||||
|
|
||||||
|
### Small Notification Icons
|
||||||
|
The small icon is displayed on the top status bar as well as the notification itself. By default OneSignal will show a bell
|
||||||
|
icon, however we recommend you customize this so users recognize it's a notification from your app. Note that Android only
|
||||||
|
uses the alpha channel for the icon. It will display monochrome in the status bar but an accent color can be applied to the
|
||||||
|
left side the notification itself.
|
||||||
|
|
||||||
|
### Large Notification Icons
|
||||||
|
The large notification icon will show up to the left of the notification text on Android 4.0.3 - 6.0 devices, and shows on
|
||||||
|
the right for Android 7.0+ devices. If you do not set a large icon, the small icon will be used instead. OneSignal will auto
|
||||||
|
scale large notification icons for you to prevent the icon from being cropped. The recommended size of the large icon is
|
||||||
|
256x256 pixels.
|
||||||
|
|
||||||
|
## How to Add Default Icons
|
||||||
|
We **strongly** recommend adding default icons to every Android and Amazon app.
|
||||||
|
|
||||||
|
### Step 1 - Generate Icons
|
||||||
|
#### Option A: Using Android Asset Studio _(Recommended)_
|
||||||
|
To quickly and easily generate small icons with the correct settings, we recommend using the Android Asset Studio. Use
|
||||||
|
**ic_stat_onesignal_default** as the name.
|
||||||
|
|
||||||
|
#### Option B: Manually Create Icons
|
||||||
|
If you prefer to create your own icons, you must make your icons the following sizes and make the small ones in white with a transparent background.
|
||||||
|
|
||||||
|
| Name | Density (dp) | Size (px) |
|
||||||
|
|-------------------------------------|--------------|-----------|
|
||||||
|
| ic_stat_onesignal_default.png | MDPI | 24x24 |
|
||||||
|
| ic_stat_onesignal_default.png | HDPI | 36x36 |
|
||||||
|
| ic_stat_onesignal_default.png | XHDPI | 48x48 |
|
||||||
|
| ic_stat_onesignal_default.png | XXHDPI | 72x72 |
|
||||||
|
| ic_stat_onesignal_default.png | XXXHDPI | 96x96 |
|
||||||
|
| ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 |
|
||||||
|
|
||||||
|
> Required: Each name and pixel size must be present in the app.
|
||||||
|
|
||||||
|
You must be sure the icon filenames are correct as per the above table. If you used Android Asset Studio for your small icon then this step may
|
||||||
|
have already been done for you.
|
||||||
|
|
||||||
|
### Step 2 - Add icons to project
|
||||||
|
If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal SDK Setup` menu) then you will already have the
|
||||||
|
`OneSignalConfig.androidlib` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.androidlib`. If this is not the case
|
||||||
|
please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to
|
||||||
|
the correct paths:
|
||||||
|
|
||||||
|
| Path | Density (dp) | Size (px) |
|
||||||
|
|------------------------------------------------------------------------------------------------------------|--------------|-----------|
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 |
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 |
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 |
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 |
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 |
|
||||||
|
| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 |
|
@ -0,0 +1,24 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
|
android {
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def unityLib = project(':unityLibrary').extensions.getByName('android')
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
consumerProguardFiles "consumer-proguard.pro"
|
||||||
|
minSdkVersion unityLib.defaultConfig.minSdkVersion.mApiLevel
|
||||||
|
targetSdkVersion unityLib.defaultConfig.targetSdkVersion.mApiLevel
|
||||||
|
}
|
||||||
|
|
||||||
|
compileSdkVersion unityLib.compileSdkVersion
|
||||||
|
buildToolsVersion unityLib.buildToolsVersion
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
-keep class com.onesignal.** { *; }
|
||||||
|
|
||||||
|
# Work around for IllegalStateException with kotlinx-coroutines-android
|
||||||
|
-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 874 B |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Loading…
Reference in New Issue