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

Java Development

Reply
New Developer
Posts: 14
Registered: ‎12-19-2008
My Device: Not Specified

Code is not running with respect to invoking native blackberry messenger application

Hi

I am not able to figure out why this code is not running:

 

                                //This Code is for invoking Native BB Messenger

 

                                int modHandle = CodeModuleManager.getModuleHandle("net_rim_bbapi_blackberrymessenger");

                               //mobHandle is returning 1193 which i believe is correct
                                
                                try{
                                 ApplicationDescriptor apDes = (CodeModuleManager.getApplicationDescriptors(modHandle))[0];

                               //But here apDes is giving "Null Pointer Exception"

                               //I really not able to figure out why?????

                                ApplicationDescriptor ad2 = new ApplicationDescriptor(apDes,null);//, args);   
                                ApplicationManager.getApplicationManager().runApplication(ad2,true);//new ApplicationDescriptor(apDes[0]));
                                }catch(Exception e){}

 

Could any one explain why?????

 

With Regards

Jaikant Sharma


                               

Developer
Posts: 238
Registered: ‎08-26-2008
My Device: Not Specified

Re: Code is not running with respect to invoking native blackberry messenger application

Hi,

 

does the Invoke class support a invokation of bb messenger instead?

 

Regards,

Jochen

New Developer
Posts: 14
Registered: ‎12-19-2008
My Device: Not Specified

Re: Code is not running with respect to invoking native blackberry messenger application

Hi

 

------>First of All,BB Messenger can't be invoked by "Invoke" Class.

 

------->My main aim was to invoke native application called "BB Voice notes" present in Media section of BB

 

That is one of the reason of using those classes.....

 

With Regards

 

Jaikant Sharma

Developer
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: Code is not running with respect to invoking native blackberry messenger application

3rd party apps cannot load native modules.
New Developer
Posts: 14
Registered: ‎12-19-2008
My Device: Not Specified

Re: Code is not running with respect to invoking native blackberry messenger application

Hi

 

I think you have misunderstood........

 

We are not loading any native application.We are just trying to integrate our third party application with native applications......

 

I have read everywhere that BB provides that.But it is sad that how to do that,i hav't got any where.

 

Also BB Experts still hav't responsed on this thread.And problem is that i can't directly mail them.....

 

With Regards

 

Jaikant Sh 

Developer
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: Code is not running with respect to invoking native blackberry messenger application

The code sample you posted is used to load modules, not to interact with them as with the Invoke API. What are you trying to do with BB messenger?
Developer
Posts: 96
Registered: ‎06-11-2009
My Device: Not Specified

Re: Code is not running with respect to invoking native blackberry messenger application

Hi,

The module name provided by you is a library and not an application hence you get the null pointer exception. To invoke the voice note recorder use the following:

        String moduleName = "net_rim_bb_voicenotesrecorder";
        int modHandle = CodeModuleManager.getModuleHandle(moduleName);
        ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(modHandle);
        ApplicationDescriptor descriptor = apDes[0];
        try {
            ApplicationManager.getApplicationManager().runApplication(descriptor);

        } catch (ApplicationManagerException ex) {
            ex.printStackTrace();
        }

 

Hope that helps.

 

Regards,

S.A.Norton Stanley

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Code is not running with respect to invoking native blackberry messenger application

Can you please explain specifically what you are trying to do in this case, not in general. 

 

Also explain why you thought the code you originally supplied would work and where you got it from?

 

Have you reviewed the Integration Guide for integrating 3rd party apps into Rim apps - latest version here:

http://docs.blackberry.com/en/developers/deliverables/11934/JDE_5.0_IntegrationGuide-Beta.pdf

 

If you are looking specifically at Blackberry Messenger, have you reviewed the BlackberryMessenger package, or searched for any forum Threads that might help you, for example, this one:

http://supportforums.blackberry.com/t5/Java-Development/Blackberry-Messenger-API-capabilities/td-p/1...

 

You complain that BB Experts have not responded on this Thread.  Remember there is no guarantee that you will get any response at all on this forum, I suggest you review the Terms and Conditions.  If you really require support on this or any other issue, then I beleive that RIM have a program where you can pay for this.