コード例 #1
0
 /// <summary>
 /// Start HockeyApp for Unity.
 /// </summary>
 /// <param name="urlString">The url of the endpoint used for sending data.</param>
 /// <param name="appID">The app specific Identifier provided by HockeyApp.</param>
 /// <param name="secret">The app secret used for authenticating users.</param>
 /// <param name="authType">Auth type used for authentication: Anonymous, email, email& password, or check if user was explicitly added to use this app.</param>
 /// <param name="updateManagerEnabled">True, if user should be notified about newer versions of the app.</param>
 /// <param name="userMetricsEnabled">True, app should send user and session information.</param>
 /// <param name="autoSendEnabled">True, if crashes should be sent without asking the user for approval.</param>
 protected void StartCrashManager(string urlString, string appID, string secret, int authType, bool updateManagerEnabled, bool userMetricsEnabled, bool autoSendEnabled)
 {
             #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("startHockeyAppManager", currentActivity, urlString, appID, secret, authType, updateManagerEnabled, userMetricsEnabled, autoSendEnabled);
     instance = this;
             #endif
 }
コード例 #2
0
 /// <summary>
 /// Start HockeyApp for Unity.
 /// </summary>
 /// <param name="urlString">The url of the endpoint used for sending data.</param>
 /// <param name="appID">The app specific Identifier provided by HockeyApp.</param>
 /// <param name="secret">The app secret used for authenticating users.</param>
 /// <param name="authType">Auth type used for authentication: Anonymous, email, email& password, or check if user was explicitly added to use this app.</param>
 /// <param name="updateManagerEnabled">True, if user should be notified about newer versions of the app.</param>
 /// <param name="userMetricsEnabled">True, app should send user and session information.</param>
 /// <param name="autoSendEnabled">True, if crashes should be sent without asking the user for approval.</param>
 protected void StartCrashManager(string urlString, string appID, string secret, int authType, bool updateManagerEnabled, bool userMetricsEnabled, bool autoSendEnabled)
 {
             #if (UNITY_ANDROID && !UNITY_EDITOR)
     using (var unityPlayer = new AndroidJavaClass(JAVA_UNITYPLAYER_CLASS))
         using (var pluginClass = new AndroidJavaClass(JAVA_HOCKEYUNITYPLUGIN_CLASS))
         {
             var currentActivity = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity");
             pluginClass.CallStatic("startHockeyAppManager", currentActivity, urlString, appID, secret, authType, updateManagerEnabled, userMetricsEnabled, autoSendEnabled);
         }
     instance = this;
             #endif
 }
コード例 #3
0
    public void TrackEvent()
    {
#if (UNITY_ANDROID && !UNITY_EDITOR)
        HockeyAppAndroid.TrackEvent("Test Unity");
        HockeyAppAndroid.TrackEvent("Test Unity with properties",
                                    new Dictionary <string, string> {
            { "Prop1", "Val1" }, { "Prop2", "Val2" }
        });
        HockeyAppAndroid.TrackEvent("Test Unity with properties and measurements",
                                    new Dictionary <string, string> {
            { "Prop1", "Val1" }, { "Prop2", "Val2" }
        },
                                    new Dictionary <string, double> {
            { "M1", 1.0 }, { "M2", 2.0 }
        });
#endif
    }
コード例 #4
0
 /// <summary>
 /// Start HockeyApp for Unity.
 /// </summary>
 /// <param name="urlString">The url of the endpoint used for sending data.</param>
 /// <param name="appID">The app specific Identifier provided by HockeyApp.</param>
 /// <param name="secret">The app secret used for authenticating users.</param>
 /// <param name="authType">Auth type used for authentication: Anonymous, email, email& password, or check if user was explicitly added to use this app.</param>
 /// <param name="updateManagerEnabled">True, if user should be notified about newer versions of the app.</param>
 /// <param name="userMetricsEnabled">True, app should send user and session information.</param>
 /// <param name="autoSendEnabled">True, if crashes should be sent without asking the user for approval.</param>
 protected void StartCrashManager(string urlString, string appID, string secret, int authType, bool updateManagerEnabled, bool userMetricsEnabled, bool autoSendEnabled)
 {
     #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("startHockeyAppManager", currentActivity, urlString, appID, secret, authType, updateManagerEnabled, userMetricsEnabled, autoSendEnabled);
     instance = this;
     #endif
 }
コード例 #5
0
 public void CheckForUpdate()
 {
             #if (UNITY_ANDROID && !UNITY_EDITOR)
     HockeyAppAndroid.CheckForUpdate();
             #endif
 }
コード例 #6
0
 public void ShowFeedbackForm()
 {
             #if (UNITY_ANDROID && !UNITY_EDITOR)
     HockeyAppAndroid.ShowFeedbackForm();
             #endif
 }