Я использую плагин «Ионные контакты», он дает мне правильное количество контактов в телефоне, но все поля сведений пусты,
Я использую, «cordova-plugin-contacts»:«3.0.1», «@ ionic-native / contacts»: «^ 5.0.0»
import { Contacts } from '@ionic-native/contacts/ngx';
constructor( private contactsPlugin: Contacts ) { }
document.addEventListener("deviceready", () => {
this.contactsPlugin.find(["displayName", "phoneNumbers","photos"], {multiple: true, hasPhoneNumber: true})
.then((contacts) => {
console.log("Length: ", contacts.length);
for(let i=0; i < contacts.length; i++){
console.log('... ',contacts[i]);
if ( contacts[i].displayName != null ) {
console.log("--> ", contacts[i].displayName );
}
}
},
(error) => {
console.error("Contacts error: ", error)
})
});