I'm using Series 40 6th Edition SDK and try to capture a image, here is how I do it:
(1) check if the platform support image cature
System.getProperty("supports.video.capture"); // return true
(2) check the supported content types
String contentTypes = Manager.getSupportedContentTypes("capture"); // it contains encoding=png
(3) create the video control
player = Manager.createPlayer("capture://image");
videoControl = (VideoControl)player.getControl("VideoControl");
(4) get the snapshot
byte capturedImageData = videoControl.getSnapshot("encoding=png");
But the emulator says : Invalid locator : capture://video?encoding=png , it's so weird that the capture protocol becomes video !!
then I tried this:
byte capturedImageData = videoControl.getSnapshot(null);
Now the error become: RecordControl error
I've read many threads in the forum, but didn't find a solution
I'm so frustrated by Nokia S40, anybody can help ? thanks in advance!!