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 - testing for availability

  1. Create a new class in the HTTPBasics project called DiagMainScreen, which is derived from the MainScreen class.
  2. Add this constructor to the class
    public DiagMainScreen() { if (DeviceInfo.isSimulator()) { add(new LabelField ("This is running in the simulator.")); } if(WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) { add(new LabelField ("There is a WiFi connection available.")); } if(CoverageInfo.isCoverageSufficient( CoverageInfo.COVERAGE_DIRECT) { add(new LabelField ("Direct TCP/IP Connections are available (Including WAP).")); } if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_MDS)) { add(new LabelField ("Connections via MDS are available.")); } ServiceBook sb = ServiceBook.getSB(); ...

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