diff --git a/MIGRATION_GUIDE_v3_to_v5.md b/MIGRATION_GUIDE_v3_to_v5.md index b4e00396e..62a683f27 100644 --- a/MIGRATION_GUIDE_v3_to_v5.md +++ b/MIGRATION_GUIDE_v3_to_v5.md @@ -31,7 +31,7 @@ OneSignal uses a built-in **alias label** called `external_id` which supports ex Follow one of the following sections based on your previous install method of the OneSignal SDK. ### Unity Package Manager -1. If you have them, delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. If you have it, delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **In Project** 4. Select the OneSignal Unity SDK(s) and press the **Upgrade to 5.x.x** button (make sure to update both Android and iOS packages) @@ -39,7 +39,7 @@ Follow one of the following sections based on your previous install method of th 6. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unity Asset Store -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **My Assets** 4. Select the **OneSignal SDK** from the list and press the **Update** button. @@ -50,13 +50,13 @@ Follow one of the following sections based on your previous install method of th 9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unitypackage Distributable -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. Download the latest release from our [releases page](https://github.com/OneSignal/OneSignal-Unity-SDK/releases) 3. In Unity, navigate to **Assets > Import Package > Custom Package...** and select the newly downloaded `*.unitypackage` file 4. Navigate to **Window > OneSignal SDK Setup** -7. Click **Run All Steps** -8. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls -9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run +5. Click **Run All Steps** +6. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls +7. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ## Code Modularization @@ -259,7 +259,7 @@ Assets/OneSignal/Example/OneSignalExampleBehaviou.cs: error CS0246: The type or Assets/OneSignal/Attribution/OneSignalVSAttribution.cs: error CS0117: 'OneSignal' does not contain a definition for '...' ``` -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` - If you would like to regenerate the OneSignal assets, remove the OneSignal Unity SDK packages (Android, Core, iOS) from your project and import the OneSignal SDK again. 2. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index bf89c142f..49366b8a3 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Sending VSAttribution data from the editor - iOS notifications clicked event firing if the app was cold started from clicking a notification +- ClassNotFoundException: com.onesignal.OneSignal for Android builds with minify enabled. You must run the "Copy Android plugin to Assets" step in **Window > OneSignal SDK Setup**. ## [5.0.2] ### Fixed diff --git a/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md b/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md index b4e00396e..62a683f27 100644 --- a/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md +++ b/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md @@ -31,7 +31,7 @@ OneSignal uses a built-in **alias label** called `external_id` which supports ex Follow one of the following sections based on your previous install method of the OneSignal SDK. ### Unity Package Manager -1. If you have them, delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. If you have it, delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **In Project** 4. Select the OneSignal Unity SDK(s) and press the **Upgrade to 5.x.x** button (make sure to update both Android and iOS packages) @@ -39,7 +39,7 @@ Follow one of the following sections based on your previous install method of th 6. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unity Asset Store -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **My Assets** 4. Select the **OneSignal SDK** from the list and press the **Update** button. @@ -50,13 +50,13 @@ Follow one of the following sections based on your previous install method of th 9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unitypackage Distributable -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. Download the latest release from our [releases page](https://github.com/OneSignal/OneSignal-Unity-SDK/releases) 3. In Unity, navigate to **Assets > Import Package > Custom Package...** and select the newly downloaded `*.unitypackage` file 4. Navigate to **Window > OneSignal SDK Setup** -7. Click **Run All Steps** -8. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls -9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run +5. Click **Run All Steps** +6. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls +7. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ## Code Modularization @@ -259,7 +259,7 @@ Assets/OneSignal/Example/OneSignalExampleBehaviou.cs: error CS0246: The type or Assets/OneSignal/Attribution/OneSignalVSAttribution.cs: error CS0117: 'OneSignal' does not contain a definition for '...' ``` -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` - If you would like to regenerate the OneSignal assets, remove the OneSignal Unity SDK packages (Android, Core, iOS) from your project and import the OneSignal SDK again. 2. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run diff --git a/OneSignalExample/Assets/OneSignal/README.md b/OneSignalExample/Assets/OneSignal/README.md index 8379e4f8c..c742bb8da 100644 --- a/OneSignalExample/Assets/OneSignal/README.md +++ b/OneSignalExample/Assets/OneSignal/README.md @@ -32,7 +32,7 @@ And via many additional platforms. [Check them all out](https://documentation.on ## Requirements - A [OneSignal Account](https://app.onesignal.com/signup) if you do not already have one - Your OneSignal App ID which you can find under **Settings > Keys & IDs** -- Unity 2018.4 or newer +- Unity 2021.3 or newer - iOS Builds: CocoaPods 1.11.3 or newer - In order to test push notifications you will need - An Android 4.0.3 or newer device or emulator with "Google Play services" installed @@ -122,8 +122,8 @@ After building in Unity and exporting the XCode project follow these steps: ### Android Most of the Android setup was already handled during installation! -The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.plugin` -with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md). See our +The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib` +with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md). See our [Customize Notification Icons](https://documentation.onesignal.com/docs/customize-notification-icons) page for additional details. ## Usage diff --git a/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs b/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs index c2acdd18d..1581a80d0 100644 --- a/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs +++ b/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs @@ -40,9 +40,9 @@ public static class OneSignalSetupReset { public static void ResetAllSteps() { /* * ExportAndroidResourcesStep - * deletes the OneSignalConfig.plugin directory + * deletes the OneSignalConfig.androidlib directory */ - AssetDatabase.DeleteAsset(Path.Combine("Assets", "Plugins", "Android", "OneSignalConfig.plugin")); + AssetDatabase.DeleteAsset(Path.Combine("Assets", "Plugins", "Android", "OneSignalConfig.androidlib")); /* * InstallEdm4UStep diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta similarity index 97% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta index e64260426..73961b4a8 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 guid: 006a8c36b25a144879a84c0bf1ce24a7 -folderAsset: yes PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/AndroidManifest.xml similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/AndroidManifest.xml diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md similarity index 74% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md index a182c6513..75fdcf6c9 100644 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md @@ -48,16 +48,16 @@ You must be sure the icon filenames are correct as per the above table. If you u 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` menu) then you will already have the -`OneSignalConfig.plugin` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.plugin`. If this is not the case +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.plugin/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file +| 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 | \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle new file mode 100644 index 000000000..bae867d70 --- /dev/null +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle @@ -0,0 +1,19 @@ +apply plugin: 'com.android.library' + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + } + } + + defaultConfig { + consumerProguardFiles "consumer-proguard.pro" + } + + compileSdkVersion 31 + + lintOptions { + abortOnError false + } +} \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro new file mode 100644 index 000000000..1eb572fe4 --- /dev/null +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro @@ -0,0 +1,4 @@ +-keep class com.onesignal.** { *; } + +# Work around for IllegalStateException with kotlinx-coroutines-android +-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/raw/notification.wav similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/raw/notification.wav diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta deleted file mode 100644 index 8b2ee1311..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c660f22014d731d409548dbcffb48410 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta deleted file mode 100644 index d8653fac1..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 80c03616b560321448802f2da1749596 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties deleted file mode 100644 index 03d06171e..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-10 -android.library=true diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta deleted file mode 100644 index efde9bec7..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3c8ec38c31fc87a4e8a72daab770d799 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta deleted file mode 100644 index 77bc29764..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 885447b9378cb9c44a10f1dfa5a68260 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta deleted file mode 100644 index 81b5636b6..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3972c2991c42f404ca424fcb30392ad8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index b86735ddf..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f9030c0de9fe47d4bb79c8a920aa2efd -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta deleted file mode 100644 index ffefacc67..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ac413c47ff2cc34fbb49f02d84e0750 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 422daffce..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7bbacdc3393327243b0bdc01d30f117d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta deleted file mode 100644 index 319a4ceea..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2b6f77d3678336c4f86bdfd0c9820715 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 0b743da9d..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3c87da0c54216e84caf4746a30ebf510 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta deleted file mode 100644 index 0a37bf473..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: faea4b5a01659ae489741a7ff3e41269 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 79a741900..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2e292cba7efed2f4686c750031e9f251 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta deleted file mode 100644 index bb55fb780..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7938fd291e36a9244b535520b2a159a6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta deleted file mode 100644 index 24e2d77f0..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d90fd5dce6d1e294bbea338f5ce83495 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 56caf42d3..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7b63fb7e6a8e0964d9d6196110e43b75 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta deleted file mode 100644 index 0be0a5289..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3fa5d641baed44a49a9845bda873b762 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta deleted file mode 100644 index 7d8594fd2..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5df96d8887319fc4e8808c88e0fa36d4 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/README.md b/README.md index cb8b6a6f4..f9b472682 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ And via many additional platforms. [Check them all out](https://documentation.on ## Requirements - A [OneSignal Account](https://app.onesignal.com/signup) if you do not already have one - Your OneSignal App ID which you can find under **Settings > Keys & IDs** -- Unity 2018.4 or newer +- Unity 2021.3 or newer - iOS Builds: CocoaPods 1.11.3 or newer - In order to test push notifications you will need - An Android 5 or newer device or emulator with "Google Play Store (Services)" installed @@ -129,8 +129,8 @@ In the Unity editor: Most of the Android setup was already handled during installation! -The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.plugin` -with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md). See our +The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib` +with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md). See our [Customize Notification Icons](https://documentation.onesignal.com/docs/customize-notification-icons) page for additional details. ## Usage diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md similarity index 62% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md index 981844c0f..75fdcf6c9 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md @@ -4,22 +4,22 @@ _see a more detailed version of this guide at https://documentation.onesignal.co 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 +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 +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 +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 @@ -27,7 +27,7 @@ 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 +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 @@ -44,20 +44,20 @@ If you prefer to create your own icons, you must make your icons the following s > 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 +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` menu) then you will already have the -`OneSignalConfig.plugin` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.plugin`. 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 +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.plugin/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file +| 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 | \ No newline at end of file diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle new file mode 100644 index 000000000..bae867d70 --- /dev/null +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle @@ -0,0 +1,19 @@ +apply plugin: 'com.android.library' + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + } + } + + defaultConfig { + consumerProguardFiles "consumer-proguard.pro" + } + + compileSdkVersion 31 + + lintOptions { + abortOnError false + } +} \ No newline at end of file diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro new file mode 100644 index 000000000..1eb572fe4 --- /dev/null +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro @@ -0,0 +1,4 @@ +-keep class com.onesignal.** { *; } + +# Work around for IllegalStateException with kotlinx-coroutines-android +-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/raw/notification.wav similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/raw/notification.wav diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml.meta deleted file mode 100644 index a1fd0b179..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: fc42e88ad15d9479298db862e2797087 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md.meta deleted file mode 100644 index bd024586c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 54e1106d2dae63d438d01a3aba3ce3f4 -timeCreated: 1450316662 -licenseType: Free -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties deleted file mode 100644 index 03d06171e..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-10 -android.library=true diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties.meta deleted file mode 100644 index a1bd03961..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 3c05c210d837fea4890616346460f104 -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res.meta deleted file mode 100644 index feceaa962..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3f9cd4496f0fd474bae155c28c02c6fd -folderAsset: yes -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi.meta deleted file mode 100644 index f7f305358..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 9ba89af2f71dd844c9d32ebe66097342 -folderAsset: yes -timeCreated: 1425686711 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index f94bae5b7..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 83cd6cb71f8dd4cebaf31ec5e1f0e900 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi.meta deleted file mode 100644 index 96e47ba44..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 526b2a5a8f3d32e4986ae1dd3dca0f25 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 85e9162db..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 3dedafcb700b648f884585d5123fb4cc -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi.meta deleted file mode 100644 index ccde26f4f..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: fd2e926a7da32aa418a11789e423bcf2 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index a7e0af82c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 81523a9106dcf4cc2bfa5dcd7dbcdb12 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi.meta deleted file mode 100644 index 5d4eec545..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: fdcad13c1320f9e4590d033040c76eb0 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index ba693ded3..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 00cfa22faa2c64f8eb278ddbdb4ec1bb -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta deleted file mode 100644 index 644eac3a4..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 54a3ec6b7071f4d089da5a404ace28b5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta deleted file mode 100644 index 53e16563c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: e432fc833d3854049aa725b593c497a8 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 9da67618b..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 0a2f9d99ed36f4ca88742f712413082a -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw.meta deleted file mode 100644 index d5736f428..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 2140915f306b1af43b161e76b00d02ca -folderAsset: yes -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav.meta deleted file mode 100644 index 0493a6f70..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 21b72d16fac2afe47891657f866fba94 -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index eaee7770c..a0bfcd3da 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -32,7 +32,7 @@ namespace OneSignalSDK { /// - /// Copies the OneSignalConfig.plugin to Assets/Plugins/Android/* + /// Copies the OneSignalConfig.androidlib to Assets/Plugins/Android/* /// public sealed class ExportAndroidResourcesStep : OneSignalSetupStep { public override string Summary @@ -45,12 +45,11 @@ public override bool IsRequired => true; protected override bool _getIsStepCompleted() { - if (!Directory.Exists(_pluginExportPath)) + if (!Directory.Exists(_pluginExportPath) || Directory.Exists(_pluginV3ExportPath)) return false; var packagePaths = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories) .Select(path => path.Remove(0, path.LastIndexOf(_pluginName, StringComparison.InvariantCulture))); - packagePaths = packagePaths.Where(file => !file.EndsWith(".meta")); var exportPaths = Directory.GetFiles(_pluginExportPath, "*", SearchOption.AllDirectories) .Select(path => path.Remove(0, path.LastIndexOf(_pluginName, StringComparison.InvariantCulture))); @@ -67,10 +66,11 @@ protected override bool _getIsStepCompleted() { } protected override void _runStep() { - var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); - var filteredFiles = files.Where(file => !file.EndsWith(".meta")); + MigratePluginToAndroidlib(); - foreach (var file in filteredFiles) { + var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); + + foreach (var file in files) { var trimmedPath = file.Remove(0, _pluginPackagePath.Length + 1); var fileExportPath = Path.Combine(_pluginExportPath, trimmedPath); var containingPath = fileExportPath.Remove(fileExportPath.LastIndexOf(Path.DirectorySeparatorChar)); @@ -93,7 +93,39 @@ protected override void _runStep() { AssetDatabase.Refresh(); } - private const string _pluginName = "OneSignalConfig.plugin"; + private void MigratePluginToAndroidlib() { + if (Directory.Exists(_pluginV3ExportPath)) { + if (!Directory.Exists(_pluginExportPath)) { + try + { + AssetDatabase.StartAssetEditing(); + + // Remove project.properties + if (File.Exists(_projectPropertiesV3ExportPath)) { + AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); + } + + // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib + AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); + } + finally + { + AssetDatabase.StopAssetEditing(); + } + + // Move the icons and .wav file to /src/main + if (Directory.Exists(_resV3ExportPath)) { + Directory.CreateDirectory(Path.GetDirectoryName(_resExportPath)); + + FileUtil.MoveFileOrDirectory(_resV3ExportPath, _resExportPath); + } + } else { + AssetDatabase.DeleteAsset(_pluginV3ExportPath); + } + } + } + + private const string _pluginName = "OneSignalConfig.androidlib"; private static readonly string _packagePath = Path.Combine("Packages", "com.onesignal.unity.android", "Editor"); private static readonly string _androidPluginsPath = Path.Combine("Assets", "Plugins", "Android"); @@ -102,5 +134,15 @@ protected override void _runStep() { private static readonly string _manifestPackagePath = Path.Combine(_pluginPackagePath, "AndroidManifest.xml"); private static readonly string _manifestExportPath = Path.Combine(_pluginExportPath, "AndroidManifest.xml"); + + private const string _resPath = "src/main/res"; + private static readonly string _resExportPath = Path.Combine(_pluginExportPath, _resPath); + + // Old OneSignalConfig name used from 3.x.x to 5.0.2 + private const string _pluginNameV3 = "OneSignalConfig.plugin"; + private static readonly string _pluginV3ExportPath = Path.Combine(_androidPluginsPath, _pluginNameV3); + private static readonly string _projectPropertiesV3ExportPath = Path.Combine(_pluginV3ExportPath, "project.properties"); + private const string _resV3Path = "res"; + private static readonly string _resV3ExportPath = Path.Combine(_pluginExportPath, _resV3Path); } } \ No newline at end of file