One more thing wanna suggest u. Check whether u have included the resource folder to ur project(in case of NetBeans IDE).
One more thing wanna suggest u. Check whether u have included the resource folder to ur project(in case of NetBeans IDE).
thanks,
jitu_goldie..
KEEP TRYING..
Code:public void playFromResource() { try { InputStream in = getClass().getResourceAsStream("/Muzik/Airtel.3gp"); if (in != null) { mPlayer = Manager.createPlayer(in, "video/3gpp"); }else { alert = new Alert("Alert", "No video", null, null); display.setCurrent(alert); return; } mPlayer.prefetch(); mPlayer.realize(); if((mVidc = (VideoControl)mPlayer.getControl("VideoControl"))!=null) { mVideoItem = (Item)mVidc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null); form1.append(mVideoItem); } mPlayer.prefetch(); mPlayer.start(); // form1.removeCommand(mPlayCommand); display.setCurrent(form1); } catch (Exception e) {e.printStackTrace();} }
this is how i have handled the exceptions.
Hi,
One more point to improve in the code in order to handle the exceptions in a proper manner,is that just append the exception.toString() on a form.
In addition to this,have you check the point that jitu has pointed out?
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
Put that exception in alert then try to Run your application on Device.Raj and jitu told you check your resource first do this.then Run your appliction
Anshu Chauhan
J2me Developer
Hi,
I am more than sure that you are using the Netbeans IDE for the development,so just chck the path-
1.Right click the project\
2.Properties
3.then Libraries and Resources
4.Add the folder,
5.Add the folder which including the desired file,
Hope this can be done.
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
I'm added a image and a video to this application and both the files are in the same folder as the source file is. Code is able to find and display the image file.......not the video..........if not saving it under the resource folder can affect it then probably that is the issue.......??????
I'm using Netbeans........and when i checked my application folder.....there is no folder named resource. Should i create it on my own???
Yup,
you must create this folder and then try to put the all resources in the same.Like the images.media files,etc must be there.Then as I told you add the folder by following the path that I told you.Since the Netbeans IDE read the resources from the added folder,that I have just proposed.
I am wondering that you can read the image from the file in which the code of the project is.both the files are in the same folder as the source file is. Code is able to find and display the image file.......not the video..........
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
i followed the above instructions and now its giving me an media exception............i'm trying to run it again on the phone.....to test it.
Congrats.......all.........
it did not work on the emulator but it did on the phone................however there are some control issue.......but i'll work on it first and if any issues....... i'll let you helping ppl know.
Thanks a lot to all of you.....
1-Ansh
2-Jitu
3-Raj
Hello All,
I have found some information about this issue which may be helpful for you people to help me out on this issue which is still an ongoing issue.
This video is not working on Nokia phones above the S60 Series 2nd Edition like Nokia N73, N80. It works for lower editions like Nokia N70 and Nokia 3120.
How does this makes a difference that i'm not sure of. So if you have any information, plz post it.