Sign in to follow this  
Volverine

[java] How To access cell's mp3 file from a JAR file

Recommended Posts

Volverine    142
i've been sufferin wid dis prob dat how to access any file of mobile from my programmed JAR file by using MIDP 2.0 Its really urgent..........

Share this post


Link to post
Share on other sites
Palidine    1315
i'm not 100% sure that MIDP would allow you access to the phones file system at all except in folders local or child to the one in which your app is installed. I'd read through the MIDP documentations about accessing the local file system and see what the API has to say about restrictions for doing that, etc.

you can find some of the relevant docs here:
http://java.sun.com/j2me/docs/index.html

the rest you can find on google.

-me

Share this post


Link to post
Share on other sites
siaspete    208
I've been looking at this myself just now. Not mp3, just data files in the jar.

As far as I can tell, put the file in the "res" folder for your project, then use code like this to open it:

InputStream is = getClass().getResourceAsStream("/file.mp3");

I don't know what you should do for your mp3 now.

Share this post


Link to post
Share on other sites
Volverine    142
Quote:
Original post by siaspete
I've been looking at this myself just now. Not mp3, just data files in the jar.

As far as I can tell, put the file in the "res" folder for your project, then use code like this to open it:

InputStream is = getClass().getResourceAsStream("/file.mp3");

I don't know what you should do for your mp3 now.


well its like dunno wht mp3 files da user may hav on his mobile soo its like i want ma program to be good enough to load da current mp3 files from da mobile memory. So i guess dis puttin files in "res" folder wont do ane good........

Share this post


Link to post
Share on other sites
Volverine    142
Quote:
Original post by Palidine
i'm not 100% sure that MIDP would allow you access to the phones file system at all except in folders local or child to the one in which your app is installed. I'd read through the MIDP documentations about accessing the local file system and see what the API has to say about restrictions for doing that, etc.

you can find some of the relevant docs here:
http://java.sun.com/j2me/docs/index.html

the rest you can find on google.

-me


well if MIDP 2.0 does'nt support file accessin den it cannot be capable of makin sms readers type programs too, but i've seen sum good programs which r alternates of readin sms of yr mobile dan da one build-in in da mobile. I wish i could get da code of dese programs but i guess i've to wait for u guyz to figure dis prob for me.

n i've been goin through da whole documentation of J2ME or MIDP2.0 but could'nt find anething at all

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this