0

I have begun putting together an application using phonegap. I have completed the core functionality whereas the user will be able to take a photo, the app will allow them to see some location data and I would like to name the photo based off the location data rather than the default time stamp.

Is it possible to somehow change the filename that Android / iOS will output their photos? Do I need to somehow rename the file after it is saved?

1 Answers1

3

This post will get what you need to do as far as saving the file. Basically in add this code to your onsuccess for the take photo.

Android - Phonegap - How to get the file name of the picture taken

Also make sure that the destination type is file_uri or it will not work.

  var options = { quality: 50, destinationType: Camera.DestinationType.FILE_URI};
  navigator.camera.getPicture(onPhotoDataSuccess, onFail, options);
Community
  • 1
  • 1