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 阅读(1097) 评论(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  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: