Capture Code not Working?

27 views
Skip to first unread message

Sakar Thapa

unread,
Jun 16, 2015, 8:24:43 AM6/16/15
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device


I am new to Codename1,i am facing some problem regarding capture and storing captured image.
CODE::

String path=Capture.capturePhoto();              
image = Image.createImage(path);
String homePath= FileSystemStorage.getInstance().getAppHomePath();
 String image_name = System.currentTimeMillis() + ".png";
FileSystemStorage fss = FileSystemStorage.getInstance();
OutputStream save = fss.openOutputStream(homePath + image_name);
 ImageIO.getImageIO().save(image, save, ImageIO.FORMAT_PNG, 1f);

Shai Almog

unread,
Jun 16, 2015, 11:06:46 AM6/16/15
to codenameone...@googlegroups.com, sakar...@gmail.com
What's not working for you?

Sakar Thapa

unread,
Jun 17, 2015, 12:24:09 AM6/17/15
to codenameone...@googlegroups.com
captured file does not exist on custom location but image appears on gallery.

Shai Almog

unread,
Jun 17, 2015, 11:13:15 AM6/17/15
to codenameone...@googlegroups.com, sakar...@gmail.com
Why do you think its not there?
Which stage in the several methods you have listed failed?

sakar

unread,
Jun 18, 2015, 7:14:01 AM6/18/15
to codenameone...@googlegroups.com, sakar...@gmail.com
i think there is no file because that location is totally empty.

Shai Almog

unread,
Jun 18, 2015, 10:35:49 AM6/18/15
to codenameone...@googlegroups.com, sakar.ca...@gmail.com, sakar...@gmail.com
What location?
Reply all
Reply to author
Forward
0 new messages