I am using LocationManager to convert from lat,longi to get the city name, but I am getting wrong results, I think there is something wrong in this code here:
Did you try turning on your gps to get a location fix? According to the docs, this method returns:
the last known location for the provider, or null
Make sure you had a location fix on your phone before for this to work. Also, you might want to consider this post which covers a good strategy to get the user location when there is one available or request a new one otherwise.
Hope it helps.