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

Commit

Permalink
Merge pull request #27 from bitstadium/release/5.0.1
Browse files Browse the repository at this point in the history
Release/5.0.1
  • Loading branch information
Benjamin Scholtysik (Reimold) authored Nov 22, 2017
2 parents 073aada + 7c83a8b commit 8709612
Show file tree
Hide file tree
Showing 39 changed files with 365 additions and 272 deletions.
26 changes: 26 additions & 0 deletions Documentation/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
## Changelog

### 5.0.1

This is a bugfix release. If you upgrade from version 1.X, please be aware of the breaking changes in version 5.0.0!

* **[IMPROVEMENT]** Uses HockeySDK-Android 5.0.4. Please have a look at it's full changelog.
* **[BUGFIX]** Fix bug that made it possible to bypass authentication. [#22](https://github.com/bitstadium/HockeySDK-Unity-Android/pull/22).
* **[BUGFIX]** Fix an issue when using the GUID for crash reports. [#26](https://github.com/bitstadium/HockeySDK-Unity-Android/pull/26)
* **[BUGFIX]** Fix a bug where merging AndroidManifest.xml would fail. [#11](https://github.com/bitstadium/HockeySDK-Unity-Android/issues/11)

#### Changelog for HockeySDK-Android 5.0.4

This version contains a few bugfixes as well as the removal of an API that has been deprecated since HockeySDK 3.7.0-Beta.2.

* **Removal of deprecated API** `ExceptionHandler.saveException(Throwable exception, CrashManagerListener listener)` has been deprecated since 3.7.0-beta.2. Use `ExceptionHandler.saveException(Throwable exception, Thread thread, CrashManagerListener listener)` instead.
* **Bugfix** The SDK now deletes redundant crash reports.
* **Bugfix** The SDK does no longer send the event that indicates the start of a session twice but once. There was no impact on session counts as the event was de-duplicated on the server.
* **Bugfix** Fixes a potential deadlock when reading device information when saving an exception.
* **Bugfix** Fixes a potential NPE when processing stacktraces. Thanks to [Thomas Reis for reporting issue #331](https://github.com/bitstadium/HockeySDK-Android/issues/331).

#### Changelog for HockeySDK-Android 5.0.3

This release now limits the number of crashes that are stored by the SDK while the device is offline to 100 Crashes. HockeySDK-Android will stop to collect crashes until the number of unsent crashes drops below the limit of 100 unsent crashes.

* [BUGFIX] Fixes a possible `OutOfMemoryError` exception. This only occurs when a very large number of crashes – several 100k or more – wasn't sent to the server. [#313](https://github.com/bitstadium/HockeySDK-Android/pull/313)


### 5.0.0

Upgrade to HockeySDK for Android 5.0.2.
Expand Down
9 changes: 5 additions & 4 deletions ExampleGame/Assets/HockeyAppUnityAndroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.hockeyapp.unity"
android:versionCode="17"
android:versionName="5.0.0" >
android:versionCode="18"
android:versionName="5.0.1" >

<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="26" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<application>

<activity android:name=".UpdateActivity" />
<activity android:name=".FeedbackActivity" />
<activity android:name=".FeedbackActivity" android:windowSoftInputMode="adjustResize|stateVisible" />
<activity android:name=".PaintActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".ExpiryInfoActivity" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Version: 5.0.0
* Version: 5.0.1
*/

using UnityEngine;
Expand All @@ -16,6 +16,7 @@ public class HockeyAppAndroid : MonoBehaviour
protected const string HOCKEYAPP_CRASHESPATH = "api/2/apps/[APPID]/crashes/upload";
protected const int MAX_CHARS = 199800;
protected const string LOG_FILE_DIR = "/logs/";
private const string SERVER_URL_PLACEHOLDER = "your-custom-server-url";
private static HockeyAppAndroid instance;

public enum AuthenticatorType
Expand All @@ -29,7 +30,7 @@ public enum AuthenticatorType
[Header("HockeyApp Setup")]
public string appID = "your-hockey-app-id";
public string packageID = "your-package-identifier";
public string serverURL = "your-custom-server-url";
public string serverURL = SERVER_URL_PLACEHOLDER;

[Header("Authentication")]
public AuthenticatorType authenticatorType;
Expand Down Expand Up @@ -90,6 +91,13 @@ void OnDisable ()
#endif
}

void OnApplicationPause(bool pause)
{
if (!pause) {
PerformAuthentication();
}
}

/// <summary>
/// Start HockeyApp for Unity.
/// </summary>
Expand All @@ -112,6 +120,19 @@ protected void StartCrashManager (string urlString, string appID, string secret,

}

/// <summary>
/// Performs user authentication.
/// </summary>
public static void PerformAuthentication()
{
#if (UNITY_ANDROID && !UNITY_EDITOR)
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaClass pluginClass = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin");
pluginClass.CallStatic("performAuthentication", currentActivity);
#endif
}

/// <summary>
/// Check for version update and present alert if newer version is available.
/// </summary>
Expand Down Expand Up @@ -242,21 +263,21 @@ protected String GetModel ()
return model;
}

/// <summary>
/// The device's model manufacturer name.
/// </summary>
/// <returns>The device's model manufacturer name.</returns>
protected String GetCrashReporterKey ()
{
string crashReporterKey = null;
/// <summary>
/// The unique identifier for device, not dependent on package or device.
/// </summary>
/// <returns>The unique identifier for device, not dependent on package or device.</returns>
protected String GetDeviceIdentifier ()
{
string deviceIdentifier = null;

#if (UNITY_ANDROID && !UNITY_EDITOR)
AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin");
crashReporterKey = jc.CallStatic<string>("getCrashReporterKey");
#endif
#if (UNITY_ANDROID && !UNITY_EDITOR)
AndroidJavaClass jc = new AndroidJavaClass("net.hockeyapp.unity.HockeyUnityPlugin");
deviceIdentifier = jc.CallStatic<string>("getDeviceIdentifier");
#endif

return crashReporterKey;
}
return deviceIdentifier;
}

/// <summary>
/// Collect all header fields for the custom exception report.
Expand All @@ -266,7 +287,7 @@ protected virtual List<string> GetLogHeaders ()
{
List<string> list = new List<string> ();

#if (UNITY_ANDROID && !UNITY_EDITOR)
#if (UNITY_ANDROID && !UNITY_EDITOR)

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

Expand All @@ -286,13 +307,13 @@ protected virtual List<string> GetLogHeaders ()
string model = GetModel();
list.Add("Model: " + model);

string crashReporterKey = GetCrashReporterKey();
list.Add("CrashReporter Key: " + crashReporterKey);
string deviceIdentifier = GetDeviceIdentifier();
list.Add("CrashReporter Key: " + deviceIdentifier);

list.Add("Date: " + DateTime.UtcNow.ToString("ddd MMM dd HH:mm:ss {}zzzz yyyy").Replace("{}", "GMT"));
#endif
#endif

return list;
return list;
}

/// <summary>
Expand Down Expand Up @@ -477,7 +498,7 @@ protected virtual string GetBaseURL ()
#if (UNITY_ANDROID && !UNITY_EDITOR)

string urlString = serverURL.Trim();
if(urlString.Length > 0) {
if(urlString.Length > 0 && urlString != SERVER_URL_PLACEHOLDER) {
baseURL = urlString;

if(baseURL[baseURL.Length -1].Equals("/") != true) {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ExampleGame/Assets/TestScene.unity
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/AudioManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/ClusterInputManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/DynamicsManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/EditorBuildSettings.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/EditorSettings.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/InputManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/NavMeshAreas.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/NetworkManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/Physics2DSettings.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion ExampleGame/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 5.6.3f1
m_EditorVersion: 2017.1.0f3
Binary file modified ExampleGame/ProjectSettings/QualitySettings.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/TagManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/TimeManager.asset
Binary file not shown.
Binary file modified ExampleGame/ProjectSettings/UnityConnectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion HockeyAppUnityPlugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

Expand Down
4 changes: 2 additions & 2 deletions HockeyAppUnityPlugin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jun 19 18:17:12 PDT 2017
#Wed Nov 22 12:44:27 MSK 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
3 changes: 1 addition & 2 deletions HockeyAppUnityPlugin/hockeysdk-unity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

defaultConfig {
minSdkVersion 15
Expand All @@ -25,5 +24,5 @@ repositories {
}

dependencies {
compile(name:'HockeySDK-5.0.2', ext:'aar')
compile(name:'HockeySDK-5.0.4', ext:'aar')
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<application>

<activity android:name=".UpdateActivity" />
<activity android:name=".FeedbackActivity" />
<activity android:name=".FeedbackActivity" android:windowSoftInputMode="adjustResize|stateVisible" />
<activity android:name=".PaintActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".ExpiryInfoActivity" />
Expand Down
Loading

0 comments on commit 8709612

Please sign in to comment.