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
rarespetrescu
Posts: 13
Registered: ‎11-11-2009
My Device: Not Specified

How to Remove third party options from my apps menu

Hi all,

 

In my app I'm using ActiveRichTextField, and for e.g. there are som string pattern match that adds me to my menu another options that points to another installed app. How do I remove this and how this can be possible. Please help me.

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to Remove third party options from my apps menu

Override makeMenu in your screen class and remove the unwanted items from the menu.

 

Please use plain text.
New Developer
rarespetrescu
Posts: 13
Registered: ‎11-11-2009
My Device: Not Specified

Re: How to Remove third party options from my apps menu

Yes I saw that solution again, but how do I know what menu item to remove. I have no access to any info in it (MenuItem). Everything is private. Removing all menu items is not a solution. I want to remove specific ones that point to specific application.

 

Thanks

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to Remove third party options from my apps menu

Menu.getItem(position) is public.

 

Menu.deleteItem(position) is public.

 

Please use plain text.
New Developer
rarespetrescu
Posts: 13
Registered: ‎11-11-2009
My Device: Not Specified

Re: How to Remove third party options from my apps menu

Srry if I was wrong.

So:

...

MenuItem aMenuItem = menu.getItem(pos);

...

 

Hot do I know if that menu item "aMenuItem" is from my application, is a prefab one or is from another third party app. I, for e.g. I wanna remove ones that are from another third party app.

 

Thanks

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to Remove third party options from my apps menu

I guess you'll need to do a little investigation. Iterate through the menu items and see what you can figure out.

 

 

 

 

 

Please use plain text.
New Developer
rarespetrescu
Posts: 13
Registered: ‎11-11-2009
My Device: Not Specified

Re: How to Remove third party options from my apps menu

Srry if I'm insistent, but believe me, I've done a lot a reseach and no solution for that. I think I'm going crazy. But, I don't know why RIM allows other app to put their options to my apps menu. If you can provide me with any sample code, solution or hint I'll be very grateful.

Thanks pal

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: How to Remove third party options from my apps menu

No "3rd party" apps can place a menu item on *your* menu.

 

These items are placed on a System context menu.

 

I believe that the one you are objecting to is an ActiveRichTextField handler. You can also defeat these by writing your own handler for the matched pattern (overriding the system handler).

 

You are into an area where I have no expertise, and I don't have the time to do this investigation work for you - sorry. However, I believe that you wil find other threads on this subject in the forum.

 

 

Please use plain text.