@@ -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}
0 commit comments