Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
11-08-2012 02:32 AM
I am trying to pass BBMPlatformContext in UIapplication to the mainScreen class .. but it shows error ("Null pointer exception"). anyone have solution for this problem .. please help me..
Deepu George Jacob
11-08-2012 03:05 AM
This is my sample code
myplugin = new MyBBMAppPlugin();
public void run()
platformContext = BBMPlatformManager.register(myplugin);
platformContextListener = new MyBBMPlatformContextListener();
11-08-2012 04:26 AM
Look hard at your code and try to figure out the order in which things are processed.
When does the connection to the BBM get established? When is the constructor for your Screen run? What does invokeLater mean?
If this doesn't help, put System.out.println messages in and debug your app.
I suggest that you initiate the BBM connection from your MainScreen. So move the connection code to your MainScreen and then it will have access to the context.
Hope this makes sense?
11-08-2012 05:28 AM
I followed this documentation to implementing BBM please chek it..
11-08-2012 08:12 AM
That code is correct, but it does not try to pass the context in to the Screen does it?
Like I said, think about how the various steps you have will be processed, I have given you some questions to help with this thought process. If that doesn't do it, debug.
As a clue, the instructions are NOT all processed in the order written.
11-09-2012 04:31 AM
Glad you got the method working in the MainScreen. More importantly, I hope you understand why the change made it work. There is a lot of similar asynchronous processing involved in BBM.
Not clear what your last post is all about.
Just to clarify, you should not attempt o establish a connection in other circumstances, for example you should not try to establish connection as part of the main90 or the Screens constructor. The connect has to be run on an independent Thread with access to the UI. .
Can you explain the circumstances of your problem and why you are trying to establish this connection outside the run method?