You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android plugin is not being initialize properly. We need to grab the Context and pass it to initialize. This allows Android to capture automatic breadcrumbs.
diff --git a/DemoApp/Assets/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs b/DemoApp/Assets/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs
index 0a11741..37b39cf 100644
--- a/DemoApp/Assets/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs+++ b/DemoApp/Assets/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs@@ -54,7 +54,9 @@ public static class CrittercismAndroid
using (var cls_UnityPlayer = new AndroidJavaClass ("com.unity3d.player.UnityPlayer")) {
using (var objActivity = cls_UnityPlayer.GetStatic<AndroidJavaObject> ("currentActivity")) {
- PluginCallStatic ("initialize", objActivity, appID, config.GetAndroidConfig ());+ using (var objContext = objActivity.Call<AndroidJavaObject> ("getApplicationContext")) {+ PluginCallStatic ("initialize", objContext, appID, config.GetAndroidConfig());+ }
}
}
diff --git a/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs b/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs
index 0a11741..37b39cf 100644
--- a/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs+++ b/Plugins/Crittercism/Crittercism_Android_Scripts/CrittercismAndroid.cs@@ -54,7 +54,9 @@ public static class CrittercismAndroid
using (var cls_UnityPlayer = new AndroidJavaClass ("com.unity3d.player.UnityPlayer")) {
using (var objActivity = cls_UnityPlayer.GetStatic<AndroidJavaObject> ("currentActivity")) {
- PluginCallStatic ("initialize", objActivity, appID, config.GetAndroidConfig ());+ using (var objContext = objActivity.Call<AndroidJavaObject> ("getApplicationContext")) {+ PluginCallStatic ("initialize", objContext, appID, config.GetAndroidConfig());+ }
}
}
The text was updated successfully, but these errors were encountered:
Android plugin is not being initialize properly. We need to grab the Context and pass it to initialize. This allows Android to capture automatic breadcrumbs.
The text was updated successfully, but these errors were encountered: