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
Developer
mmd12
Posts: 117
Registered: ‎03-13-2012
My Device: Playbook, Dev Alpha C, Q10, Z10
My Carrier: T-Mobile

How can I remotely communicate with a PlayBook?

I have an application that requires communicating with the PlayBook when it is just out of arm's length reach. A button click is all that's required. I'm looking for the simplest and easiest way to code for this. Before buying equipment and experimenting, I thought I'd ask here to see if I can get any insight to the problem.

 

I'm thinking of a few ways to go:

 

1) BT Mouse. Once paired, can I get mouse clicks? In the falling blocks example there is some example code for capturing a mouse click.

 

screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_BUTTONS,&buttons);

    if (buttons == SCREEN_LEFT_MOUSE_BUTTON) {...

 

Is this all that's needed (keeping in mind related code to the above)? If so, that would be good.

 

2) BT Keyboard. This is a little different than the BT Mouse as I'm not sure how to capture a keyboard click. Is it the same as the virtual keyboad? If so, I can look at the virtual keyboard example.

 

3) WiFi. I would prefer not to go this route as it can get pretty messy dealing with sockets. Additionally, the app is intended to be used in the field where there is no WiFi signal other than through a hot spot.

 

4) USB Mouse. My understanding is the PlayBook doesn't support a USB Mouse, but in the Falling Blocks example I see the following:

 

"(which occurs on a BlackBerry Tablet Simulator or when a USB mouse is attached to a tablet)"

 

which seems to indicate that it is supported. If it is supported, this would be my preferred route as a USB to micro USB adapter is very inexpensive for the user.

 

Any other ideas or help with the above would be appreciated.

 

Thanks.

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: How can I remotely communicate with a PlayBook?

Hi,

 

You can get mouse clicks and keyboard events via the screen API.

 

The playbook is not USB host capable - but you can connect a serial android accessory and talk to an external device. (eg: Arduino Mega ADK or Arduino regular with host shield)

 

You could also use Audio / Visual inputs.

  • Sample from the mic and build a clapper.
  • Output a carrier wave that is wired to the audio input. Use the switch to break the path - record an event when you are not sampling the carrier (or the other way around)
  • Capture images from the camera. Place coloured LEDs over the camera. Switch various colours for various states

You could use the accelerometer: 

  • Place the playbook on a gimbal. Tilt it when you want something to happen. (Remote triggers motor?)
  • Bump the table it's on with a stick

Lots of possibilities!

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Developer
mmd12
Posts: 117
Registered: ‎03-13-2012
My Device: Playbook, Dev Alpha C, Q10, Z10
My Carrier: T-Mobile

Re: How can I remotely communicate with a PlayBook?

Thanks, Robbie.

 

So I guess you're saying that the mouse and keyboard clicks are just like the native examples.  Nothing special because of BT.

 

Right now, the proposed method is a stick with a stylus (pen with anti static bag).tied on.  I'm intrigued by the LED/Camera idea, but I'll give BT a try first.

 

Thanks again.

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: How can I remotely communicate with a PlayBook?

Yes. Just keep in mind that it is mouse, not touch.

Stick wins!
--
Rob is no longer associated with BlackBerry.
Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How can I remotely communicate with a PlayBook?

I just love the idea with stick! lol

Or you can train a dog or a monkey probably? -)))

Please use plain text.
Developer
mmd12
Posts: 117
Registered: ‎03-13-2012
My Device: Playbook, Dev Alpha C, Q10, Z10
My Carrier: T-Mobile

Re: How can I remotely communicate with a PlayBook?

Although viable, the stick method is just not the sort of brand image I wish to project for my apps.  It comes across as a little dated and certainly not to be seen while wearing haute couture.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: How can I remotely communicate with a PlayBook?

I'm assuming when Rob said "stick" he was really referring to a highly advanced carbon fiber instrument, like this:

http://www.canescanada.com/stylish-walking-canes-carbon-fiber

 

Light weight, stylish and usable even outside the app!

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How can I remotely communicate with a PlayBook?

While a little bit of banter is accepted, I feel this thread has wandered :Offtopic: and if the BlackBerry employees who frequent this forum see it then... oh wait!  :smileyvery-happy:


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: How can I remotely communicate with a PlayBook?

I enjoy my mini keyboard...

 

http://demos.blackberry.com/playbook-os20/na/us/gen/?=topicaccessoriesminikeyboard

 

But any BT mouse/touch pad will let you switch apps / press buttons etc.

 

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: How can I remotely communicate with a PlayBook?

Consider a BlueTooth "presentation clicker". They usually appear to the host device as a BT keyboard and send keypresses (left/righ,r PageUp/PageDn, media keys etc).

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.