Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit a13f7a8

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #26 from MatkovIvan/update-5.0.4
Use device identifier as crash reporter key
2 parents 58ae93d + f782e97 commit a13f7a8

35 files changed

+294
-248
lines changed

ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="net.hockeyapp.unity"
4-
android:versionCode="17"
5-
android:versionName="5.0.0" >
4+
android:versionCode="18"
5+
android:versionName="5.0.1" >
66

77
<uses-sdk
88
android:minSdkVersion="15"

ExampleGame/Assets/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Version: 5.0.0
2+
* Version: 5.0.1
33
*/
44

55
using UnityEngine;
@@ -263,6 +263,22 @@ protected String GetModel ()
263263
return model;
264264
}
265265

266+
/// <summary>
267+
/// The unique identifier for device, not dependent on package or device.
268+
/// </summary>
269+
/// <returns>The unique identifier for device, not dependent on package or device.</returns>
270+
protected String GetDeviceIdentifier ()
271+
{
272+
string deviceIdentifier = null;
273+
274+
#if (UNITY_ANDROID && !UNITY_EDITOR)
275+
AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin");
276+
deviceIdentifier = jc.CallStatic<string>("getDeviceIdentifier");
277+
#endif
278+
279+
return deviceIdentifier;
280+
}
281+
266282
/// <summary>
267283
/// Collect all header fields for the custom exception report.
268284
/// </summary>
@@ -271,7 +287,7 @@ protected virtual List<string> GetLogHeaders ()
271287
{
272288
List<string> list = new List<string> ();
273289

274-
#if (UNITY_ANDROID && !UNITY_EDITOR)
290+
#if (UNITY_ANDROID && !UNITY_EDITOR)
275291

276292
list.Add("Package: " + packageID);
277293

@@ -291,10 +307,13 @@ protected virtual List<string> GetLogHeaders ()
291307
string model = GetModel();
292308
list.Add("Model: " + model);
293309

310+
string deviceIdentifier = GetDeviceIdentifier();
311+
list.Add("CrashReporter Key: " + deviceIdentifier);
312+
294313
list.Add("Date: " + DateTime.UtcNow.ToString("ddd MMM dd HH:mm:ss {}zzzz yyyy").Replace("{}", "GMT"));
295-
#endif
314+
#endif
296315

297-
return list;
316+
return list;
298317
}
299318

300319
/// <summary>
-266 KB
Binary file not shown.
267 KB
Binary file not shown.

ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-5.0.2.aar.meta renamed to ExampleGame/Assets/HockeyAppUnityAndroid/HockeySDK-5.0.4.aar.meta

File renamed without changes.

Plugins/HockeyAppUnityAndroid/hockeysdk-unity-5.0.0.aar renamed to ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-5.0.1.aar

61.1 KB
Binary file not shown.

ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-5.0.0.aar.meta renamed to ExampleGame/Assets/HockeyAppUnityAndroid/hockeysdk-unity-5.0.1.aar.meta

File renamed without changes.

ExampleGame/Assets/TestScene.unity

-5.79 KB
Binary file not shown.
-3.68 KB
Binary file not shown.
-3.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)