Problem sending GET variables by Android Volley to php

0

I have the following code in which I try to send two variables from android to php. The variables are latitude and longitude. The purpose is to take the location of the mobile phone and send the coordinates to a php file so that this will lift the map with the current location. It is worth mentioning that the map is raised together with the index page, so I try to send the variables in Cargarwebview.

  @SuppressLint("SetJavaScriptEnabled")
private void Cargarwebview(double latitud,double longitud) throws MalformedURLException {
    WebView myWebView = (WebView) findViewById(R.id.webView);
    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    myWebView.setWebViewClient(new WebViewClient());


    myWebView.loadUrl("http://www.yaviene.com/usuariocontrol/index.php?lat="+latitud+"&Lng="+longitud);
    Log.e("scan", "Latitud"+latitud);
    Log.e("scan", "Latitud"+longitud);

    RequestQueue cola = Volley.newRequestQueue(this);
    String url ="http://www.yaviene.com/usuariocontrol/marcadoresparadas.php?lat="+latitud+"&Lng="+longitud;
    myWebView.setWebViewClient(new WebViewClient());
 // myWebView.setWebViewClient(new MyAppWebViewClient());
    Log.e("scan", "Latitud"+url);

}
    
asked by Luis 26.03.2018 в 15:06
source

0 answers