public static K CallStatic <K>(string name, params object[] args)
        {
            Type type   = typeof(K);
            bool isBase = typeof(IHmsBase).IsAssignableFrom(type);

            if (isBase)
            {
                AndroidJavaObject robj = clz.CallStatic <AndroidJavaObject>(name, HmsUtil.TransferParams(args));
                IHmsBase          ret  = (IHmsBase)Activator.CreateInstance(type);
                ret.obj = robj;
                return((K)ret);
            }
            return(clz.CallStatic <K>(name, HmsUtil.TransferParams(args)));
        }
        public K Call <K>(string name, params object[] args)
        {
            Type type   = typeof(K);
            bool isBase = typeof(IHmsBase).IsAssignableFrom(type);

            if (isBase)
            {
                AndroidJavaObject robj = obj.Call <AndroidJavaObject>(name, HmsUtil.TransferParams(args));
                if (robj == null)
                {
                    return(default(K));
                }
                IHmsBase ret = (IHmsBase)Activator.CreateInstance(type);
                ret.obj = robj;
                return((K)ret);
            }
            return(obj.Call <K>(name, HmsUtil.TransferParams(args)));
        }
 public static void CallStatic(string name, params object[] args)
 {
     clz.CallStatic(name, HmsUtil.TransferParams(args));
 }
示例#4
0
 public void onFailure(AndroidJavaObject arg0)
 {
     onFailure(HmsUtil.GetHmsBase <Exception>(arg0));
 }
 public void Call(string name, params object[] args)
 {
     obj.Call(name, HmsUtil.TransferParams(args));
 }
示例#6
0
 public AndroidJavaObject then(AndroidJavaObject arg0)
 {
     return(then(HmsUtil.GetHmsBase <Task>(arg0)));
 }
 public void execute(AndroidJavaObject arg0)
 {
     execute(HmsUtil.GetHmsBase <Runnable>(arg0));
 }
示例#8
0
 public void onComplete(AndroidJavaObject arg0)
 {
     onComplete(HmsUtil.GetHmsBase <Task>(arg0));
 }
示例#9
0
 public void onTokenError(AndroidJavaObject arg0)
 {
     onTokenError(HmsUtil.GetHmsBase <BaseException>(arg0));
 }
示例#10
0
 public void onMessageDelivered(string arg0, AndroidJavaObject arg1)
 {
     onSendError(arg0, HmsUtil.GetHmsBase <BaseException>(arg1));
 }
示例#11
0
 public void onMessageReceived(AndroidJavaObject arg0)
 {
     onMessageReceived(HmsUtil.GetHmsBase <RemoteMessage>(arg0));
 }
 public void onReceive(AndroidJavaObject arg0, AndroidJavaObject arg1)
 {
     onReceive(HmsUtil.GetHmsBase <Context>(arg0), HmsUtil.GetHmsBase <Intent>(arg1));
 }