2

I am new for J2me , can some tell me how can we open image located in memory card open in device default player, same for video.

I try for CHAPI, but its not working. Its work only for http urls.

I saw WhatsApp in S40 Device Nokia Asha 303, it is doing same thing what i want, it open read image from its memory card & display it in Default Image Viewer of Device.

Thanks In Advance

vnaren001
  • 244
  • 2
  • 11

1 Answers1

0

You can use platformRequest() to call native stuff, like dialing a phonenumber or opening a webpage. I've never tried opening a local file, but it should work the same way.

http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/midlet/MIDlet.html#platformRequest%28java.lang.String%29

So if you do platformRequest("file://path/to/video.mp4"); then the device should figure out that it's a video and then open the default video-viewer.

mr_lou
  • 1,910
  • 2
  • 14
  • 26
  • I already tried for platformRequest() call but it support only "http://" on Nokia S40 Asha 303 and I am passing "file://". Its not working. – vnaren001 Feb 28 '13 at 08:25
  • Really? That's quite surprising, considering Asha 303 is a model from 2011 running MIDP2.1. Then I have no clue how they've done it in WhatsApp. You could try decompiling their source and find out. – mr_lou Feb 28 '13 at 13:35
  • Thanks for reply mr_lou, can you let me know how can I decompile the code, Ihe app is installed in my Nokia Asha 303. This was inbuilt app in my device & Once i updated it from Nokia store. – vnaren001 Mar 12 '13 at 08:50
  • I don't know how to copy the app from the phone to your computer. But you can find java decompilers by searching for java decompilers on Google. – mr_lou Mar 12 '13 at 11:57
  • @vnaran001 have you find solution for this problem?? – Jemish Patel Apr 24 '13 at 10:54