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: 41
Registered: ‎08-01-2008
My Device: Not Specified

Programmatically finding the location of the cursor used in the BB Browser?

Is it possible to poll for the existence & current coordinates of the "mouse" cursor which is used in the BB Browser? I'm building some remote access software and because the cursor doesn't show up in any screenshots, using applications like the BB Browser remotely is almost impossible because you can't tell where you are pointing (unless you happen to move the cursor across a hyperlink which will then change colour).

 

A bonus question would be, is it possible to set the location of the cursor programmaticaly?

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

Re: Programmatically finding the location of the cursor used in the BB Browser?

There is no direct way to do this programmatically.  You could do this based on some calucations though.  For example, you could move the cursor to the top left corner of the Window, and then record where the cursor is moving based on the event injection methods you are using.

 

This does break down though if the user moves the track ball.

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
Highlighted
Developer
Posts: 41
Registered: ‎08-01-2008
My Device: Not Specified

Re: Programmatically finding the location of the cursor used in the BB Browser?

That's a pity.. the solution you suggest might be worth trying but would be difficult as users would have to initiate it from the viewing end when they thought the cursor might be on the screen, and like you say anyone actually touching the trackball would throw it off. Plus our tracking of the cursor would be highly heuristic and liable to break on OS upgrades / require tailoring for each handset.

 

Thanks for the help anyway though.