Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
 public static void CallStatic(string name, params object[] args)
 {
     clz.CallStatic(name, HmsUtil.TransferParams(args));
 }
Exemplo n.º 4
0
 public void onFailure(AndroidJavaObject arg0)
 {
     onFailure(HmsUtil.GetHmsBase <Exception>(arg0));
 }
Exemplo n.º 5
0
 public void Call(string name, params object[] args)
 {
     obj.Call(name, HmsUtil.TransferParams(args));
 }
Exemplo n.º 6
0
 public AndroidJavaObject then(AndroidJavaObject arg0)
 {
     return(then(HmsUtil.GetHmsBase <Task>(arg0)));
 }
Exemplo n.º 7
0
 public void execute(AndroidJavaObject arg0)
 {
     execute(HmsUtil.GetHmsBase <Runnable>(arg0));
 }
Exemplo n.º 8
0
 public void onComplete(AndroidJavaObject arg0)
 {
     onComplete(HmsUtil.GetHmsBase <Task>(arg0));
 }
Exemplo n.º 9
0
 public void onTokenError(AndroidJavaObject arg0)
 {
     onTokenError(HmsUtil.GetHmsBase <BaseException>(arg0));
 }
Exemplo n.º 10
0
 public void onMessageDelivered(string arg0, AndroidJavaObject arg1)
 {
     onSendError(arg0, HmsUtil.GetHmsBase <BaseException>(arg1));
 }
Exemplo n.º 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));
 }