diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index ba33975..b543ff6 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -1,5 +1,9 @@ ###Changelog:### +### 1.1.1 +* [BUGFIX] Fix bug where report for managed exceptions didn't contain a `CrashReporter Key`. The key is needed to get proper user statistics on the portal +* [UPDATE] Plugin now uses HockeySDK Android 4.0.1 + ### 1.1.0 * [NEW] User Metrics (user and session tracking) * [NEW] Trigger version update check explicitly @@ -23,4 +27,4 @@ - Append SDK and App information to crash reports * SDK name * SDK version - * App version name \ No newline at end of file + * App version name diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml b/ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml index f631690..fdb1e00 100644 --- a/ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml +++ b/ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="1.1.1" > diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs index df27e71..82d4c3a 100644 --- a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs +++ b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs @@ -205,6 +205,53 @@ protected String GetSdkName () return sdkName; } + /// + /// The device's model manufacturer name. + /// + /// The device's model manufacturer name. + protected String GetManufacturer () + { + string manufacturer = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + manufacturer = jc.CallStatic("getManufacturer"); + #endif + + return manufacturer; + } + + /// + /// The device's model name. + /// + /// The device's model name. + protected String GetModel () + { + string model = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + model = jc.CallStatic("getModel"); + #endif + + return model; + } + + /// + /// The device's model manufacturer name. + /// + /// The device's model manufacturer name. + protected String GetCrashReporterKey () + { + string crashReporterKey = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + crashReporterKey = jc.CallStatic("getCrashReporterKey"); + #endif + + return crashReporterKey; + } /// /// Collect all header fields for the custom exception report. @@ -227,8 +274,15 @@ protected virtual List GetLogHeaders () string[] versionComponents = SystemInfo.operatingSystem.Split('/'); string osVersion = "Android: " + versionComponents[0].Replace("Android OS ", ""); list.Add (osVersion); - - list.Add("Model: " + SystemInfo.deviceModel); + + string manufacturer = GetManufacturer(); + list.Add("Manufacturer: " + manufacturer); + + string model = GetModel(); + list.Add("Model: " + model); + + string crashReporterKey = GetCrashReporterKey(); + list.Add("CrashReporter Key: " + crashReporterKey); list.Add("Date: " + DateTime.UtcNow.ToString("ddd MMM dd HH:mm:ss {}zzzz yyyy").Replace("{}", "GMT")); #endif diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar deleted file mode 100644 index 024a359..0000000 Binary files a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar and /dev/null differ diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar new file mode 100644 index 0000000..7aee457 Binary files /dev/null and b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar differ diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar.meta b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar.meta similarity index 79% rename from ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar.meta rename to ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar.meta index 06ede0e..f846430 100644 --- a/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar.meta +++ b/ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 6ff023189050d460993e7740cc8f2277 -timeCreated: 1461806862 +guid: 731363e00ccdc492cb386a545a618d08 +timeCreated: 1467912346 licenseType: Pro PluginImporter: serializedVersion: 1 diff --git a/Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar b/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar similarity index 81% rename from Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar rename to ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar index 88b5a75..1d49b2f 100644 Binary files a/Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar and b/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar differ diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar.meta b/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar.meta similarity index 55% rename from ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar.meta rename to ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar.meta index be44ac2..82ae471 100644 --- a/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar.meta +++ b/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 78cfdad9c2ee346af838a8c4a8a0ce4f -timeCreated: 1461806862 +guid: bda9f024405e44c578854e102c09f662 +timeCreated: 1467913629 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/ExampleGame/Assets/TestScene.unity b/ExampleGame/Assets/TestScene.unity index fb8bed6..f35a15f 100644 Binary files a/ExampleGame/Assets/TestScene.unity and b/ExampleGame/Assets/TestScene.unity differ diff --git a/ExampleGame/ProjectSettings/ProjectSettings.asset b/ExampleGame/ProjectSettings/ProjectSettings.asset index 133bbbe..69b4fb3 100644 Binary files a/ExampleGame/ProjectSettings/ProjectSettings.asset and b/ExampleGame/ProjectSettings/ProjectSettings.asset differ diff --git a/HockeyAppUnityPlugin/hockeysdk-unity/build.gradle b/HockeyAppUnityPlugin/hockeysdk-unity/build.gradle index 188e671..fc3e304 100644 --- a/HockeyAppUnityPlugin/hockeysdk-unity/build.gradle +++ b/HockeyAppUnityPlugin/hockeysdk-unity/build.gradle @@ -5,8 +5,8 @@ android { buildToolsVersion "23.0.3" defaultConfig { - minSdkVersion 8 - targetSdkVersion 18 + minSdkVersion 9 + targetSdkVersion 23 } buildTypes { @@ -25,5 +25,5 @@ repositories { } dependencies { - compile(name:'HockeySDK-4.0.0', ext:'aar') + compile(name:'HockeySDK-4.0.1', ext:'aar') } diff --git a/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.0.aar b/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.0.aar deleted file mode 100644 index b2518f6..0000000 Binary files a/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.0.aar and /dev/null differ diff --git a/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.1.aar b/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.1.aar new file mode 100644 index 0000000..7aee457 Binary files /dev/null and b/HockeyAppUnityPlugin/hockeysdk-unity/libs/HockeySDK-4.0.1.aar differ diff --git a/HockeyAppUnityPlugin/hockeysdk-unity/src/main/java/net/hockeyapp/unity/HockeyUnityPlugin.java b/HockeyAppUnityPlugin/hockeysdk-unity/src/main/java/net/hockeyapp/unity/HockeyUnityPlugin.java index 658652f..61b5d2f 100644 --- a/HockeyAppUnityPlugin/hockeysdk-unity/src/main/java/net/hockeyapp/unity/HockeyUnityPlugin.java +++ b/HockeyAppUnityPlugin/hockeysdk-unity/src/main/java/net/hockeyapp/unity/HockeyUnityPlugin.java @@ -189,6 +189,21 @@ public static String getVersionName() { */ public static String getSdkName() {return Constants.SDK_NAME; } + /** + * @return unique identifier for crash reports. + */ + public static String getCrashReporterKey() {return Constants.CRASH_IDENTIFIER; } + + /** + * @return the device's model manufacturer name. + */ + public static String getManufacturer() {return Constants.PHONE_MANUFACTURER; } + + /** + * @return the device's model name. + */ + public static String getModel() {return Constants.PHONE_MODEL; } + //--------------------------------------------------------------------------------------- //endregion diff --git a/Plugins/HockeyAppUnityAndroid/AndroidManifest.xml b/Plugins/HockeyAppUnityAndroid/AndroidManifest.xml index f631690..fdb1e00 100644 --- a/Plugins/HockeyAppUnityAndroid/AndroidManifest.xml +++ b/Plugins/HockeyAppUnityAndroid/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="1.1.1" > diff --git a/Plugins/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs b/Plugins/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs index df27e71..82d4c3a 100644 --- a/Plugins/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs +++ b/Plugins/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs @@ -205,6 +205,53 @@ protected String GetSdkName () return sdkName; } + /// + /// The device's model manufacturer name. + /// + /// The device's model manufacturer name. + protected String GetManufacturer () + { + string manufacturer = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + manufacturer = jc.CallStatic("getManufacturer"); + #endif + + return manufacturer; + } + + /// + /// The device's model name. + /// + /// The device's model name. + protected String GetModel () + { + string model = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + model = jc.CallStatic("getModel"); + #endif + + return model; + } + + /// + /// The device's model manufacturer name. + /// + /// The device's model manufacturer name. + protected String GetCrashReporterKey () + { + string crashReporterKey = null; + + #if (UNITY_ANDROID && !UNITY_EDITOR) + AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin"); + crashReporterKey = jc.CallStatic("getCrashReporterKey"); + #endif + + return crashReporterKey; + } /// /// Collect all header fields for the custom exception report. @@ -227,8 +274,15 @@ protected virtual List GetLogHeaders () string[] versionComponents = SystemInfo.operatingSystem.Split('/'); string osVersion = "Android: " + versionComponents[0].Replace("Android OS ", ""); list.Add (osVersion); - - list.Add("Model: " + SystemInfo.deviceModel); + + string manufacturer = GetManufacturer(); + list.Add("Manufacturer: " + manufacturer); + + string model = GetModel(); + list.Add("Model: " + model); + + string crashReporterKey = GetCrashReporterKey(); + list.Add("CrashReporter Key: " + crashReporterKey); list.Add("Date: " + DateTime.UtcNow.ToString("ddd MMM dd HH:mm:ss {}zzzz yyyy").Replace("{}", "GMT")); #endif diff --git a/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar b/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar deleted file mode 100644 index 024a359..0000000 Binary files a/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.0.aar and /dev/null differ diff --git a/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar b/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar new file mode 100644 index 0000000..7aee457 Binary files /dev/null and b/Plugins/HockeyAppUnityAndroid/HockeySDK-4.0.1.aar differ diff --git a/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar b/Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar similarity index 81% rename from ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar rename to Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar index 88b5a75..1d49b2f 100644 Binary files a/ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-1.1.0.aar and b/Plugins/HockeyAppUnityAndroid/hockeysdk-unity-1.1.1.aar differ diff --git a/README.md b/README.md index 70810dd..c73c0f1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Version 1.1.0 +## Version 1.1.1 ======= ## Introduction @@ -21,7 +21,7 @@ The following features are currently supported: This document contains the following sections: -1. [Requirements (Version 1.1.0-beta.1)](#1) +1. [Requirements (Version 1.1.1)](#1) 2. [Installation & Setup](#2) 3. [Examples](#3) 4. [Troubleshooting](#4) @@ -29,11 +29,11 @@ This document contains the following sections: 6. [Contributor License](#6) 7. [Licenses](#7) -## Requirements (Version 1.1.0-beta.1) +## Requirements (Version 1.1.1) * [Changelog](Documentation/Changelog.md) * Unity 5.0 or newer (SDK versions with Unity 4 support can be found at the [Unity Asset Store](https://www.assetstore.unity3d.com/en/?gclid=CO) or by switching to the 1.0.3 tag on GitHub). -* Android 2.1 or newer. +* Android 2.3 or newer. ## Installation & Setup