Open a Wi-Fi HTTPS connection

The interface=wifi parameter applies only to TCP/UDP connections. To establish a Wi-Fi® connection and use a Wi-Fi API in a BlackBerry® device application, the wireless service provider must support Wi-Fi access.

  1. Import the following classes:
    • java.lang.String
    • javax.microedition.io.Connector
  2. Import the javax.microedition.io.HttpsConnection interface.
  3. Invoke Connector.open(), specify https as the protocol, and append the interface=wifi parameter to the end of the URL string value.
  4. Cast the returned object as an HttpsConnection object.
    HttpsConnection conn = null;
    String URL = "https://host:443/;deviceside=true;interface=wifi";
    conn = (HttpsConnection)Connector.open(URL);
    

Index


Was this information helpful? Send us your comments.