开发者

Filter out Facebook Contacts from the Contact Picker

I have a contact picker in my application that keeps crashing when a facebook contact is selected. I won't have the code I'm using to open the picker in front of me, but I believe I'm accessing the contacts through a call similar to this:

new Inten开发者_Python百科t(Intent.ACTION_PICK, People.CONTENT_URI)

Does anyone have experience with this?


i wish i had an answer for you but i posted 2 similar questions without any good answers. seems like a totally reasonable question and easy to do in most other dev environments (im actually a c# developer) but android has got me stuck on this. i think i may just have to write my "own contact picker" so that i can test for the fact that the contact has a number before adding them to the picker list programmatically.

anyways, my questions are here:

How do get the android sdk contact picker to give me just phone results and not all my twitter followers

how do i get startActivityForResult() to bring up just a list of telephone contacts (like when i click on the "People" icon) using the android sdk?

in my app i am testing that the phone gets returned from the picked contact before trying to send it a message (so mine doesnt crash), but i dont want the user to have to see a "that contact doesnt have a number" message if they dont have to.

i found this too: http://mobile.dzone.com/news/contacts-api-20-and-above

while it DOESNT show you how to filter the contact list, it does show how to programmatically create a list that has only contacts with numbers. write back on my questions if you find anything that could be useful, thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜