2017-06-01 44 views
1

我正在構建一個邀請表單,用戶可以在其中填寫電子郵件或使用按鈕在設備中打開聯繫人應用程序,並將獲取所選聯繫人的電子郵件(如果電子郵件存在)。我想知道這種按鈕是否可以在Codename One 中實現,而無需在我的應用程序中列出所有用戶的聯繫人。打開並從設備聯繫人應用程序中選擇一個聯繫人

謝謝!

伊泰

回答

1

按照official API,你只能使用id使用方法getContactById(String id)來獲取一定的接觸。

所以,答案是「否」,則無法獲得其電子郵件的接觸,因爲你不知道的映射id <> email

+0

通知您可以用'getContactById(字符型,布爾includesFullName, 布爾includesPicture, boolean includesNumbers,boolean includesEmail,boolean includeAddress)',並且傳遞除了電子郵件以外的其他所有內容的false,這些電子郵件應該相對快速地獲取聯繫人而不需要獲取所有數據。這同樣適用於'Contact [] getAllContacts(boolean withNumbers,boolean includesFullName,boolean includesPicture,boolean includesNumbers,boolean includesEmail,boolean includeAddress)'' –

相關問題