コード例 #1
0
ファイル: AndroidUtils.cs プロジェクト: secondage/CameraTest2
 public static void StartActivity(AndroidJavaObject intent)
 {
     try
     {
         Activity.Call("startActivity", intent);
     }
     catch (AndroidJavaException exception)
     {
         Debug.LogError("Could not start the activity with " + intent.JavaToString() + ": " + exception.Message);
     }
 }
コード例 #2
0
ファイル: AndroidUtils.cs プロジェクト: secondage/CameraTest2
 public static void StartActivityWithChooser(AndroidJavaObject intent, string chooserTitle)
 {
     try
     {
         AndroidJavaObject jChooser = intent.CallStatic <AndroidJavaObject>("createChooser", intent, chooserTitle);
         Activity.Call("startActivity", jChooser);
     }
     catch (AndroidJavaException exception)
     {
         Debug.LogError("Could not start the activity with " + intent.JavaToString() + ": " + exception.Message);
     }
 }
コード例 #3
0
 public static void StartActivityWithChooser(AndroidJavaObject intent, string chooserTitle)
 {
     try
     {
         var jChooser = intent.CallStaticAJO("createChooser", intent, chooserTitle);
         Activity.Call("startActivity", jChooser);
     }
     catch (AndroidJavaException exception)
     {
         Debug.LogWarning("Could not start the activity with " + intent.JavaToString() + ": " + exception.Message);
     }
     finally
     {
         intent.Dispose();
     }
 }
コード例 #4
0
 public static void StartActivity(AndroidJavaObject intent, Action fallback = null)
 {
     try
     {
         Activity.Call("startActivity", intent);
     }
     catch (AndroidJavaException exception)
     {
         if (Debug.isDebugBuild)
         {
             Debug.LogWarning("Could not start the activity with " + intent.JavaToString() + ": " + exception.Message);
         }
         if (fallback != null)
         {
             fallback();
         }
     }
     finally
     {
         intent.Dispose();
     }
 }
コード例 #5
0
 void onFailure(AndroidJavaObject exception)
 {
     AwarenessSceneHelper.Queue(() => _failure(exception.JavaToString()));
 }