BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-24-2009, 11:04 AM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Model: 8310
PIN: N/A
Carrier: Cingular
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default EventInjector.NavigationEvent and touchEvent()

Please Login to Remove!

I can get EventInjector.KeyCodeEvent to talk to my screen's keyDown()/keyUp() methods, but I can't get EventInjector.NavigationEvent to talk to touchEvent(). This is a concern for touch screen devices like the Storm. Has anyone had any luck with this?

I have checked that the event injection permission is set to allow.

Here is the code that doesn't work:

public class MyScreen extends MainScreen {
protected void onDisplay() {
// create a new thread in case onDisplay() has to exit before touchEvent() can fire
new Thread(new Runnable() {
public void run() {
// wait 2 seconds
try { Thread.sleep(2000); } catch (InterruptedException e) {}
// simulate a click then unclick
EventInjector.invokeEvent(new EventInjector.NavigationEvent(EventInjector.Navig ationEvent.NAVIGATION_CLICK, 100, 100, 0));
EventInjector.invokeEvent(new EventInjector.NavigationEvent(EventInjector.Navig ationEvent.NAVIGATION_UNCLICK, 100, 100, 0));
}
}).start();
}
protected boolean touchEvent(TouchEvent message) {
System.out.println("touch!");
}
}
Offline  
Old 03-24-2009, 11:17 AM   #2 (permalink)
New Member
 
Join Date: Apr 2008
Model: 8310
PIN: N/A
Carrier: Cingular
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm seeing that NavigationEvent generates trackwheel events like trackwheelClick(). Is there an EventInjector for touch events?
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

PARKER 7131Z002N0C111C2 Coil and Plunger Assembly 24 V DC 10W
$65.0
PARKER  7131Z002N0C111C2 Coil and Plunger Assembly 24 V DC 10W pictureFESTO Pneumatic BMFH-3-3-M5 with solenoid coil MSFG-24/42-50/60 4527 24 DC
$50.0
FESTO Pneumatic  BMFH-3-3-M5 with solenoid coil MSFG-24/42-50/60 4527 24 DC  picturePARKER ZB12 SOLENOID COIL 24V DC *NEW NO BOX*
$25.0
PARKER ZB12 SOLENOID COIL 24V DC  *NEW NO BOX* pictureMagnet Wire 14 Gauge Enameled Copper 460 Feet Coil Winding 5.8 Lbs Essex 200C
$100.4
Magnet Wire 14 Gauge Enameled Copper 460 Feet Coil Winding 5.8 Lbs Essex 200C pictureMagnet Wire 20 Gauge Enameled Copper 58 Feet Coil Winding and Crafts 200C
$9.95
Magnet Wire 20 Gauge Enameled Copper 58 Feet Coil Winding and Crafts 200C picture






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