I have an app where users take images and they are saved along with user notes. Per the following link this is what I was using to save the images to the app. The issues is when some users update the app the images are lost.
Phonegap - Retrieve photo from Camera Roll via path
per the bosses instructions the users aren't allowed to browse the gallery for images as they are being used as proof of work performed (small company, 5-12 employees using the app).
is there any way for iphone to relay back to the app the actuall image location on the camera roll like android does? Then I can just save the URI to the database and call it when the form is submitted...
Thanks
You need to use
window.resolveLocalFileSystemURI()
to convert the filelocation to a fileentry or else your filepath will contain the App UUID which changes when you update/deploy your app.
Related
I have an app that contains a profile of the user.
In the profile editing, he has an option to take a photo of himself, then that photo should be saved in his details and be presented in certain places in the app.
Is there a way to internally save an image (not in his phone's photo gallery, but inside the app itself, so he cannot delete the photo through the phone), and then fetch that image every time I need it?
I understand I cannot use CoreData to save images, so I am wondering if there is an easier way to get it done efficiently.
Or must I do that in a server?
not in his phone's photo gallery, but inside the app itself
You can't store anything at runtime "inside the app itself". But the app has a sandbox, a folder area belonging to you alone, where you can store any file you like — in the Documents folder or the Application Support folder, for example. So why not just use that?
I have ~3200 photos on my iPhone over 2 years and would like to create an app that analyzes and plots when I took these pictures (ex: I was very actively photographing for a week, and then stopped). Is there a way to do bulk processing of camera roll photos on iPhone(with user permission) to extract timestamps of photos?
I think if I back up my photos to my mac with the "image capture" app, I can do this kind of metric analysis with a Mac app, but the import process would take hours and I'm looking for something simpler.
Take a look at ALAssetsLibrary
An instance of ALAssetsLibrary provides access to the videos and
photos that are under the control of the Photos application.
Here is sample application PhotosByLocationn.
Demonstrates how to use the AssetsLibrary APIs to provide a custom
image picking UI. The user experience is centered around the idea of
using the assets location and time metadata as a basis for certain
features.
Yes you can use the Assets Library for this.
This fill allow you acces to the image on the users device.
I'm new to iPhone development and making an app using PhoneGap framework .
In home screen I have used grid with iPhone style icons to make it like sprigboard layout and there is an background image to this homescreen body tag.
What I want to do is this background image should change periodically (once a week or once a month), after the time interval the app should fetch new image from website may be from the same url, and store in local storage somewhere, so until the next interval the app should show this image as homescreen background. I can use JSON to fetch image.
I don't want to use any native IOS features.
How can I do that using PhoneGap?
You would want to store the image using the local file storage system. Check out
http://docs.phonegap.com/en/2.6.0/cordova_file_file.md.html#FileTransfer
You can download the file and store the file name in Localstorage -
Write a javascript function that checks if the name of the file is stored, if so then set the background image using Jquery or the like.
Maybe have a look at this
http://www.raymondcamden.com/index.cfm/2012/1/19/Downloading-files-to-a-PhoneGap-application--Part-1
I ended up saving a dummy file first so I could get the full path to the URL of the folder the file will be stored in (different from each install of the application)
I'm creating a catalog/collection ios4 application. One element of the app lets the user take a picture which they use for a new item entry. The image they choose is then saved to their app's local Document folder.
I was wondering if it's possible to give the user the ability to import the photos to their desktop when they plug in their ios device. Like how iPhoto lets you import photos from your camera roll when you plug in your device
I've looked around, and all i can seem to find are posts on saving to the documents folder, and then retrieving the data within the app.
Any help would be great.
Thanks Ian
You could use an intermediate web service to transfer the files. Upload them to your service from the device, download them to the desktop.
Apple locks this stuff down pretty tight, so that might be your best bet.
My app allows user to obtain picture/image from camera/photo gallery and then the app will upload the images to remote storage. Since the thumbnail images of those images will be used in some scenarios, I need to generate the thumbnail images.
The questions are
should the thumbnail images be generated by the app at the time when the original/raw image is obtained?
is it achievable to upload a raw image and at least 2 of its thumbnail images at the same time from the app to the remote storage - let's say its Amazon S3 or Google App Engine
is there any sample code out there that does the image transformation on iPhone?
I think you should, and put a progress indicator on top to tell your user that "please wait, I'm generating thumbnails".
I don't think at the same time is appropriate for you. Instead, you should try to upload them (2 thumbnails and 1 raw) in a serial manner. That is, "try 1st thumbnail, if succeed, try 2nd thumbnail...",since the internet connection for a mobile device like iPhone could be unstable. Requests-timing-out does happen, therefore it's better to always make sure you have finished the previous request before you start the next one.
I think three20's TTThumbsViewController (or TTPhotoViewController) has done a good job in transforming original photos into square-shaped thumbnails. Maybe you should take a look at their source code.
btw, as for uploading photos to servers, I once used the ASIFormDataRequest to post my photos to a server. It worked pretty well.
Hope it helps. :-)