-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
Android Setup | ||
===================== | ||
|
||
1. Open Plugins/Android/OneSignalConfig/AndroidManifest.xml and follow the insturctions. | ||
2. Replace the example small notification icons in the res folder with your own with by follwing the insturctions below. | ||
1. Replace the example small notification icons in the res folder with your own with by follwing the insturctions below. | ||
- https://documentation.onesignal.com/docs/android-notification-customizations#small-notification-icon | ||
3. The large notification icon is optional, remove or replace res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png. | ||
2. The large notification icon is optional, remove or replace res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#if UNITY_ANDROID | ||
using UnityEditor; | ||
using System.IO; | ||
using UnityEngine; | ||
|
||
[InitializeOnLoad] | ||
public class OneSignalEditorScript { | ||
|
||
// Copies `AndroidManifestTemplate.xml` to `AndroidManifest.xml` | ||
// then replace `${manifestApplicationId}` with current packagename in the Unity settings. | ||
static OneSignalEditorScript () { | ||
string oneSignalConfigPath = "Assets/Plugins/Android/OneSignalConfig/"; | ||
string manifestFullPath = oneSignalConfigPath + "AndroidManifest.xml"; | ||
|
||
File.Copy(oneSignalConfigPath + "AndroidManifestTemplate.xml", manifestFullPath, true); | ||
|
||
StreamReader streamReader = new StreamReader(manifestFullPath); | ||
string body = streamReader.ReadToEnd(); | ||
streamReader.Close(); | ||
|
||
body = body.Replace("${manifestApplicationId}", PlayerSettings.bundleIdentifier); | ||
using (var streamWriter = new StreamWriter(manifestFullPath, false)) | ||
{ | ||
streamWriter.Write(body); | ||
} | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.15.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#if UNITY_ANDROID | ||
using UnityEditor; | ||
using System.IO; | ||
using UnityEngine; | ||
|
||
[InitializeOnLoad] | ||
public class OneSignalEditorScript { | ||
|
||
// Copies `AndroidManifestTemplate.xml` to `AndroidManifest.xml` | ||
// then replace `${manifestApplicationId}` with current packagename in the Unity settings. | ||
static OneSignalEditorScript () { | ||
string oneSignalConfigPath = "Assets/Plugins/Android/OneSignalConfig/"; | ||
string manifestFullPath = oneSignalConfigPath + "AndroidManifest.xml"; | ||
|
||
File.Copy(oneSignalConfigPath + "AndroidManifestTemplate.xml", manifestFullPath, true); | ||
|
||
StreamReader streamReader = new StreamReader(manifestFullPath); | ||
string body = streamReader.ReadToEnd(); | ||
streamReader.Close(); | ||
|
||
body = body.Replace("${manifestApplicationId}", PlayerSettings.bundleIdentifier); | ||
using (var streamWriter = new StreamWriter(manifestFullPath, false)) | ||
{ | ||
streamWriter.Write(body); | ||
} | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.15.0 | ||
1.15.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
Android Setup | ||
===================== | ||
|
||
1. Open Plugins/Android/OneSignalConfig/AndroidManifest.xml and follow the insturctions. | ||
2. Replace the example small notification icons in the res folder with your own with by follwing the insturctions below. | ||
1. Replace the example small notification icons in the res folder with your own with by follwing the insturctions below. | ||
- https://documentation.onesignal.com/docs/android-notification-customizations#small-notification-icon | ||
3. The large notification icon is optional, remove or replace res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png. | ||
2. The large notification icon is optional, remove or replace res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
m_EditorVersion: 5.3.1f1 | ||
m_EditorVersion: 5.3.4f1 | ||
m_StandardAssetsVersion: 0 |