Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Advertising Service

Reply
Contributor
meera_developer
Posts: 16
Registered: 02-02-2012
My Carrier: DU. UAE

Integrate BBM

I am developing an application which integrates BBM. I need to display the complete list of contacts of the current BBM user. 

 

  I developed the app using normal BB SDK 5.0 and then added the BBM SDK1.2 jar file as external jar fiel in my project.

 

My Code: In the constructor of Uiapplication I pushed a screen and did the following code,

 

try {
					platformContext = BBMPlatformManager.register(myPlugin);
				} catch (ControlledAccessException e) {
					// The BBM platform has been disabled
				}
				if (platformContext != null) {
					MyBBMPlatformContextListener platformContextListener;
					platformContextListener = new MyBBMPlatformContextListener();
					platformContext.setListener(platformContextListener);
				}

 

 On clicking the list button in the first screen another screen will be opened (In thi sscreen I am passing the object of platformContext) and used the following code.

 

ContactListService contactListService = platformContext
				.getContactListService();
		BBMPlatformContactList contacts = contactListService.getContactList();
		Enumeration contactsEnum = contacts.getAll();

		while (contactsEnum.hasMoreElements()) {
			BBMPlatformContact contact = (BBMPlatformContact) contactsEnum
					.nextElement();
			add(new LabelField(contact.getDisplayName()));
		}

 

When I am running the code on device, the screens are displyed perfectly but contacts was not there. 

 

Please help me.

 

Thanks and Regards,

  Meera Manesh

 

 

       

Please use plain text.
Developer
ITFCJim
Posts: 61
Registered: 01-20-2011
My Carrier: O2 UK

Re: Integrate BBM

Hi!

 

Your question would be more likely to get a response in the Java forums here:

http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev

 

This forum is for BlackBerry Advertising Service support

 

Cheers

Jim

-----------------------------------------------------------------------------------------------------
Help fellow forum users! Please remember to click "Like" on helpful posts.
If a post solves your problem click "Mark as solution"
Please use plain text.