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

Native Development

Reply
hjt
Contributor
hjt
Posts: 11
Registered: ‎04-19-2012
My Device: Playbook
My Carrier: Verizon

Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

I understand that a user can use a blackberry smartphone
as mouse to remotely control the apps on the
playbook thru the Bridge.

 

So, for an app to support this,  it needs to handle mouse events.  I understand
that The SCREEN_EVENT_POINTER is the screen event type the
system sends to the app with  the property SCREEN_PROPERTY_BUTTONS
indicating which mouse button is clicked.  But there is no other information

--no Mouse Down/Up/Move information available.
 

Question:
Does the system generate one SCREEN_EVENT_POINTER event each time the user
clicks the mouse (down and up), or two POINTER events (one down, one up)?
And how about 'dragging' the mouse?

 

Any info will be greatly appreciated.  I do not own a Blackberry

smartphone and the simulator does not work on my

Thinkpad T420 either,  so I am not able to test it.   Thanks.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

>Does the system generate one SCREEN_EVENT_POINTER event each time the user clicks the mouse (down and up), or two POINTER events (one down, one up)?

Two SCREEN_EVENT_POINTER different events and every event has current mouse pointer coordinates, this is how you detect dragging. I use it on Simulator, did not have a chance to test it on Playbook as simply don't have mouse "connected" to PB.

Please use plain text.
hjt
Contributor
hjt
Posts: 11
Registered: ‎04-19-2012
My Device: Playbook
My Carrier: Verizon

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

Thanks for the info on Simulator.

 

So,  1st SCREEN_EVENT_POINTER (mouse down) at pos1 (SCREEN_PROPERTY_SOURCE_POSITION),

        2nd SCREEN_EVENT_POINTER (mouse up),  at pos2 (ditto)

        If (pos1 <> pos2),  then

               the mouse was dragged to pos2 as well

        else

               just a simple click at pos1

 

        The apps will not receive any intermedate events to indicate a move:

                 If the user clicks <0,0> and keeps the  mouse button down,

                 then release the button at <1000, 600>.

                 There will only be two SCREEN_EVENT_POINTER events. 

 

How about using a real blackberry smartphone to 'click' a native app thru the Bridge, 

is the above description still true?  

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

>The apps will not receive any intermedate events to indicate a move:

>                 If the user clicks <0,0> and keeps the  mouse button down,

>                 then release the button at <1000, 600>.

>                There will only be two SCREEN_EVENT_POINTER events. 

Wrong, you'll receive lots of SCREEN_EVENT_POINTER events and every one will be indicating current mouse postion and state of buttons.

No idea about the bridge and different events should be tracked/used to react to PlayBook's tapping, dragging.

Please use plain text.
hjt
Contributor
hjt
Posts: 11
Registered: ‎04-19-2012
My Device: Playbook
My Carrier: Verizon

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

Yes.  That makes more sense.  

 

Then,  each mouse 'click'  will create at least  two SCREEN_EVENT_POINTER events (down and up).

 If the mouse is being dragged in the meantime,  a series of POINTER events will also be sent by the system.   

Are they also come in pairs?   How can one tell that the mouse is finally being 'released'?   Thanks.

 

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

Just try it and you'll see -)

Please use plain text.
hjt
Contributor
hjt
Posts: 11
Registered: ‎04-19-2012
My Device: Playbook
My Carrier: Verizon

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

I really want to. But I was not able to make the Simulator (1.08, 2.0.0, 2.0.1) work on my laptop. And the new Blackberry 10 simulator does not work either :-<
Please use plain text.
Developer
jheron
Posts: 188
Registered: ‎01-27-2012
My Device: playbook
My Carrier: ...

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

FWIW, I can use my 9900 as a mouse on my pb and it just works. I had to change nothing with any of my Qt apps (qml and Qt widget) and the phone works great as a mouse on both styles of applications, so I would assume that touch events are no different then mouse events.
Cheers,
Jon
Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)

>I really want to. But I was not able to make the Simulator (1.08, 2.0.0, 2.0.1) work on my laptop.

Then in what way are you going to develop? without deploying/debugging at all? 

Please use plain text.
hjt
Contributor
hjt
Posts: 11
Registered: ‎04-19-2012
My Device: Playbook
My Carrier: Verizon

Re: Apps to support remote control thru Blackberry Bridge (how to handle 'mouse' events)


BGmot wrote:

>I really want to. But I was not able to make the Simulator (1.08, 2.0.0, 2.0.1) work on my laptop.

Then in what way are you going to develop? without deploying/debugging at all? 


Well,  that is a different question.   In my case,  someone else will do the test for me.  But I need to understand the solutions first, before I give it a try. 

 

I am hoping someone from RIM will give a more definitive answer for such an easy question.  Given such inadequate documentation for playbook ndk  developers to follow,   RIM should at least  provide adequate support in this forum.   But,...

 

 

 

 

Please use plain text.