BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 02-07-2010, 05:08 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2010
Model: 8300
PIN: N/A
Carrier: T-Mobile
Posts: 62
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Can we attach an event listener to a running foreground application ?

Please Login to Remove!

I am running a background app and would like to know when a key is pressed on the app that is running in the foreground

As the app that is being run on the foreground is not developed by me , I cannot add any eventlistener to it

So I was using this method UiApplication.getUiApplication().getActiveScreen() .setChangeListener(FieldChangeListener listener); event to latch onto the current foreground app

But eventhough I was able to add the fieldChanged event without any error , I am not able to handle the event or get any notification

Does any one know what is the problem ?
Offline  
Old 02-07-2010, 12:19 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

This is working as designed.

You cannot intercept keystrokes from another foreground app using the public API's.
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LM358P high-gain frequency-compensated TWO operational amplifiers(2pcs for 0.99)
$0.99
LM358P high-gain frequency-compensated TWO operational amplifiers(2pcs for 0.99) pictureARIA SWITZERLAND EA-2x750 MOTOR/SERVO CONTROLLER
$26.95
ARIA SWITZERLAND  EA-2x750 MOTOR/SERVO CONTROLLER pictureHONEYWELL DYNAMIC SELF-CHECK RECTIFICATION FLAME AMPLIFIER R7847 C 1005
$299.0
HONEYWELL DYNAMIC SELF-CHECK RECTIFICATION FLAME AMPLIFIER R7847 C 1005 pictureBUXCO MAX II Plethysmograph Amplifier + 6x Strain Gage Preamplifier Array 2270
$299.0
BUXCO MAX II Plethysmograph Amplifier + 6x Strain Gage Preamplifier Array 2270 picture2x1.5W TDA2822 Dual Channel Stereo Audio Amplifier Board Module 5V
$0.99
2x1.5W TDA2822 Dual Channel Stereo Audio Amplifier Board Module 5V picture






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