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

Native Development

Reply
Developer
smiley
Posts: 1,449
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Contact Picker not working. help!

I have the following straight from the BB example here.  Only diff is i sent it to single mode

 

https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__contactpicker.html

 

 

    contactPicker = new pickers::ContactPicker();
    contactPicker->setMode(bb::cascades::smileytongue:ickers::ContactSelectionMode::smileyfrustrated:ingle);
    contactPicker->setKindFilters(QSet<bb::smileytongue:im::contacts::AttributeKind::Type>()
         << bb::smileytongue:im::contacts::AttributeKind::smileytongue:hone);

to open i call

 

contactPicker->open()

 

All i got is the is a blank screen with "No Contacts" in the middle of the screen.

 

I have set the contact permission and I have contacts with phone numbers.

 

What else do I need?  thanks

 

Please use plain text.
Developer
smiley
Posts: 1,449
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Contact Picker not working. help!

Anybody got ContactPicker working?

 

Please use plain text.
Developer
ryansweny
Posts: 64
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Rogers

Re: Contact Picker not working. help!

I can't really get it to show many contacts either, but I thought I'd mention the steps to get even this far as they are tricky too:

 

1) make sure -lbbcascadespickers is in your pro file

 

2) make sure you grant the contacts permission.

 

3) Add a contact manually, from say an email address. Do not import from Twitter, FB etc in any way and don't link it.

 

The docs on this one kind of suck.

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: Contact Picker not working. help!

I don't have anything useful to say about this, because I don't really know to be honest.
But I just wanted to give smiley the advice to use the 'Insert Code' option from this forum. Makes the code much more readable, because now it is filled with smileys :-) Although I could disable the smileys in the forum settings, I rather not do that for just one post.

PS: Or didn't you use the code functionality on purpose because your username is 'smiley'?


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.
Developer
smiley
Posts: 1,449
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Contact Picker not working. help!

Hehe. Yeah I will put code properly the next time.

 

I have both FB and Twitter contacts and have normal contacts and none of them show up.

 

I have contacted BB consultant who made the sample contactpicker app and he says it is working for him.

 

I using the leaked OS. May that could be one of the problem but in anycase it should work but the samples from BB directly doesn't even work.

 

also he said that social contacts such as FB are not supported in the picker.

Please use plain text.
Developer
ryansweny
Posts: 64
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Rogers

Re: Contact Picker not working. help!

seriously.. no social contacts in the picker is a bug by design? Ugh I thought we were past this..

Please use plain text.
Developer
smiley
Posts: 1,449
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Contact Picker not working. help!

I don't really care about those.  just want to get the picker working for native contacts.

 

if you are interested here is the sample app from BB

 

https://github.com/blackberry/Presentations/tree/master/2012-BlackBerryJam-Asia/JAM818/ContactPicker...

 

let me know if it works.   you might need to remove the translation in the makefile because it is missing in the project zip file.

Please use plain text.
Developer
ryansweny
Posts: 64
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Rogers

Re: Contact Picker not working. help!

This code works for me on the leaked OS on a Alpha A:

 

void App::showContactPicker()
{
    ContactPicker* contactPicker = new ContactPicker();
    contactPicker->setMode(ContactSelectionMode::Single);
    contactPicker->setKindFilters(QSet<bb::pim::contacts::AttributeKind::Type>() << bb::pim::contacts::AttributeKind::Phone << bb::pim::contacts::AttributeKind::Email);
    QObject::connect(contactPicker, SIGNAL(contactSelected(int)), this, SLOT(onContactSelected(int)));
    contactPicker->open();
}

 

I should also stress, not a single one of hundreds of contacts wasn't 'tainted' by the social media hooks. I litterally had to make one up from scratch for it to show up.

Please use plain text.
Developer
smiley
Posts: 1,449
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Contact Picker not working. help!

Thanks but nothing works.  Still getting the blank screen.

 

I even manually add a contact and still no go.  :Censored:

 

So frustrating...

 

Please use plain text.
Developer
StevenKader
Posts: 635
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Contact Picker not working. help!

I checked with BlackBerry development and they are fixing the issue of contacts that are regular contacts but also linked to Twitter/Facebook.....those will show in the next release.

 

Smiley, if you want to send me a zip of your project I will take a look and help you get the contact picker working (assuming the project isnt't highly confidential).  Just private message me and I'll be glad to help.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.