简体   繁体   中英

Cordova contacts plugin does not include the device owner

I am using the Cordova contacts plugin ( https://github.com/apache/cordova-plugin-contacts ) in my app to fetch contacts from the address book on the device. Android allows a user to specify him- or herself:

On an Android 6.0 simulator, calling navigator.contacts.find will never respond with the user that was set up in the profile. On a Samsung Galaxy S5 running Android 4.4.2 it will never respond with the user in the profile either. An LG Nexus 5 running Android 6.0.1 will respond with the profile. In all cases, "regular" contacts are always properly found, so it just seems to be the profile of the user that is failing.

How can I consistently fetch the profile of the user as well?

After find try searching for me.Eg navigator.contacts.find('me'); Or better if you want to find info about the device why don't you the device plugin or sim plugin provided by cordova.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM