BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 05-14-2009, 09:17 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question AddressInfo Is Null

Please Login to Remove!

Hello Everyone

I have following piece of code. The AddressInfo is null all the time on the actual device. I get Latitude and Longitude.

public void locationUpdated(LocationProvider provider, Location location)
{
if(location!=null && location.isValid())
{
QualifiedCoordinates coordinates = location.getQualifiedCoordinates();
AddressInfo adInfo = location.getAddressInfo();
}
}

Any ideas why?

Thanks
Offline  
Old 05-14-2009, 11:54 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

First, please read this sticky thread on how to paste formatted code.

Code:
public void locationUpdated(LocationProvider provider, Location location)
{
    if(location!=null && location.isValid())
    {
        QualifiedCoordinates coordinates = location.getQualifiedCoordinates();
        AddressInfo adInfo = location.getAddressInfo();
    }
}
Second, from my read of the java doc page for javax.microedition.location.AddressInfo, it is only a container. The values have to be set by some other facility.
Quote:
This class is only a container for the information. The getField method returns the value set for the defined field using the setField method. When the platform implementation returns AddressInfo objects, it MUST ensure that it only returns objects where the parameters have values set as described for their semantics in this class.
And javax.microedition.location.Location.getAddressInf o() has the following note in the documentation:
Quote:
This method returns null because the RIM implementation does not support textual address.
__________________
My other Blackberry is a PlayBook.

Last edited by hrbuckley : 05-14-2009 at 11:59 AM.
Offline  
Old 05-14-2009, 01:43 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi hrbucklet

Sorry about posting code like. Did not mean to.

So, how do I go about maping the coordinates to the address?

Thanks
Offline  
Old 05-14-2009, 03:11 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I suspect you would need access to a database that mapped one to the other. I don't know where you would get such access, I'm fairly certain it wouldn't fit on a BlackBerry.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 05-14-2009, 08:14 PM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You need to access a geocoding service. Google has one, I believe.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

DRIVE FREQUENCY INVERTER .75KW 380-460V Eurotherm 584SV/0075/230/0010/US
$798.52
DRIVE FREQUENCY INVERTER .75KW 380-460V  Eurotherm  584SV/0075/230/0010/US pictureLot of 13 RCA 74HCT04 CD74HCT04E DIP-14 Hex Inverters, NOS
$3.5
Lot of 13 RCA 74HCT04 CD74HCT04E DIP-14 Hex Inverters, NOS pictureLot of 10 74ALS04 DM74ALS04BN DIP-14 Hex Inverters, NOS
$3.5
Lot of 10 74ALS04 DM74ALS04BN DIP-14 Hex Inverters, NOS pictureMarathon Electric HVC145THTR5376BA 3 Ph Inverter AC Induction Motor FL RPM 1145
$325.0
Marathon Electric HVC145THTR5376BA 3 Ph Inverter AC Induction Motor FL RPM 1145 pictureCarl Zeiss Axiovert 25 Inverted Microscope w/ 3 Objectives
$499.0
Carl Zeiss Axiovert 25 Inverted Microscope w/ 3 Objectives picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.