Good day everyone!
I'm trying to capture an image, but always gives an error:
javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=png
In the comment concluded with the other options that I tried. The result is the same. I'm trying in NetBeanse 6.8 and emulator for Nokia Series 40 6th Edition SDK

Code:
   private void startAlarm() {
      byte[] snapShot1;
      //String encode = "encoding=image/jpg&quality=70&width=320&height=240";
      //String encode = "encoding=image/gif&width=320&height=240";
      //String encode = "encoding=png&width=640&height=480";
      //String encode = "null";
      String encode = "encoding=png";
      Player p;
      VideoControl vc;
      try {
         p = Manager.createPlayer("capture://image");
         p.realize();
         vc = (VideoControl) p.getControl("VideoControl");
         if (vc != null) {
            Form form = new Form("video");
            form.append((Item) vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null));
            Display.getDisplay(this).setCurrent(form);
         }
         p.start();
         vc.setDisplayFullScreen(true);
         vc.setVisible(true);
         snapShot1 = vc.getSnapshot(encode); // ERROR!
      } catch (IOException ioe) {
      } catch (MediaException me) {
         me.printStackTrace();
      }
   }