Correct me if im wrong.
But as far as i understand the API,
- First i need te make a new object of the class “CameraHandler”
- Then i need te connect te handler to my canvas.
- Then i use the function “createCamera()” to set my camera
And then i shoud see the videostream of the camera on the screen…?
Because all i get is al black screen from the code below
public class CameraView extends nUIViewDisplay{
public CameraView (MyCanvas controller, ExpenseItem current_expense)
{
super (Constants.NUIID_SETTINGS_VIEW);
this.controller = controller;
if(current_expense!=null)
setHeadertext ("Photo: "+current_expense.getName());
else
setHeadertext ("Photo: New expense");
CameraHandler camera = new CameraHandler();
camera.initCamera(controller);
camera.createCamera();
camera.getCameraSnapshot("PNG", 100, 100);
// Button to go back
add(new nUINavbuttonElement(Constants.NUIID_BACK_PHOTO_VIEW, Util.getString(Parameters.TEXTID_BUTTON_BACK), nUINavbuttonElement.TYPE_BACK, null));
}
protected MyCanvas controller = null;
}
Or is this normal because i run this on my computer…
#Integration-Server-and-ESB#webMethods#webMethods-General#mobile