Example #1
0
        //--------------------------------------------------------------------------------------------
        protected virtual void GetNetStateInfoFinish(bool success, string body)
        {
            NetStateInfo result = new NetStateInfo();
            JSONNode     node   = JSONNode.Parse(body);

            result.success        = success;
            result.wifi           = node["wifi"].AsBool;
            result.networkConnect = node["networkConnect"].AsBool;
            getNetStateInfoListener(result);
        }
        public override NetStateInfo GetNetStateInfo()
        {
            base.GetNetStateInfo();
            string       result = currentActivity.Call <string>("getNetStateInfo", false);
            JSONNode     node   = JSONNode.Parse(result);
            NetStateInfo info   = new NetStateInfo();

            info.wifi           = node["wifi"].AsBool;
            info.networkConnect = node["networkConnect"].AsBool;
            return(info);
        }