File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes accessing photos from camera phone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "accessing photos from camera phone" Watch "accessing photos from camera phone" New topic
Author

accessing photos from camera phone

Brad Hill
Greenhorn

Joined: Jan 26, 2004
Posts: 4
How can photos from a camera phone be access via J2ME? Would this require platform extension from manufacturer? How about MMA?
Thanks!
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Yes, MMAPI should do:
http://developers.sun.com/techtopics/mobility/midp/articles/picture/


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Brad Hill
Greenhorn

Joined: Jan 26, 2004
Posts: 4
Thanks for the reply!
My question I guess more specifically is: Can the photos taken by the standard phot software already installed on a given cell phone be accessed using MMAPI or even MIDP 2.0? I don't want to reinvent photo taking capabilities using a midlet if I can access the photos taken by the standard software already on a cell phone.
Thanks!
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
No, the MIDP runtime does not have standard APIs to access data files created by native apps. The PDA optional package integrates MIDlet with the native PIM apps (calendar, todo etc) but not camera or voice recorder etc.
Depending on your phone, your device vendor might provide proprietary MIDP APIs to give you access to the photo folder. But this is certainly *not* done on Nokia phones.
Brad Hill
Greenhorn

Joined: Jan 26, 2004
Posts: 4
Thanks!
I'm new to J2ME so please forgive the ignorance. Is there an optional standard package that gives me access to the file system of a phone? I thought there was a specification but it wasn't required to be implemented.
My next question may be too difficult since it isn't Java related. Does the Symbian OS give developers access to the photo folder?
Thanks for the help!
[ January 28, 2004: Message edited by: Brad Hill ]
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Originally posted by Brad Hill:
Thanks!
I'm new to J2ME so please forgive the ignorance. Is there an optional standard package that gives me access to the file system of a phone? I thought there was a specification but it wasn't required to be implemented.
My next question may be too difficult since it isn't Java related. Does the Symbian OS give developers access to the photo folder?

For the first one: The PDA optional package's File Connection API gives you access to the file system. I do not think it is available on any phones yet although some Motorola phones have their own Java file I/O implementation.
For the second one: Yes, I think so. In fact, the native camera application itself is written in Symbian C++.
disen tan
Greenhorn

Joined: Jun 24, 2003
Posts: 9
actually u can access the photos taken by camera in ur phone.. the standard midp1.0 may not have api for accessing it but the extended package MMAPI (Mobile Multimedia API) "MIGHT" have api for ur purpose.. Look into the MMAPI documentation and look for DataSource class, it's the protocol that i believe can let u access all the media in ur phone, including photos... i have no time to try it out..if u happen to make it, please let me know ... thanx...
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
The MMAPI is designed to be very flexible. For example, the DataSource you mentioned above is an abstract class -- someone must implement it. The device maker could provide a DataSource implementation that supports custom "locators" to access the photo folder on the device. But they are not required to do so.
If you implement it yourself, you can only feed it with InputStreams you can get hold of. If your device does not allow you to open an I/O stream to the photo folder, there is nothing you can do about it.
Anyway, I am also interested in hearing any success story on using DataSource to access native photo folders. Thanks.
Brad Hill
Greenhorn

Joined: Jan 26, 2004
Posts: 4
Thanks for the replies!
I'll let everyone know when I find out. I ordered several books which should arrive soon.
Thanks.
disen tan
Greenhorn

Joined: Jun 24, 2003
Posts: 9
so far i couldn't find any j2me application dat could access the native photo folder using MMAPI DataSource. There is another way to get around it, set up a webserver for receiveing mobile users' photos thru MMS or other kind of methods, and download the photos from ur j2me midlet and store it in RMS..ofcourse with an option dat de users can use ur midlet to take photo and save it straight away, in this case the user cannot view de photos via native photo viewer program. I think the commercial photo album application like MyMobilePix uses this way...
Marco Pollo
Greenhorn

Joined: Sep 17, 2004
Posts: 1
Motorola v80 has java application called slideshow.That application reads pictures folder and then represent them in slideshow with prety cool effects.
I was trying to make the same application for my sonny ericsson k700 but on sony ericssons developer site they ara saying that this would be a violation of the sandbox security model.
So its up to manufacturerer to alow acces to the pictures ,moto alows it sony doesnt
Mocky Johnson
Greenhorn

Joined: Aug 05, 2004
Posts: 8
i am also doing something like accessing the image files in the phone/card memory... if u wanna more about it
go to jcp.org and download the api for JSR 75
Di Hay
Greenhorn

Joined: Oct 13, 2004
Posts: 4
HI,

i am trying to create an application that makes a picture using the phone's camera and then saves it for sending via MMS.
I created the part where the picture is taken and now i'm stuck in thinking how to save the picture. Should i use RMS?

Thanks!
Punit Raizada
Ranch Hand

Joined: Mar 20, 2004
Posts: 156
Just a thought.

When you take the picture you could send it to server from the MIDlet. That way you do need to store it.

In case you do decide to send the picture to the server you could also explore the possibility of breaking the picture in two to 3 parts and then sending it over part by part.

hope it helps,


SCJP 1.4
Everything that can go wrong will go wrong -Murphy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing photos from camera phone
 
Similar Threads
camera cell phones
controll the web camera
how to use phone secound camera?
API for interacting with camera in a mobile device
How to get Image location in mobile phones