•
java.lang.String
•
javax.microedition.io.Connector
2.
Import the
javax.microedition.io.HttpConnection
interface.
3.
Invoke
Connector.open()
, specify
http
as the protocol, and append the
interface=wifi
parameter to the
end of the URL string value.
4.
Cast the returned object as an
HttpConnection
or a
StreamConnection
object.
HttpConnection conn = null;
String URL = "http://www.myServer.com/
myContent;deviceside=true;interface=wifi";
conn = (HttpConnection)Connector.open(URL);
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);
Development Guide
Wi-Fi connections
65