• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 2, 文章 - 73, 評論 - 60, 引用 - 0
            數據加載中……

            blackberry--黑莓聯網開發各種聯網模板型[轉載]

            最近開發黑莓的應用程序,牽涉到聯網部分。在這過程中遇到了很多問題,也查找了很多資料。很有感觸。于是總結了一份黑莓聯網開發中的各種方式,只是一個模板性的。在開發過程中只有具體問題具體分析了。我也是為了方便不容易忘記,所以寫進博客。希望能記住:

            黑幕目前聯網主要有幾種方式:

            1、WAP 2.0

            2、WAP1.0/1.1

            3、Wi-Fi

            4、BlackBerry Mobile Data Service

            5、Direct TCP

            6、BlackBerry Internet Service

            下面簡單說一下幾種代碼的接口,不一定是必須的,不過如果連不起網的時候可以嘗試一下,這事官方網址一個視頻找到的官方代碼,僅供參考:

            1、Using WAP 2.0:

              - Append ";ConnectionUID=xyz" with corresponding UID for WAP 2.0 Service Book(WPTCP)

              需要在聯網的url后面跟接";ConnectionUID=xyz",xyz為WAP2.0 (WPTCP) 綁定的UID,例如:

              HttpConncetion conn = (HttpConncetion) Connector.open("

            2、Using WAP 1.0/1.1:

             - Append ";WapGatewayIP=127.0.0.1;WapGatewayPort=9201;WapGatewayAPN=myapn.net"

              需要在聯網的后面跟接"WapGatewayIP=127.0.0.1;WapGatewayPort=9201;WapGatewayAPN=myapn.net",例如:

            HttpConnection conn = (HttpConnection) Connector.open("

            3、Using Wi-Fi:

               - Append ";interface=wifi" for explicit connections

              - Wi-Fi connectivity happens automatically for BlackBerry MDS and BlackBerry Internet Service-B connections

              需要為你的詳細連接跟接";interface=wifi",例如:

             HttpConnection conn =  (HttpConncetion) Connector.open("

            4、Using BlackBerry MDS

              - Append ";deviceside=false" for expilit connections

              - Default connection is no parameters specified

             

              Default Connection Example:

              HttpConncetion conn = (HttpConncetion) Connector.open("

              Explicit MDS Connection - Automatic Service Book Selection:

              HttpConncetion conn = (HttpConncetion) Connector.open("

             

              Explicit MDS Connection - Manual Service Book Selection:

              HttpConncetion conn = (HttpConncetion) Connector.open("

            5、Using Direct TCP

              - Requires some intelligence by the user or developer to specify APN

              - Append ";deviceside=true"

              - More and more carriers hardcode APN info in the branding data

              a)   Automatic APN Selection:

              HttpConncetion conn = (HttpConncetion) Connector.open(http://www.blackberry.com;deviceside=true);

              b)   Manual APN Secletion:

              HttpConncetion conn = (HttpConncetion) Connector.open("

              c)   Manual APN Selection with Authentication:

                HttpConncetion conn = (HttpConncetion) Connector.open("

              另外附加一種socket的方式:

              d)  (StreamConnection) Connector.open("socket://testserver:600;deviceside=true");

            6、Using BlackBerry Internet Service

               這個好像需要是Blackberry聯盟成員,需要批準,對這個相關信息可以見:http://na.blackberry.com/eng/partners/alliance.jsp

              以上就是簡單的總結了這些。具體的問題只有開發中具體分析。歡迎莓友們討論。

            注:以上參數之間需要用分號隔開,附帶一份以上出現的一些參數解釋:

            Parameter
             Description
             
            WapGatewayIP
             IP address of the gateway.
             
            WapGatewayAPN
             APN for General Packet Radio Service (GPRS) networks only. For testing purposes, you can use rim.net.gprs
             
            WapGatewayPort
             Gateway port value. If port 9203 is specified, Wireless Transport Layer Security (WTLS) is used unless WapEnableWTLS=false is specified.
             
            WapSourceIP
             IP address of the source.
             
            WapSourcePort
             Source port value.
             
            TunnelAuthUsername
             User name for APN session, when Password Authentication Protocol (PAP) or Challenge Handshake Application Protocol (CHAP) authentication is used.
             
            TunnelAuthPassword
             Password for APN session, when PAP or CHAP authentication is used.
             
            WapEnableWTLS
             Explicitly turns on or turns off WTLS. If this parameter is not specified, WTLS is used by default for connections to port 9203.
             

             

            本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/lyerliu/archive/2010/02/01/5277446.aspx

            posted on 2010-06-08 09:42 郭天文 閱讀(489) 評論(0)  編輯 收藏 引用 所屬分類: BlackBerry

            久久亚洲精品成人av无码网站| 精品国产一区二区三区久久久狼| 久久久这里有精品| 久久午夜福利电影| 久久久国产亚洲精品| 亚洲AV无一区二区三区久久| 无码人妻久久一区二区三区免费 | 久久91精品国产91久久户| 精品九九久久国内精品| 蜜桃麻豆www久久国产精品| 无码国内精品久久综合88 | 久久天天躁狠狠躁夜夜avapp| 国产精品美女久久久久久2018| 9999国产精品欧美久久久久久| 污污内射久久一区二区欧美日韩 | 国内精品久久久久久久涩爱 | 2021少妇久久久久久久久久| 久久无码精品一区二区三区| 精品国产乱码久久久久久1区2区| 国产—久久香蕉国产线看观看| 中文字幕日本人妻久久久免费| 伊人丁香狠狠色综合久久| 伊人久久综合无码成人网| 久久97久久97精品免视看| 2021久久精品国产99国产精品| 中文成人无码精品久久久不卡| 99久久国产主播综合精品| 久久人人爽人人爽人人片av高请 | 国产精品久久波多野结衣| 国内精品久久久久影院亚洲| 精品水蜜桃久久久久久久| 狠狠色丁香婷综合久久| 国产美女久久精品香蕉69| 久久综合给合久久狠狠狠97色| 中文字幕精品无码久久久久久3D日动漫| 久久国产精品无码HDAV | 国内精品久久久久久麻豆 | 亚洲欧美另类日本久久国产真实乱对白 | 伊人色综合久久天天人守人婷| 国产福利电影一区二区三区久久久久成人精品综合 | 国产精品一区二区久久精品涩爱|