Retrieve location information from GPS satellites and the GPS receiver on a BlackBerry
device
- Import the following classes:
- javax.microedition.location.LocationProvider
- javax.microedition.location.Criteria
- Create an instance of a Criteria object.
Criteria criteria = new Criteria();
- Invoke criteria.setCostAllowed(false) to specify that this mode does not incur cost.
- Invoke LocationProvider.getInstance(), storing the returned object in a LocationProvider object.
LocationProvider provider = LocationProvider.getInstance(criteria);
Was this information helpful? Send us your comments.