J2ME应用程序

技术标签: 图像捕获

我为移动的J2ME应用程序提供了移动... IM试图打开应用程序中的移动相机并捕获图像..请执行此操作呢?请尽快回复。

看答案

如果手机支持MMAPI,则可以使用这样的快照。

//Use this method to initialize
// m_Form is the displayed Form
private void startPlayer() {
   try {
         Player m_objPlayer = Manager.createPlayer("capture://video");
         m_objPlayer.realize();
         m_objVideoControl = (VideoControl)
         m_objPlayer.getControl("VideoControl");
         if (m_objVideoControl != null) 
         {
           m_Form.append((Item) m_objVideoControl.initDisplayMode(
           VideoControl.USE_GUI_PRIMITIVE, null));
           m_objPlayer.start();
         }
       } catch (Exception exc) {
            // handle Exception
}

// Use this to take a snapshot
public void commandAction(Command cmd, Displayable d) {
   if ((cmd == snapShotCommand) && d == this) {
    try {
         data =
           m_objVideoControl.getSnapshot("encoding=jpeg&width =160&height=120"));
          // m_objVideoControl.getSnapshot("encoding=png&width= 80&height=60"));
          // m_objVideoControl.getSnapshot("encoding=bmp&width= 160&height=120"));
   } catch (Exception exc) {
     // handle Exception
   }
}

这是阳光下的旧文章 点击我!


智能推荐

J2ME与空间制图服务(WMS)应用集成

本文探讨利用 J2ME 手机,实现移动设备与空间制图服务(WMS)网络应用服务集成,可以实现对J2ME手机对网络LBS、GIS 图像数据的访问与地图数据的显示,并在迅速实现小型的LBS、移动 GIS 核心的导航地图的显示功能。 <!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- include java script on...

7大极好的移动应用开发J2ME工具

在移动应用程序开发工具的广泛网络市场中,J2ME工具已成功抢去了所有的风头。由Sun Microsystems公司开发的J2ME曾作为一个了不起的选项处理各种商品的开发相关事宜。无论是有关建立连接,为智能手机创建实用程序还是启用安全的手持式工具,J2ME专为满足无线设备和智能手机的各种需求。 由于J2ME的开发工具容易获得,因此受到开发人员的青睐。通过这些专业人士可以充分利用他们选择通过构建易于导...

J2ME学习笔记:Form和TextField的使用,附程序,截图(原创)

Form在这里就像之前说过的TextBox一样,作为一个画布,可以往里面添加很多控件对象并且显示出来,但Form可以存放更多的对象。而TextField就好比我们做页面时的表单输入框一样,提供给我们输入文字信息,其构造方法如下:TextField(标题,默认内容,最大系数,输入内容的类新),以下给出一个相关程序: import javax.microedition.midlet.MIDlet; i...

j2me手机开发入门

j2me手机开发入门 <1> 下载 eclipse3.2 \ j2me_wireless_toolkit-2_1_01-windows.exe \ eclipseme1.6.8并安装 //使用eclipse3.1有点问题   <2>重新启动eclipse,点击 windows ->选择 preference ->选择 j2me ->选择 Devi...

J2ME开发的一般步骤

最近一段时间发现身边有一本买了一年多的J2ME的书没看,于是抱起来大概看了一下,我的E72是Symbian系统,支持J2ME,所以做了几个简单的小玩意。在学习J2ME开发的过程中有一些简单的心得和体会,现在写下来备忘,如果有朋友也正在学习J2ME开发,觉得有帮助的话,那是最好不过的事情了。 1.开发环境安装配置 目前开发J2ME应用的环境有多种,有基于NetBean的,不过仍以Eclipse为主流...

猜你喜欢

j2me学习二_LCDui类学习(1)

类图: 1. Alert Alert是一种桌面上的弹出窗口,可以在后台运行。 组成:Title(标题),Body(提示信息),Icon(在提示框右边出现的图标),Progress bar(进度条,一般为Gauge对象)。 示例代码: import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class...

J2ME Class Not Found java/lang/ClassNotFoundException

when u r getting message like class not found it means from where ur application is being start that class is not access by the emulator and it is missing for it thats why such a error will generated....

j2me学习四_LCDui类学习(3)

Graphics Graphics对象可以用在任何可以画的地方,属于低级Api,执行的时候要么在屏幕上,要么在缓存中,Graphics对象可以通过getGraphics()方法获得。 它有许多成员方法,能够画的有:text, images, lines, rectangles, arcs,记住在使用之前设置好颜色。 Commond Command(Stringlabel, intcommandTy...

无意中发现看书也是一种美

2012年4月25日晚,翻翻自己喜欢的一门语言学习书(python参考手册),无意中发现书中夹着之前的明信片(有一次和同事一起去前门邓丽君音乐生活馆留下来的),感觉学习也是一种美!于是乎拍下这不经意的时刻,哈哈!...

香橙派OrangePi PC Plus开发板连接USB以太网卡测试说明

1) 目前测试过能用的 USB 以太网卡如下所示,其中 RTL8153 USB 千兆网卡插入开 发板的 USB 2.0 Host 接口中测试可以正常使用,但是速率是达不到千兆的,这点请 注意   2) 首先将 USB 网卡插入开发板的 USB 接口中,然后在 USB 网卡中插入网线,确 保网线能正常上网,如果通过 dmesg 命令可以看到下面的 log 信息,说明 USB 网卡...

问答精选

How to extract beta coefficients for interaction effect in R?

I am examining the interaction between a continuous variable (bloodq) and a categorical variable with three levels (ER, RB, and WB). In order to see how the betas differ across tissue types, I would l...

what is the difference between Flatten() and GlobalAveragePooling2D() in keras

I want to pass the output of ConvLSTM and Conv2D to a Dense Layer in Keras, what is the difference between using global average pooling and flatten Both is working in my case. That both seem to work d...

How to invoke a test step with inputs at runtime from groovy script in SOAP UI?

I am writing a validation groovy script for a test step, intended to test a SOAP Web Service. Now, I want to call the same test step, with different input value from the groovy script. Is it possible?...

Wicket pagestore results wrong page

I have a problem with my web application with wicket. I am using wicket 6.14. I can't say exactly what the problem is, but I can describe the problem. I am using a self written pagestore, which uses h...

Unity load files from outside of resources folder

In unity is it possible to load a resource that is out side of the resources folder. I want the user to be able to set a textAsset variable from a file outside of the Assets directory entirely. You ca...

相关问题

相关文章

热门文章

推荐文章

相关标签

推荐问答