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
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Key Press event

Hi,

 

I was trying to do Remote display of the device. I can able to capture the screen and send to the web page. And also i can send key presses from web page to device by Event Injector.

 

Problem:

In GSM phone when i click menu button in web page it shows all the application menu in screen using the following code,

 

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_DOWN, Characters.CONTROL_MENU, KeypadListener.STATUS_NOT_FROM_KEYPAD, 0));

EventInjector.invokeEvent(new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEvent.KEY_UP, Characters.CONTROL_MENU, KeypadListener.STATUS_NOT_FROM_KEYPAD, 0));

 

But if i do the same thing in CDMA phone it doesn't work.

 

Is there any solution? 

 

Thanks in advance

 

BlackBerry Development Advisor
Posts: 15,062
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Key Press event

What BlackBerry models and handheld software version are you testing on?  You can see this under Options, About on the BlackBerry.

 

Has the application been granted access to event injection on the CDMA BlackBerry?  This is done by going to Options, Advanced Options, Applications select your application and choose Edit Permissions from the menu.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Re: Key Press event

Hi,

 

Thanks for ur reply...

 

Everything is correct as you mentioned.

BB Model : 8130

OS           : 4.3.0

 

The problem is,

 

If i use the code that i have mentioned, the menu key is populating as expected (If device is in main screen and if i do "Event Injecting" for MENU key it is showing all the application icons on the phone) in GSM phone...

 

But the same code is not working in CDMA phone. When i use the code MENU key, it is not trigerred as expected.

 

Is there any separate code for Event injecting the Menu key in CDMA phone?

 

Thanks

BlackBerry Development Advisor
Posts: 15,062
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Key Press event

[ Edited ]

Event injection should work the same, regardless of the network the BlackBerry is on.  What is the full, 4 digit BlackBerry handheld software version you are testing on?  What theme are you using?  You can view this under Options, Theme.

Message Edited by MSohm on 09-12-2008 10:56 AM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker