public async System.Threading.Tasks.Task armarAsync(int uno, int dos, string tres, string cuatro, string MacAddress1, string macRouter) { geo _geo = new geo(); Position _position = await _geo.GetPosition(); MiPing iping = manejador.getPing(); Datos datos = new Datos() { lat = (Double)_position.Latitude, lng = (Double)_position.Longitude, RTT = iping.RTTdeMiPing, status = iping.status, address = iping.Address, jitter = calculate.getJitter(iping.RTTdeMiPing), lantency = calculate.getLatency(iping.RTTdeMiPing), LinkSpeed = uno, SignLevel = dos, ssid = tres, DefaultGate = cuatro, MacAddress = MacAddress1, mail = Settings.email, pass = Settings.pass, MacDelRouter = macRouter, }; string x = envia.sendJson(datos); changer changer = new changer(); changer.changerStatus(x); }
private async void ejecutarhilo() { RunOnUiThread(async() => { geo _geo = new geo(); Position _position = await _geo.GetPosition(); Toast.MakeText(ApplicationContext, _position.Latitude.ToString() + "," + _position.Longitude, ToastLength.Long).Show(); }); }