public void CallGmsApiWithResult(string className, string fieldName, string methodName, AndroidJavaProxy callbackProxy, params object[] args) { using (AndroidJavaObject pendingResult = CallGmsApi <AndroidJavaObject>(className, fieldName, methodName, args)) { pendingResult.Call("setResultCallback", callbackProxy); } }
public static void AddListener(string setCallBackFunctionName, AndroidJavaProxy callBack) { if (Application.platform == RuntimePlatform.Android) { CurrentActivity.Call(setCallBackFunctionName, callBack); androidListernerList.Add(callBack); } }
public static AndroidJavaObject GetListener(string buildName, AndroidJavaProxy proxy) { if (buildName == "") { return(null); } return(getBuilder(buildName).CallStatic <AndroidJavaObject>(buildName, proxy)); }
public static void CallOnMainThread(this AndroidJavaProxy proxy, Action action) { if (!HMSDispatcher.InstanceExists) { HMSDispatcher.CreateDispatcher(); } HMSDispatcher.InvokeAsync(action); }
private static void CallAppState(AndroidJavaObject apiClient, string methodName, AndroidJavaProxy callbackProxy, params object[] args) { var pendingResult = AppStateManager.CallStatic <AndroidJavaObject>( methodName, PrependApiClient(apiClient, args)); using (pendingResult) { pendingResult.Call("setResultCallback", callbackProxy); } }
public void setSensorListener(AndroidJavaProxy callback) { #if UNITY_ANDROID using (AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject jo = jc.GetStatic <AndroidJavaObject>("currentActivity")) { jo.Call("setSensorListener", callback); } } #endif }
public void addListener <T>(string listenerName, AndroidJavaProxy listener) where T : AndroidJavaProxy { #if UNITY_ANDROID && !UNITY_EDITOR mAndroidActivity.Call(listenerName, (T)listener); #endif }
private static void CallAppState(AndroidJavaObject apiClient, string methodName, AndroidJavaProxy callbackProxy, params object[] args) { AndroidJavaObject androidJavaObject = (AndroidJavaObject)((AndroidJavaObject)AndroidAppStateClient.AppStateManager).CallStatic <AndroidJavaObject>(methodName, AndroidAppStateClient.PrependApiClient(apiClient, args)); using (androidJavaObject) androidJavaObject.Call("setResultCallback", new object[1] { (object)callbackProxy }); }
public static void ObjectAddListener(AndroidJavaObject androidObject, string setCallBackFunctionName, AndroidJavaProxy callBack) { if (Application.platform == RuntimePlatform.Android) { if (androidObject != null) { androidObject.Call(setCallBackFunctionName, callBack); androidListernerList.Add(callBack); } } }
private void AddOnFailureListener(AndroidJavaProxy listenerProxy) { _javaTask.Call <AndroidJavaObject>("addOnFailureListener", listenerProxy).Dispose(); }
/// <summary> /// Registers a listener that will be called when a pack download changes state. /// Listeners should be subsequently cleared using <see cref="ClearListeners"/> /// </summary> /// <param name="listener"> /// An AndroidJavaProxy representing a java object of class: /// com.google.android.play.core.assetpacks.AssetPackStateUpdateListener /// </param> public void RegisterListener(AndroidJavaProxy listener) { _javaAssetPackManager.Call("registerListener", listener); }
/// <summary> /// Wrapper around Play Core Java's unregisterListener() method that removes the specified listener previously /// added using <see cref="RegisterListener"/>. /// </summary> /// <param name="listener">An AndroidJavaProxy representing a java object of class: /// com.google.android.play.core.appupdate.InstallStateUpdatedListener /// </param> public void UnregisterListener(AndroidJavaProxy listener) { _appUpdateManagerPlayCore.UnregisterListener(listener); }
protected void SetOnAndroidStatus(AndroidJavaProxy listener) { PluginInstance.Call("setOnStatusListener", listener); }
protected void SetOnAndroidMessage(AndroidJavaProxy listener) { PluginInstance.Call("setOnMessageListener", listener); }
/// <summary> /// Removes the specified listener previously added using <see cref="RegisterListener"/>. /// </summary> public void UnregisterListener(AndroidJavaProxy listener) { _javaAppUpdateManager.Call("unregisterListener", listener); }
public void CallGmsApiWithResult(string className, string fieldName, string methodName, AndroidJavaProxy callbackProxy, params object[] args) { using (AndroidJavaObject androidJavaObject = this.CallGmsApi <AndroidJavaObject>(className, fieldName, methodName, args)) { androidJavaObject.Call("setResultCallback", new object[] { callbackProxy }); } }