I have a question about programmatically using the appropriate WAP gateway postfix for URL's. Specifically I'm looking for a best practice for detecting the appropriate network and making a http connection that wont be refused by that particular network.
Issue Background We're using a HttpConnection to connect to a web service. This works fine for most carriers, but for other we need to provide the appropriate WAPGateway postfix to the URL (As specified in the blackberry article "Different ways to make an HTTP or socket connection" article DB-00396).
Issue Ideally I would like to select the WAP postfix programmatically. Currently we are doing this with the RadioInfo.getNetworkName() method and then doing a compare for the matching network name within an IF-ELSE block that returns the appropriate WAP postfix info. This method is fine, but I feel the solution is a bit fragile and can foresee a lot of issues coming up (i.e. network changes naming convention of its network).
Questions Is there a best practice for assigning the appropriate WAP postfix to a URL prior to making an HTTP connection? I was thinking of using RadioInfo.getNetworkId() but there is no details on what these values map to and if these values are fixed to a specific network.