Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

it doesn't give me the country name

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my main class.it shows me the longitude & latitude.



it is working fine.but the thing is that when i run this programm in my phone it gives me that current location latitude and longitude.

but it doesn't give me the country name.I don't know why ?
can anyone tell me the reason ?
 
Saloon Keeper
Posts: 6622
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume there is code somewhere that prints out locationdetails after the geoCoder has been called? Or are you relying on onLocationChanged being called again with another location update?
 
Ranch Hand
Posts: 95
Python C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you didn't call locationdetailstextview.setText() method after getting the country!!!
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I change the code.here is my java class.i have added a settext after getCountry line.



This is my main xml file



still no prints country name.
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me the reason ?
 
brevity is the soul of wit - shakepeare. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic