O'Reilly logo

BlackBerry Java Application Development by Bill Foust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - acquiring a location

  1. Create a new project, Application class, and MainScreen class (like we have done in the past). Remember, we decided early on that this application would be called Hansel.
  2. This application will implement the LocationListener interface, so add that interface to the class declaration as well.
  3. We need a number of data members which will be used in the application. Add the following code to the new MainScreen class.
    protected Criteria _CellCriteria = new Criteria(); protected Criteria _AGPSCriteria = new Criteria(); protected Criteria _AutonomousGPSCriteria = new Criteria(); protected Criteria _AGPS_AutonomousGPSCriteria = new Criteria(); protected ObjectChoiceField _AccuracyField; protected String[] AccuracyChoices ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required