【问题标题】:How to simulate camera midlet in Nokia C6?如何在诺基亚 C6 中模拟摄像头 midlet?
【发布时间】:2012-08-28 20:47:03
【问题描述】:

我需要模拟诺基亚默认相机 midlet 的行为。

它是为诺基亚 C6 编写的,我正在用 J2ME 编写它。

我使用MMAPI,问题是VideoControl项的大小,我做了videoControl.setDisplayFulscreen(true);但根本不是全屏,setDisplaySize方法没有帮助,videoControl本身的大小大约是三分之一显示(所需的 displaySize 的其余部分只是黑色),这是一个代码示例:

public CameraCanvas (Evidence_elektromeru midlet, ManagePhotos caller,String name) { 
    super(true);
    this.midlet = midlet;
    this.caller = caller;
    this.name = name;
    this.setFullScreenMode(true);

    try {
        player = Manager.createPlayer("capture://devcam0");
        player.realize();
      //  player.prefetch();
        if (videoControl2 != null) 
                videoControl2.setVisible(false);
        videoControl1 = (VideoControl) player.getControl("VideoControl");
        videoControl1.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
        videoControl1.setDisplayLocation(0, 0);
        videoControl1.setDisplaySize(360,500);
        }catch (MediaException me2) {
            try {
                videoControl1.setDisplayFullScreen(true);
            } catch (Exception e) {}
             }
    catch (Exception e) {}
    finally {
               try {
              player.start();
               } catch (Exception e) {}
              videoControl1.setVisible(true); 


        }

【问题讨论】:

  • 您需要签署您的申请。
  • 我可以使用相机,但我希望我的相机看起来像诺基亚 c6 中的默认相机。无论其配置文件模式的景观如何,它们的显示屏上都有宽屏 VideoControl :(
  • 使用 VerySign 证书签署您的申请。

标签: java-me camera nokia mmapi


【解决方案1】:

尝试使用

 mCamera = Manager.createPlayer("capture://video");
 mCamera.realize();
 mCamera.prefetch();

或者您可以替换 mCamera = Manager.createPlayer("capture://video");由

mCamera = Manager.createPlayer("capture://image");

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-25
    • 1970-01-01
    • 1970-01-01
    • 2019-09-01
    • 1970-01-01
    • 2013-08-25
    相关资源
    最近更新 更多