×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    8

    Refresh issue on Nokia N85

    Hi all,

    I have encountered a refresh issue on Nokia N85, and it does not exist on the other phones(for example: Nokia E51).
    Under normal situation, the flow of my camera demo should be this:
    Camera(Open camera) -> capture(click "Capture" command to capture a picture) -> then preview screen(preview the captured picture)

    Below is the describe of this issue(On Nokia N85).
    Opens up the camera and it captures the picture fine. But then it has to be refreshed manually to get to the preview screen.

    PS. the method of manual refresh:
    Refreshes screen either by moving phone into horizontal position, so N85 rotates the screen , or by using "lock screen" button(locks and unlocks the screen).

    PPS. below are corresponding codes.

    First, start the j2me camera by below method "startCamera()".
    PHP Code:
        public void startCamera() throws MediaException{
            try {
                
    player Manager.createPlayer("capture://image");
            }catch (
    MediaException e) {
                try {
                    
    player Manager.createPlayer("capture://video");
                }catch (
    MediaException ex) {
                    throw 
    ex;
                }catch (
    Exception ex) {}
            }catch (
    Exception e) {}
            
    player.realize();
            
    vc = (VideoControlplayer.getControl("VideoControl");
            
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEOcanvas);
            try {
                
    vc.setDisplayLocation(xy);
                
    vc.setDisplaySize(widthheight);
            }catch (
    MediaException e) {
                try {
                    
    vc.setDisplayFullScreen(true);
                }catch (
    MediaException e1) {
                    throw 
    e1;
                }
            }
            
    player.start();
            
    vc.setVisible(visible);
        } 
    Second, by below codes, capture a picture by "vc.getSnapShot()" at first, then invoke method "previewPicture()" to preview the picture (go to preview screen). Here, the issue appears. The preview screen can't be shown automatically, and it has to be refreshed by above manual refresh method , then it will be shown.
    PHP Code:
     private void captureImage() {
            if ( 
    camera.isBusy() || !camera.isActive()) return;
            new 
    Thread() {
                public 
    void run() {
                    try {
                        
    data vc.getSnapShot("encoding=" picType "&width=640&height=480");
                        
    player.stop();
                        
    player.close();
                        if ( 
    data == null) return;
                        
    previewPicture();
                    }
                    catch (
    Exception e) {}
                }
            }.
    start();
        }


        private 
    void previewPicture() {
            
    Form form = new Form("Preview");
            
    form.setLayout(new BorderLayout());
            
    form.addCommand(new Command("Cancel"));
            
    form.setThirdCommand(new Command("Next"));
            
    form.setCommandListener(this);
            
    Label pic = new Label();
            
    form.addComponent(BorderLayout.CENTERpic);
            
    form.show();
            
    Image image Image.createImage(data0data.length);        
            
    image image.scaled(form.getContentPane().getWidth(), form.getContentPane().getWidth() * 4);
            
    pic.setIcon(image);
            
    form.repaint();
        } 
    This demo is built base on LWUIT framwork.


    Is there anybody know the reason/solutions?

    Thanks in advance.


    .
    Last edited by hreny; 2009-09-22 at 10:58.

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    2

    Re: Refresh issue on Nokia N85

    have the same issue with n85
    repaints doesn't help me what so ever

    but i 've found out why its happening,
    its because the native popups ,security permissions,cetra

Similar Threads

  1. ###Upgrading Firmware###
    By zahid44 in forum General Development Questions
    Replies: 27
    Last Post: 2008-10-21, 07:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×