public void OnResult(string json)
            {
                AndroidLogger.LogJavaCallbackAsync(json);
                var result = JsonUtility.FromJson <T>(json);

                MainThreadDispatcher.Enqueue(() =>
                {
                    m_ResultHandler.Invoke(result);
                });
            }
 public static void OnMainThread(Action action)
 {
     try
     {
         MainThreadDispatcher.Enqueue(action);
     }
     catch (Exception)
     {
         Debug.LogWarning("Couldn't execute an action on the main thread since there is no dispatcher instance");
     }
 }