HTTP connections in BlackBerry
Making HTTP Connections is the same as any other J2ME application/game except you need to add the wap parameters specific to the operator/carrier the application is running on if you so decide not run the Blackberry application/game in a Blackberry Enterprise Environment.
In short BES is exactly the same as a "normal" HTTP Connection call.
If you do not use a BES/MDS following parameters you need to add are:
Specifies whether the connection is to be made via direct TCP or proxy TCP. Can be true or false:
- WiFi – if you use WiFi then you will be able to access all the servers on the WiFi network itself. Also, this will not incur data charges and will work even if your cellular data connection is not available, or radio is turned off. The URL connection string you have to append is as follows: “http://www.testserver.com;interface=wifi”
- APN/Direct TCP – this will require you to configure the APN settings on your BlackBerry for this to work. “http://www.testserver.com;deviceside=true”
- BIS-B – this is the most widely available cellular data transport. However, in order to use this, your server has to be whitelisted beforehand by RIM. You have to get the connection string from RIM (I can’t show it to you). Take our Bootcamp training and we will show you how to get going.
-BES/MDS – this requires you to have BES server that your BlackBerry is connected to. The URL connection string you have to append is as follows: “http://www.testserver.com;deviceside=false”
-WAP – this works if you have the WAP service books provisioned to your BlackBerry. The URL connection string you have to append is as follows: “http://www.testserver.com;WAPGatewayIP=?.?.?.?;WAPGatewayAPN=????”
In short BES is exactly the same as a "normal" HTTP Connection call.
If you do not use a BES/MDS following parameters you need to add are:
Specifies whether the connection is to be made via direct TCP or proxy TCP. Can be true or false:
- If deviceside=true is specified in the connection URI, a direct TCP connection is opened from the handheld, without using the BlackBerry MDS Connection Service.
- If deviceside=false is specified in the connection URI, a proxy TCP connection is opened using the BlackBerry MDS Connection Service.
- If the deviceside parameter is not specified the behaviour varies by platform: For any BlackBerry on the iDEN network (BlackBerry 6510 Wireless Handheld, BlackBerry 7510, BlackBerry 7520, BlackBerry 7100i), direct TCP is used by default; on all other handhelds, the BlackBerry MDS Connection Service is used by default. If the BlackBerry MDS Connection Service is not available the handheld falls back on direct TCP.
- WiFi – if you use WiFi then you will be able to access all the servers on the WiFi network itself. Also, this will not incur data charges and will work even if your cellular data connection is not available, or radio is turned off. The URL connection string you have to append is as follows: “http://www.testserver.com;interface=wifi”
- APN/Direct TCP – this will require you to configure the APN settings on your BlackBerry for this to work. “http://www.testserver.com;deviceside=true”
- BIS-B – this is the most widely available cellular data transport. However, in order to use this, your server has to be whitelisted beforehand by RIM. You have to get the connection string from RIM (I can’t show it to you). Take our Bootcamp training and we will show you how to get going.
-BES/MDS – this requires you to have BES server that your BlackBerry is connected to. The URL connection string you have to append is as follows: “http://www.testserver.com;deviceside=false”
-WAP – this works if you have the WAP service books provisioned to your BlackBerry. The URL connection string you have to append is as follows: “http://www.testserver.com;WAPGatewayIP=?.?.?.?;WAPGatewayAPN=????”
Comments
Post a Comment