Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
aliajones
Posts: 81
Registered: ‎12-04-2012
My Carrier: vodafone
Accepted Solution

How to use LocationCoder

my location provider code snippet isnt working. I have imported the requisite packages.But it gives an error this method is not applicable for these parameters. i have no clue what this error means

{lp = LocationProvider.getInstance(null);
lp.setLocationListener(ll, 1, 1, 1);}

 

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: How to use LocationCoder

is "ll" a locationlistener?
these values won't give you very useful data in any case, but 1/1/1 should be valid.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
aliajones
Posts: 81
Registered: ‎12-04-2012
My Carrier: vodafone

Re: How to use LocationCoder

ll is a locationlistener,,it isnt working either ways .how are we supposed to use one.Could u guide .
Please use plain text.
Please use plain text.
Developer
noahhuang
Posts: 100
Registered: ‎10-01-2012
My Carrier: Roger

Re: How to use LocationCoder

LocationProvider provider = LocationProvider.getInstance(null);
  if (provider != null) {
    provider.setLocationListener(new LocationListenerImpl(), 1, -1, -1);
   } 

 

private class LocationListenerImpl implements LocationListener {

 

           public void locationUpdated(LocationProvider provider, Location location) {

                         ................

            }

 

           public void providerStateChanged(LocationProvider provider, int newState) {

                     ........................

            }

......

 

}

Please use plain text.