CHAPI




CHAPI, Java Content Handler API
Java ME Content Handler API, JSR 211


The Content Handler API (CHAPI) allows Java ME applications to invoke another application to handle the specified content type. The appropriate application to handle a content type based on the application management system (AMS) on the device. Applications may register themselves with the AMS to handle various content types. With CHAPI, applications can be developed that hand off content and data at appropriate places. FOr example, if a message has a music file attached to it, the messaging application may use CHAPI to invoke a devices's music player. For more information on CHAPI visit java.sun.com/products/chapi.

Packages
javax.microedition.content

http://java.sun.com/javame/technology/msa/jsr211.jsp
http://java.sun.com/products/chapi/

JSR211 SPEC
http://jcp.org/en/jsr/detail?id=211

Handling Varied Content in J2ME Applications
http://developers.sun.com/mobility/midp/ttips/chapi/index.html
http://mobilezoo.biz/jsr/211/overview-summary.html

A good example

http://www.devx.com/wireless/Article/21958/1763/page/1

 


JSR211-Content Handler API 简介

CHAPI和它的执行模型使应用程序能够调用已注册的J2ME程序和手机本地的非Java程序,一般有三种调用形式:1.通过URL;2.通过内容类型;3.通过内容处理程序的ID。程序在处理内容时能够使用内容处理者的某些功能,比如:应用程序使用一个内容处理者去获得一个特殊的显示内容的功能或者其它的打开、打印、播放内容等功能;比如:一个简单的MIDP MIDlet程序被注册来处理image/png媒体类型的内容,其它应用程序能请求其显示图片。一个内容处理程序能提供用于显示内容、更改内容、返回内容不多种功能。CHAPI的执行模型充分利用了应用程序管理系统提供了流畅的用户体验、控制程序的执行、保存资源、执行设备的安全政策和Java运行环境。


该规范包括以下功能:
1.调用内容处理程序和获得返回内容
2.注册内容处理者

3.查询注册信息
4.响应并处理调用请求

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值