Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Contributor
kikyoung
Posts: 10
Registered: ‎03-15-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: T-Mobile

Query contacts does not return anything.

Hi..

 

I have queried contacts, but could not get any values. I have synced contacts from Gmail, so I have contacts on Contact app, but no lucks. Use the below code.

 

        String[] nameColumns = {

                ContactsContract.Contacts._ID,

                ContactsContract.Contacts.DISPLAY_NAME,

        };

        Cursor nameCursor = resolver.query(ContactsContract.Contacts.CONTENT_URI,

                nameColumns, null, null, ContactsContract.Contacts.DISPLAY_NAME);

 

The name cursor has not got any items...  What is the problem??

 

Thanks in advance. :smileyhappy:

Please use plain text.
Contributor
kikyoung
Posts: 10
Registered: ‎03-15-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: T-Mobile

Re: Query contacts does not return anything.

Found that Android app on BlackBerry 10 can not read the native address book data. It is not supported now.. not good. may be in the future.
Please use plain text.
Developer
ndsmyter
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: Query contacts does not return anything.

It is indeed not supported, it had something to do with privacy/security issues. So if they can't find a solution to these issues, it could be this will never be available.

That said, I also hope they add it, because I could use that functionality :-)


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
Please use plain text.
Contributor
namanhams
Posts: 18
Registered: ‎05-01-2013
My Device: BlackBerry Z10
My Carrier: NA

Re: Query contacts does not return anything.

Any update on this ? This feature is really important to our app. I heard that OS 10.1 will support reading contacts, but i couldn't find any official documentation. 

Please use plain text.
Developer
ndsmyter
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: Query contacts does not return anything.

tl;dr: Yes OS 10.1 can read contacts

I have currently installed 10.1.0.1483 on my Dev Alpha C. And my Android ported application is able to read the contacts now.


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
Please use plain text.
Contributor
namanhams
Posts: 18
Registered: ‎05-01-2013
My Device: BlackBerry Z10
My Carrier: NA

Re: Query contacts does not return anything.

Thanks a lot !

Please use plain text.