Guest User

Untitled

a guest
Jan 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. takePicture = async function() {
  2. if (this.camera) {
  3. const options = { quality: 0.5, base64: true };
  4. const data = await this.camera.takePictureAsync(options);
  5. console.log(data.uri);
  6. console.log(data);
  7.  
  8. var promise = CameraRoll.saveToCameraRoll(data.uri);
  9. promise.then(function(result) {
  10. console.log('save succeeded ' + result);
  11. }).catch(function(error) {
  12. console.log('save failed ' + error);
  13. });
  14. }
Add Comment
Please, Sign In to add comment