开发者

Add PIN contact to BBM Programmatically

Is it possible to add a blackberry PIN to a device's 'black berry me开发者_高级运维ssenger' contact list programmatically?

Can anyone verify this for me?

I have looked through the API, but I do not see a clear way.

Thank you.


Before you begin: Make sure that you have completed the task, Register your application with the BlackBerry Messenger platform, and that the class that displays the MyBBMChatScreen screen passes in a reference to the application's associated BBMPlatformContext object into the screen's contructor. (as always :D)

I use this codes to add just one contact. You can modify it to add multiple contact. Just change the size of contacts array.

String PIN = "123456";
String name = "Someone";
BBMInvitationRequest[] contacts = new BBMInvitationRequest[1];

contacts[0] = new BBMInvitationRequest(PIN, name);
platformContext.getUIService().inviteToBBM(contacts);

May this help :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜