Question

I want to make an application that takes a snapshot from Camera and send it to the server. I can do this pretty easily in Highlevel UI using MediaPlayer but it seem that I can't use the same code in LWUIT.

VideoControl vc;

Item videoItem = (Item) vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);

Since it didn't work I used the MediaComponent.

MediaComponent videoItem =  (MediaComponent) vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);

but it didn't work either. A class cast exception is thrown. Can you please tell me how to implement it.

Was it helpful?

Solution

You don't need to call initDisplayMode for LWUIT. This is invoked internally by LWUIT, just add the video item to the LWUIT Form and the initDisplayMode method will be invoked for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top