Soru & Cevap

Konum Bilgilerini String olarak kullanma. ...

27.05.2014 - 12:54

LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
        Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);

   
        
        double longitude = location.getLongitude();
        double latitude = location.getLatitude();
        


        final WebView checkbrowser = (WebView) findViewById(R.id.webView2);
        checkbrowser.getSettings().setJavaScriptEnabled(true);
        checkbrowser.loadUrl("http://www.sitem.com/lokasyon.asp?long=" + longitude );

 

Bu şekilde kullandığımda hata alıyorum, yapmak istediğim sitem.com/lokasyon.asp?long= kısmına longitude değerini göndermek. Nasıl yapabilirim ? 

 

Teşekkürler.

4 Görüntülenme

3 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

picture-20496-1400501549.jpg
emr3karatas
28.05.2014 - 10:43

http://www.sitem.com/lokasyon.asp?long=longitude

 

bunu denedin mi?

picture-10343-1399330288.jpg
mvatanlar
27.05.2014 - 05:49

Yine hata alıyorum hocam. Unable to start activity ComponentInfo

 

Caner Güral
27.05.2014 - 10:16
Bu hatayı başka bir sebepten alıyor olmalısınız. Buradaki sorun çözüldüyse çözüldü olarak işaretleyip diğer hatayla ilgili yeni bir soru sorabilirsiniz.
picture-3606-1408610132.jpg
cgural
27.05.2014 - 01:38
[code]checkbrowser.loadUrl("http://www.sitem.com/lokasyon.asp?long=" + String.valueOf(longitude));[/code]

gibi bir kod ile hata almazsınız herhalde.