• <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
            數(shù)據(jù)加載中……

            blackberry--黑莓聯(lián)網(wǎng)開發(fā)各種聯(lián)網(wǎng)模板型[轉(zhuǎn)載]

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

            黑幕目前聯(lián)網(wǎng)主要有幾種方式:

            1、WAP 2.0

            2、WAP1.0/1.1

            3、Wi-Fi

            4、BlackBerry Mobile Data Service

            5、Direct TCP

            6、BlackBerry Internet Service

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

            1、Using WAP 2.0:

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

              需要在聯(lián)網(wǎng)的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"

              需要在聯(lián)網(wǎng)的后面跟接"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

              需要為你的詳細(xì)連接跟接";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聯(lián)盟成員,需要批準(zhǔn),對這個相關(guān)信息可以見:http://na.blackberry.com/eng/partners/alliance.jsp

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

            注:以上參數(shù)之間需要用分號隔開,附帶一份以上出現(xiàn)的一些參數(shù)解釋:

            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博客,轉(zhuǎn)載請標(biāo)明出處:http://blog.csdn.net/lyerliu/archive/2010/02/01/5277446.aspx

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

            91精品日韩人妻无码久久不卡| 精品久久人人爽天天玩人人妻| 久久亚洲AV成人出白浆无码国产| 国产精品9999久久久久| 久久久久一本毛久久久| 久久亚洲精品人成综合网| 久久久久久av无码免费看大片 | 色综合久久久久| 一级a性色生活片久久无少妇一级婬片免费放| 精品国产乱码久久久久久呢| 麻豆精品久久久一区二区| 久久久久久精品成人免费图片 | 久久香蕉超碰97国产精品| 久久有码中文字幕| 99久久婷婷国产一区二区| 性高湖久久久久久久久| 波多野结衣久久精品| 久久精品国产只有精品66| 久久青草国产精品一区| 国产精品久久久久jk制服| 国色天香久久久久久久小说 | 久久国产免费观看精品3| 人妻丰满?V无码久久不卡| 久久香蕉一级毛片| 久久伊人精品一区二区三区| 99久久精品免费| 久久综合久久久| 久久九九亚洲精品| 亚洲综合精品香蕉久久网97| 国内精品久久久久影院一蜜桃| 亚洲av成人无码久久精品| 少妇高潮惨叫久久久久久| 少妇久久久久久久久久| 久久国产精品99国产精| 久久影院综合精品| 久久精品9988| 久久久久九国产精品| 少妇熟女久久综合网色欲| 久久久久国产精品嫩草影院| 狠狠色婷婷久久一区二区| …久久精品99久久香蕉国产|