Hi all. I'm trying to open a RTSP stream using real player with my J2ME application. but I get the error
Cannot make a static reference to the non-static method platformRequest(String) at the lineCan you please check my code ? what am I doing wrong ? what should I do to make this work ?Code:MIDlet.platformRequest(url);
ps: I'm working on nokia e65, MIDP 2.0 CLDC 1.1
here's my code
Code://imports here public class VideoCanvas extends Form implements CommandListener { private Command start; private Command back; private Command exit; private Command rotateLeft; private Command rotateRight; private String url; VideoCanvas(String url) { super("MHSS"); { start = new Command("Start",Command.OK,0); back = new Command("Back",Command.OK,0); exit = new Command("Exit",Command.BACK,0); rotateLeft = new Command("Turn Camera Left",Command.OK,0); rotateRight = new Command("Turn Camera Right",Command.OK,0); this.url = url; addCommand(start); addCommand(rotateLeft); addCommand(rotateRight); addCommand(back); addCommand(exit); setCommandListener(this); } } public void commandAction(Command c, Displayable arg1) { if(c == start) { try { MIDlet.platformRequest(url); //this is where I get the error ???? } catch (Exception e) { e.printStackTrace(); } } else if(c == exit) { Main.midlet.notifyDestroyed(); } else if(c == back) { Main.mobileDisplay.setCurrent(Main.loginForm); } else if (c==rotateLeft) { RotateCamera rotateCameraObject = new RotateCamera("ROTATELEFT"); Thread rotateCameraThread = new Thread(rotateCameraObject); rotateCameraThread.start(); } else if (c==rotateRight) { RotateCamera rotateCameraObject = new RotateCamera("ROTATERIGHT"); Thread rotateCameraThread = new Thread(rotateCameraObject); rotateCameraThread.start(); } } }

Reply With Quote


