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

Commit 59c9405

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #30 from bitstadium/release/5.1.0
Release/5.1.0
2 parents f206691 + e86abd8 commit 59c9405

File tree

6 files changed

+41
-11
lines changed

6 files changed

+41
-11
lines changed

ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="net.hockeyapp.unity"
44
android:versionCode="18"
5-
android:versionName="5.0.1" >
5+
android:versionName="5.1.0" >
66

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

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

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Version: 5.0.1
2+
* Version: 5.1.0
33
*/
44

55
using UnityEngine;
@@ -62,6 +62,7 @@ void Awake ()
6262
if(exceptionLogging == true && IsConnected() == true) {
6363
List<string> logFileDirs = GetLogFiles();
6464
if(logFileDirs.Count > 0) {
65+
Debug.Log("Found files: " + logFileDirs.Count);
6566
StartCoroutine(SendLogs(logFileDirs));
6667
}
6768
}
@@ -269,8 +270,6 @@ protected virtual List<string> GetLogHeaders ()
269270
{
270271
var versionCode = pluginClass.CallStatic<string>("getVersionCode");
271272
var versionName = pluginClass.CallStatic<string>("getVersionName");
272-
var sdkVersion = pluginClass.CallStatic<string>("getSdkVersion");
273-
var sdkName = pluginClass.CallStatic<string>("getSdkName");
274273
var manufacturer = pluginClass.CallStatic<string>("getManufacturer");
275274
var model = pluginClass.CallStatic<string>("getModel");
276275
var deviceIdentifier = pluginClass.CallStatic<string>("getDeviceIdentifier");
@@ -434,6 +433,9 @@ protected virtual IEnumerator SendLogs (List<string> logs)
434433
if (Debug.isDebugBuild)
435434
Debug.Log ("Failed to delete exception log: " + e);
436435
}
436+
} else {
437+
if (Debug.isDebugBuild)
438+
Debug.Log ("Crash sending error: " + www.error);
437439
}
438440
}
439441
}
@@ -519,7 +521,14 @@ protected virtual void HandleException (string logString, string stackTrace)
519521
{
520522

521523
#if (UNITY_ANDROID && !UNITY_EDITOR)
522-
WriteLogToDisk(logString, stackTrace);
524+
try
525+
{
526+
WriteLogToDisk(logString, stackTrace);
527+
}
528+
catch (Exception e)
529+
{
530+
AndroidLog(e.ToString());
531+
}
523532
#endif
524533
}
525534

@@ -577,6 +586,12 @@ private static AndroidJavaObject DictainaryToJavaMap<TKey, TValue>(IDictionary<T
577586
return javaMap;
578587
}
579588

589+
private static void AndroidLog(string message)
590+
{
591+
var logClass = new AndroidJavaObject("android.util.Log");
592+
logClass.CallStatic<int>("d", "HockeyApp", message);
593+
}
594+
580595
#endif
581596
#endregion
582597
}
Binary file not shown.

Plugins/HockeyAppUnityAndroid/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="net.hockeyapp.unity"
44
android:versionCode="18"
5-
android:versionName="5.0.1" >
5+
android:versionName="5.1.0" >
66

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

Plugins/HockeyAppUnityAndroid/HockeyAppUnity-Scripts/HockeyAppAndroid.cs

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Version: 5.0.1
2+
* Version: 5.1.0
33
*/
44

55
using UnityEngine;
@@ -62,6 +62,7 @@ void Awake ()
6262
if(exceptionLogging == true && IsConnected() == true) {
6363
List<string> logFileDirs = GetLogFiles();
6464
if(logFileDirs.Count > 0) {
65+
Debug.Log("Found files: " + logFileDirs.Count);
6566
StartCoroutine(SendLogs(logFileDirs));
6667
}
6768
}
@@ -269,8 +270,6 @@ protected virtual List<string> GetLogHeaders ()
269270
{
270271
var versionCode = pluginClass.CallStatic<string>("getVersionCode");
271272
var versionName = pluginClass.CallStatic<string>("getVersionName");
272-
var sdkVersion = pluginClass.CallStatic<string>("getSdkVersion");
273-
var sdkName = pluginClass.CallStatic<string>("getSdkName");
274273
var manufacturer = pluginClass.CallStatic<string>("getManufacturer");
275274
var model = pluginClass.CallStatic<string>("getModel");
276275
var deviceIdentifier = pluginClass.CallStatic<string>("getDeviceIdentifier");
@@ -434,6 +433,9 @@ protected virtual IEnumerator SendLogs (List<string> logs)
434433
if (Debug.isDebugBuild)
435434
Debug.Log ("Failed to delete exception log: " + e);
436435
}
436+
} else {
437+
if (Debug.isDebugBuild)
438+
Debug.Log ("Crash sending error: " + www.error);
437439
}
438440
}
439441
}
@@ -519,7 +521,14 @@ protected virtual void HandleException (string logString, string stackTrace)
519521
{
520522

521523
#if (UNITY_ANDROID && !UNITY_EDITOR)
522-
WriteLogToDisk(logString, stackTrace);
524+
try
525+
{
526+
WriteLogToDisk(logString, stackTrace);
527+
}
528+
catch (Exception e)
529+
{
530+
AndroidLog(e.ToString());
531+
}
523532
#endif
524533
}
525534

@@ -577,6 +586,12 @@ private static AndroidJavaObject DictainaryToJavaMap<TKey, TValue>(IDictionary<T
577586
return javaMap;
578587
}
579588

589+
private static void AndroidLog(string message)
590+
{
591+
var logClass = new AndroidJavaObject("android.util.Log");
592+
logClass.CallStatic<int>("d", "HockeyApp", message);
593+
}
594+
580595
#endif
581596
#endregion
582597
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version 5.0.1
1+
# Version 5.1.0
22

33
## Introduction
44

0 commit comments

Comments
 (0)