For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 10 replies, 3 voices, and was last updated 13 years, 9 months ago by
Max87.
-
AuthorPosts
-
Max87MemberHello guys,
I’m trying to take picture and store it’s location using phonegap.
The problem is, that captured photos is stored at Temp directory, which deletes sometimes.
My question is, how can I copy/move my captured photos into Document/Photos folder(I can create Photos folder via Phonegap Directory API).
Thank you for any help.
Max87October 29, 2012 at 7:09 pm #331803
support-michaelKeymasterHi Max,
>My question is, how can I copy/move my captured photos into Document/Photos folder(I can create Photos folder via Phonegap Directory API).
Based on your info are you looking for the process to save a captured image (photo) to a specific path? That is you already have the dir created?
October 29, 2012 at 7:15 pm #331804
Max87MemberHi Wayne,
yes, that’s I’m trying to do. Problem is, when I capture a photo, it saves in app’s Temp directoy, which can be deleted by iOS – so my photos are gone. So I’m trying to capture photo and move it to new folder in my app’s Documents, which cannot be deleted automatically(and can be backed up to iCloud btw).
ThanksOctober 31, 2012 at 4:24 pm #331879
support-michaelKeymasterWe are discussing with the dev team.
1) are you effectively creating another photo gallery (may app specific gallery)?
2) have you looked at the phonegap FileEntry api for moving or copying a file?
MobiOne 2.2.x uses the apache cordova/phonegap 1.1 apis:
http://docs.phonegap.com/en/1.1.0/October 31, 2012 at 4:34 pm #331880
Max87MemberHi Wayne,
1. I don’t understand what you mean. I can take pictures from camera, save it into temporary folder and retrieve ImageURI(full path).
2. Yes, I looked at the FileEntry API, but I don’t know how to use it. I found this solution – http://stackoverflow.com/questions/10335563/capturing-and-storing-a-picture-taken-with-the-camera-into-a-local-database-phbut it’s not working for me – if I save image as base64-encoded string, movepic function is not called/working.
The only thing I can do is, that i take picture, retrieve its full path, the image is saved into Temp directory. Also, I can create custom folders into Documents. But I need help how to use that FileEntry API, so I can move my photos into new directory.
I can send you my project if it helps.
Thank youNovember 6, 2012 at 1:59 pm #332056
support-michaelKeymasterWe have not had time to develop an example for your scenario. We have been working on an Cordova/PhoneGap update to provide access to latest features. More details coming soon.
November 16, 2012 at 5:41 am #332388
Max87MemberHi Wayne,
have you had time to look at my problem?
ThanksNovember 16, 2012 at 3:07 pm #332406
support-octavioMemberHi Max,
We’ve kicked this to a dev team member and not much progress made yet. I will nag the developer and provide feedback.
November 16, 2012 at 3:13 pm #332407
Max87MemberThanks Octavio for response.
November 16, 2012 at 3:34 pm #332408
support-octavioMemberHi Max,
I did some investigation and here is are a couple of interesting how-to articles that might be helpful:
http://xjaphx.wordpress.com/2011/06/25/insert-image-to-database/
November 16, 2012 at 3:44 pm #332409
Max87MemberHi Octavio,
I found the first linked article too, but i wasn’t able to make it work for me…First part – taking picture – is fine, but second part – renaming file and move it to another directory causes problems – I call that function, but nothing happens(I check via iPhone browser).
Can you please try this sample code and write a tutorial?
Thank you. -
AuthorPosts
