Sorry I do not understand what you're saying. So maybe we're talking 
different things. From your thread title I was assuming that you are trying 
to make 
Geocoder<http://developer.android.com/reference/android/location/Geocoder.html>work
 on your brother's device.

However, Geocoder is not available on every device. Concatenating the 
country name doesn't change a thing about it. Some Geocoder implementations 
are empty on some devices, they don't do anything and return null all the 
time (that's what you are observing on your brother's device).

The 
isPresent<http://developer.android.com/reference/android/location/Geocoder.html#isPresent%28%29>method
 is nothing to implement. It is a static method of Geocoder for 
checking whether the Geocoder component is present on a device.

If you are not referring to the Geocoder class then tell us what you are 
using instead and show the lines of code that create the "addresses" object.



On Sunday, December 2, 2012 10:38:39 AM UTC-6, leenolasco wrote:
>
> Thanks for the response but i did not implement the isPresent method, i 
> think it is impossible for the address value to go null because 
> i concatenated +"CountryName" to the reference 
>
> On Monday, December 3, 2012 12:06:10 AM UTC+8, Nobu Games wrote:
>>
>> You need to read the documentation of the Geocoder component very 
>> carefully. It states that it is basically just a stub. The presence of a 
>> real implementation depends on the device. Some devices do not have an 
>> implementation at all and therefore you'll always get null as a result.
>>
>> If you are coding for API level 9 you can check the presence of an 
>> implementation with the "isPresent" method. If you really need to provide 
>> this location service for any device you'll have to bite the bullet and 
>> code your own fallback solution that queries geolocation web services like 
>> GeoNames.org or similar.
>>
>>
>> On Sunday, December 2, 2012 9:20:32 AM UTC-6, leenolasco wrote:
>>>
>>> I have a working code that would add overlays in the mapview, i tested 
>>> it on my phone and it was working fine pinning the proper query. but when i 
>>> tested it on my brothers mobile phone i would always display no location 
>>> found. What seems to be the problem here? This is the line where it checks 
>>> the address size.
>>>
>>> if(addresses==null || addresses.size()==0){Toast.makeText(getBaseContext(), 
>>> "No Location found", Toast.LENGTH_SHORT).show();
>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to