If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Application listener

@ Simon - :smileytongue: No .. Then how that guys did?

 

@ Sunil, I will spend some time on this, if something is clear, I will post back.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: Application listener

Hi ,

      


mantaker wrote:
Technically, there is an App that fetches what are the modules that is present in a Blackberry (Includes BB Core modules),

          we can do this with the help of below code.

int module[]=CodeModuleManager.getModuleHandles(); String Name = null; for(int i=0;i<module.length;i++) { Name=CodeModuleManager.getModuleName(module[i]); System.out.println(Name); }

 


 

 

Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Application listener

Actually, I found that way already (Sorry for not posting it) .. I'm looking in to how to kill the module :smileyhappy:

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: Application listener

hi,

   there is api for delete deletemodule(name);

 

thx,

sunil

Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Application listener

@ Sunil - I knew it.. We are not going to delete the module.. We gotta kill its process... Somehow we need to get the Application's instance and close it!

 

I'm not investigating it further, since I got someother works with high priority .. However will do later.. 

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: Application listener

i got some clue on it .they might have used the GlobalEventListener but i don't know how can we add the module on this listener so we can get that event notification in  public void eventOccurred( long guid, int data0, int data1, Object object0, Object object1).

 

thanks,

sunilkumar

Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Application listener

No need for passing it as a GlobalEvent and all... Do you have an idea of getting application instance from the module handle?

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
Sunilkumar
Posts: 75
Registered: ‎07-21-2009
My Device: Not Specified

Re: Application listener

hi,

 i think this way u can get the instance.

       

long modHandle = CodeModuleManager.getModuleHandle("Appname"); ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(modHandle);

 we can get the processid as well.

 

Please let me know if i am wrong.

 

thx,

sunilkumar


 

Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Application listener

You aren't right here.. We can do nothing with the help of ApplicationDescriptor (Other than getting its name, vendor, version etc..) .. We need an instance of type Application or UiApplication ..

 

Cheers.. :smileyhappy: 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
DMINATOR
Posts: 101
Registered: ‎05-11-2009
My Device: 9000

Re: Application listener

 I have checked this applicaiton, looks interesting, but if I don't specify password, it doesn't kill the application, for example google maps. Has anyone seen it killing any other application ?

 

The do claim however that it can: 

 · Ability to fully shutdown the program

Please use plain text.