DANCE WITH JAVA

          開發出高質量的系統

          常用鏈接

          統計

          積分與排名

          好友之家

          最新評論

          html in mms or fetch remote media in mms(彩信中能否自動訪問遠程資源)

          最近因為工作需要拿出幾天時間研究mms,結果真讓我郁悶,也浪費了幾天的時間,為了讓大家節省些時間,我盡量把這些過程寫出來,僅供參考,呵呵。省的大家跟我一樣到處找好久找不到東西。
          一、主題:
          彩信中能否自動訪問遠程資源
          二、解決的路程
          1、發現smil
          首先翻閱大量資料,發現彩信支持smil,研究smil發現一個網站  http://www.w3school.com.cn
          在這個網站中找到smil教程及模擬器,其中這么一頁:http://www.w3school.com.cn/smil/smil_media.asp
          里邊的示例代碼如下
           1<html xmlns:t="urn:schemas-microsoft-com:time">
           2<head>
           3  <?import namespace="t" implementation="#default#time2">
           4</head>
           5<body>
           6
           7<t:video
           8src="http://www.ananova.com/about/vap_windows_check.wmv"
           9repeatCount="indefinite"
          10type="wmv" />
          11
          12</body>
          13</html>
          點擊看了下演示效果,然后帶來了無盡的希望。。。

          2、深入smil驗證
          讓朋友在彩信平臺上做好彩信下發,一次次的試,各種手機nokia,moto,山寨都不行。
          難道此路不通?

          3、走進html in mms
          暫時放棄smil的路,換一個方向,俗話說條條大路通羅馬
          發現mms的content大多是打包的本地文件,那能否遠程文件呢?Content-Location   X-Wap-Content-URI這兩個參數,經過實驗無效
          再回來看content-type,發現支持的太多了,其中有intenet中的,也有wap中的,我想找的是彩信中的。
          沒辦法又開始資料的海選了,呵呵。一步步最終鎖定一個lib包和一個工具。這兩個可是nokia官方提供的啊,應該有權威性
          lib包是:Getting_Started_with_MMS   工具是:nokia mobile internet toolkit4.1
          發現Getting_Started_with_MMS   包中的jar包的常量類中支持的content-type的類型包括了text/html,文檔中也有相關的描述,希望又來啦
          而nokia mobile internet toolkit也能作出帶html的彩信,還可以打包成.mms的后綴,希望啊,希望

          4、驗證html in mms
          用nokia mobile internet toolkit作出帶html的彩信,html中用<img src="http://xxxx" />取遠程資源
          拷貝到模擬器里邊實驗,每次都提示錯誤,不能識別對象,沒辦法,找真實環境試驗吧,發給朋友在彩信平臺上測試,結果讓我郁悶
          不行,不能使用,是真的不能使用還是我們的做法有問題呢。真的有點不甘心

          5、求證之路(smil不通)
          為了求證,我就開始把目光鎖定到nokia的官網,第一個找到的文檔是
          Series_60_DP_2nd_Ed_SMIL_Tutorial_And_Guidelines_For_MMS_v1_2_en.zip
          這個里邊帶的一個excel中發現了這樣的內容,
          MEDIA-ATTRS        
          src support for relative URI:
           src="image.jpg"
           [URI] of the media element, used for locating and fetching the associated media. Note that this attribute is not required. A media object with no src attribute has an intrinsic duration of zero, and participates in timing just as any other media element. No media will be fetched by the SMIL implementation for a media element without a src attribute.
          YES
          support for content-id:
           src="cid:image.jpg"
          YES
          support for content in network:
          src="http://www.somewhere.org/image.jpg" src="rtsp://www.somewhere.org/stream.sdp"
          NO
          type type="image/jpeg" Content type of the media object referenced by the src attribute. If media is available in multiple formats this may define preferred content-type. Exact usage is protocol specific (file://, http://, rtsp://...).  NO
          里邊紅色的部分是no,真讓人郁悶,再看看例子中,連如下的都支持了,就是不支持content in network
           1<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
           2    <head>
           3        <layout>
           4            <region id="Image1" fit="meet" left="5%" top="5%" width="40%" height="40%" />
           5            <region id="Image2" fit="meet" left="55%" top="55%" width="40%" height="40%" />
           6            <region id="Image3" fit="meet" left="25%" top="25%" width="40%" height="40%" />
           7        </layout>
           8    </head>
           9    <body>
          10            <par dur="10s">
          11                    <a href="mailto:email.address@nokia.com" >
          12                        <img src="Series60.gif" region="Image1"/>
          13                    </a>
          14                    <a href="phoneto:+358501234567">
          15                        <img src="smile.gif" region="Image2"/>
          16                    </a>
          17                    <a href="www.w3.org">
          18                        <img src="SmileyFace.gif" region="Image3"/>
          19                    </a>
          20            </par>
          21     </body>
          22</smil>
          23

          6、求證直路(html in mms不通)
          在nokia論壇上到處尋找,發現有人跟我遇到了同樣的問題:
          http://discussion.forum.nokia.com/forum/showthread.php?t=30555
          最終關閉topic的時候的話:
           1>HTML is not a supported media type in the MMS Viewer
           2Ah, so that's it! I was assuming it is supported when it shows in the attachment list and can be displayed (though I've found errors in html display) and it was bugging me why I can't get it to show in MMS body. 
           3
           4In my case (1.1) setContentID works well and I see the name I've assigned to the object. 
           5
           6Anyhow, this closes the topic for me: no html in MMS messages. 
           7Thanks for the help. 
           8
           9Best regards, 
          10Marko
          11
          看來此路不通。

          7.至此,這個方向的實驗告一段落,看來條條大路通羅馬,但是羅馬還是很遠啊~
          雖然是個沒有成功的經驗,但是可以幫大家少走些彎路吧。
          總結一下:從03年到現在nokia的mms開發工具更新過,但是lib包沒變化,mms player也沒大變化,同時好像是有意的不支持自動取網絡資源的功能
          不知道是不是從安全的角度考慮的。

          posted on 2009-05-22 11:51 dreamstone 閱讀(1121) 評論(1)  編輯  收藏 所屬分類: 片段

          評論

          # re: html in mms or fetch remote media in mms(彩信中能否自動訪問遠程資源) 2013-01-13 18:21 W3School官網

          http://www.w3school.org.cn/smil/smil_media.asp  回復  更多評論   

          主站蜘蛛池模板: 五家渠市| 临沭县| 共和县| 汉中市| 石河子市| 错那县| 日照市| 临猗县| 兴仁县| 公主岭市| 增城市| 融水| 无棣县| 德钦县| 措勤县| 论坛| 沁阳市| 错那县| 江安县| 娄底市| 昌江| 泽库县| 鹤壁市| 蓬莱市| 婺源县| 西城区| 普兰县| 遂昌县| 惠安县| 澜沧| 潢川县| 牡丹江市| 盐津县| 宿州市| 陈巴尔虎旗| 印江| 伊川县| 边坝县| 凌海市| 襄城县| 惠州市|