Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Saving image to the user's contacts with Cordova Contacts plugin

$
0
0

@JackStone wrote:

I seem to be having trouble saving an image to the user’s contacts with the Cordova Contacts plugin on Android. Here is my code:

var contact = navigator.contacts.create();

// data.photo is a valid base64-encoded string.
contact.photos[0] = {
  "type": "base64",
  "value": data.photo
};

contact.save(function() {
  alert(“Contact saved.”);
}

This works perfectly on iOS but I can’t save an image on Android no matter what I try. The data.photo value is a valid base64-encoded string that WILL show up as an image when pasted into a URL bar. Any advice?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>