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
Contributor
Jaime_Barrachina
Posts: 21
Registered: ‎10-25-2012
My Device: Blackberry Playbook 2.0
Accepted Solution

Maximum number of touches.

Hello,

 

I'd like to know if there is any way of checking the maximum number of touches (say with something similar to screen_get_event_property_iv) on the device.

 

Also, 

screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TOUCH_ID, &id);

allows me to get the ID of the current ID. Is this an ID that corresponds to the touch (so, if there are for example 10 touches, id will be between 0 and 9) or does it keep growing? (for example, every time a new finger pops in, the id increases, and it might go up to any value, as long as new touches keep coming in).

 

From my testing, it appears the id doesn't grow, just sticks to the same set of values, and the BB Playbook only supports up to 4 simultaneous touches, but I'd like to be able to query the number of touches nonetheless.

 

If anyone has any answers I will be very thankful. 

 

Cheers,

Jaime

 

 

 

Please use plain text.
Developer
guru2000at
Posts: 101
Registered: ‎02-25-2011
My Device: Playbook, q5, z10

Re: Maximum number of touches.

i think, the max number of touches is 4

 

you can check out an example here:

https://github.com/andrepura/Multitouch

________________
mappau Dev Team
blackberry@mappau.com
twitter: mappau
Please use plain text.
Contributor
Jaime_Barrachina
Posts: 21
Registered: ‎10-25-2012
My Device: Blackberry Playbook 2.0

Re: Maximum number of touches.

Thanks for the reply.
Is it 4 for all the platforms? Is there any way of finding out? Hardcoding it and hopping it doesn't change in new platforms or software updates does not seem the proper course of action to me.
Please use plain text.
Trusted Contributor
bdaemon
Posts: 152
Registered: ‎02-23-2011
My Device: dev alpha playbook 9500 8300

Re: Maximum number of touches.

the max count of points for all platforms  are  10 + 1 , ten fingers + one nose.:Yes:

 

 ID will not increase , beacuse a pair of touch_down and touch_up  must be matched through the same ID.

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: Maximum number of touches.

A great question!

It was 4 on PlayBook and may be >4 on newer devices.  Designing for 4 would be a good idea for now since you want your app to be usable on all devices.

I'm forwarding this request along to the libscreen folks, as they already know internally what the max # is.. it is just not exposed in any convenient way.  As a general rule, and as the APIs evolve, we want to be able to put as much information in the developer's hands as possible.

 

That being said, nothing stops your awesome multitouch app from doing something similar to what we see with analog joystick calibration... have your app start with a "press as many fingers on the screen as you can" message and sample the max by yourself until a handy SCREEN_PROPERTY_MAX_MTOUCH or similar is available.

 

Cheers,

Sean

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: Maximum number of touches.

fyi, it looks like a query for this is being implemented.

Please use plain text.
Contributor
Jaime_Barrachina
Posts: 21
Registered: ‎10-25-2012
My Device: Blackberry Playbook 2.0

Re: Maximum number of touches.

Awesome, thanks!
Please use plain text.