Package net.rim.device.api.gps

Examples of net.rim.device.api.gps.BlackBerryLocationProvider


     
      //get current location
        BlackBerryCriteria myCriteria = new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE);
        BlackBerryLocation myLocation = null;
        try {
      BlackBerryLocationProvider myProvider = (BlackBerryLocationProvider)
      LocationProvider.getInstance(myCriteria);
      myLocation = (BlackBerryLocation)myProvider.getLocation(-1);
      if (myLocation.isValid()) return myLocation;
      else return getGeolocation(numTries-1);
    } catch (LocationException e) {
      //possible no towers found
      e.printStackTrace();
View Full Code Here


        try {
            final BlackBerryCriteria criteria = new BlackBerryCriteria();
            criteria.enableGeolocationWithGPS();

            _locationInfo.setText("Searching for location...");
            final BlackBerryLocationProvider bbProvider =
                    (BlackBerryLocationProvider) LocationProvider
                            .getInstance(criteria);

            final Location loc = bbProvider.getLocation(-1);

            synchronized (_app.getAppEventLock()) {
                _locationInfo.setText("Location has been found");
            }
View Full Code Here

TOP

Related Classes of net.rim.device.api.gps.BlackBerryLocationProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.