BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-12-2012, 08:14 AM   #1
janaknayangaljanak
Knows Where the Search Button Is
 
Join Date: May 2011
Model: 9800
PIN: N/A
Carrier: blackberry
Posts: 22
Default Run menu item : browser

Please Login to Remove!

Hello,

I have a menu entry for MENUITEM_BROWSER and i want to trigger this menu item programmatically.


how can i do that ?

thanx
Offline  
Old 07-12-2012, 10:56 AM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default Re: Run menu item : browser

Where would you be triggering this from?

You can't programmatically invoke a menu item on another application from your application using the API's.

You might possibly be able to use key event injection (simulating keys pressed), but you would then have to identify when the browser is in focus and it is appropriate for you to press ths menu item.

My guess is that you are taking the long way around the block. What exactly is your use-case?
Offline  
Old 07-13-2012, 02:07 AM   #3
janaknayangaljanak
Knows Where the Search Button Is
 
Join Date: May 2011
Model: 9800
PIN: N/A
Carrier: blackberry
Posts: 22
Default Re: Run menu item : browser

I am using the code given bellow to run menu item when call initiated.

private void runMenuItem(String menuItemText) {
Screen screen = Ui.getUiEngine().getActiveScreen();
Menu menu = screen.getMenu(0);
for (int i = 0, cnt = menu.getSize(); i < cnt; i++)
if(menu.getItem(i).toString().equalsIgnoreCase(men uItemText))
menu.getItem(i).run();
}

but it's not working in case of browser.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads for: Run menu item : browser
Thread Thread Starter Forum Replies Last Post
Menu Item to Missed Calls josi_at Developer Forum 1 08-27-2010 09:04 AM
Push a new screen on a menu item select - Beginner help karthikus Developer Forum 1 04-28-2010 08:20 AM
Menu Item: Bring up new screen based on focused field in VFM? doni49 Developer Forum 1 10-27-2009 10:10 PM
Hide Menu Item when Multiple Messages are Selected shmoo27 Developer Forum 0 02-18-2009 01:42 PM
PhoneCallLogID context is always Null in run() menu BMF Developer Forum 12 07-02-2008 10:33 PM


New Siemens 6SL3120-1TE13-0AA3 6SL31201TE130AA3 SINAMICS S120 Single Motor picture

New Siemens 6SL3120-1TE13-0AA3 6SL31201TE130AA3 SINAMICS S120 Single Motor

$615.98



high quality Siemens 6SE7 090-0XX85-1DA0 6SE7090-0XX85-1DA0 New, Fast delivery picture

high quality Siemens 6SE7 090-0XX85-1DA0 6SE7090-0XX85-1DA0 New, Fast delivery

$396.00



10 x  SIEMENS QA120AFCN PLUG ON NEUTRAL 20A AFCI ARC FAULT BREAKERS NEW picture

10 x SIEMENS QA120AFCN PLUG ON NEUTRAL 20A AFCI ARC FAULT BREAKERS NEW

$328.99



New Siemens 6ED1052-1MD08-0BA0 6ED1 052-1MD08-0BA0 LOGO 12/24RCE logic module picture

New Siemens 6ED1052-1MD08-0BA0 6ED1 052-1MD08-0BA0 LOGO 12/24RCE logic module

$185.63



New Siemens 6ES7 134-4MB02-0AB0 PLC Module Expedited Shipping 6ES7134-4MB02-0AB0 picture

New Siemens 6ES7 134-4MB02-0AB0 PLC Module Expedited Shipping 6ES7134-4MB02-0AB0

$232.50



🔥10 PCS SIEMENS Q120DFN 20A DUAL AFCI/GFCI PLUG ON NEUTRAL BREAKER BRAND NEW🔥 picture

🔥10 PCS SIEMENS Q120DFN 20A DUAL AFCI/GFCI PLUG ON NEUTRAL BREAKER BRAND NEW🔥

$399.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.