CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Location
    Mauritius Island
    Posts
    154

    [RESOLVED] J2ME Error

    Hello! I'm currently testing an MMAPI Example from Nokia which involves the camera. What the example does is simply to use the camera and then take a picture. However, when I compile and run the example I get a message on the emulator telling me: "Camera wants to record snapshot image", "Is it OK to record?". When I press "Yes", nothing seems to happen. How do I get rid of it?

    Moreover, when I send the JAR file that has been built to my SE S700 or SE K500, I get an error message saying: "Downloading Failed". Why is it so? Is it because the file is too tiny (~5 kb only)??

    I'm attaching the code. It can be opened directly into NetBeans.

    Help would be much appreciated. Thank You!
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2004
    Location
    Mauritius Island
    Posts
    154

    Re: J2ME Error

    I've managed to make it work. I had to use a different thread for the Capture part. Here is the piece of code that has been modified:
    Code:
        class stopRecord extends Thread {
            public void run() {
                if(player!=null){
                    try{
                        byte[] pngImage=videoControl.getSnapshot(null);
                        midlet.cameraCanvasCaptured(pngImage);
                    }catch(MediaException me){
                        message1="MediaException:";
                        message2=me.getMessage();
                    }
                }
            }
        }
    
        public void takeSnapshot()
        {
    	new stopRecord().start();
        }

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured