【发布时间】:2019-03-23 04:27:14
【问题描述】:
我正在开发一个 Ionic 应用程序,我在其中尝试使用本机插件加载设备的联系人。有一个异步调用,里面有一些控制台日志,但是在 android 5.1 设备上运行时日志没有出现。承诺中的其余代码被触发,只有日志没有被触发。在浏览器中,它们会出现。
public loadContactsFromDevice(): void {
console.log('ContactsProvider loadContactsFromDevice INIZIO');//this is fired
this.contacts.find(
['displayName', 'name', 'birthday'],
{ filter: "", multiple: true })
.then(resultData => {
console.log('ContactsProvider loadContactsFromDevice resultData:' + resultData);//this is not fired
this.allContacts = resultData;
this.setContactsList(this.allContacts);
});
console.log('ContactsProvider loadContactsFromDevice FINE');//this is fired
}
【问题讨论】:
-
您能否发布更多有关 android 应用的代码或有关您的问题的更多详细信息?
-
什么是
this.contacts?
标签: android angular debugging ionic3 device