multitouch event ended

I’m using multitouch events in an app on a Nexus One. Everything is working great, however, when 2 fingers are onscreen, and 1 is removed, all events for the remaining finger no longer dispatch.

Anyone else seen this? [import]uid: 4596 topic_id: 9449 reply_id: 309449[/import]

Yeh, it’s doing that for my game too. [import]uid: 29181 topic_id: 9449 reply_id: 34617[/import]

It seems more likely to bug out if the first finger is removed after the second is pressed, as opposed to the second finger being removed. But sometimes it freaks out in that usecase as well. [import]uid: 4596 topic_id: 9449 reply_id: 34620[/import]

Unfortunately, this is probably a hardware limitation of your device.
http://developer.anscamobile.com/content/events-and-listeners > Multitouch in Corona

“Multitouch does not work correctly on some Android devices (e.g., NexusOne, HTC Incredible, etc.). This can be demonstrated in Drag Me Multitouch sample app. This is a limitation of the current Android platforms and not Corona.” [import]uid: 6787 topic_id: 9449 reply_id: 34999[/import]

It also does this on Iconia A500 Tab. [import]uid: 4596 topic_id: 9449 reply_id: 35008[/import]

I also did the app in Adobe AIR, and just noticed that the multitouch bug does not occur with the Adobe AIR version. Overall performance is much better with the Corona app, with the exception of this multitouch issue.

I have 10 objects listening for touch events, and intend to simulate TOUCH_ROLL_OVER events. I keep touch event.ids in a table until it generates an ended phase. So a touch is only valid during it’s begin phase, or once during it’s moved phase until another target generates a moved event.

[code]
system.activate( “multitouch” )
TOUCHES = {}
function MyObject:touched( event )

if( ‘began’ == event.phase ) then
print( ‘touch’ )
TOUCHES[event.id] = self.displayObject

elseif( ‘moved’ == event.phase and ( TOUCHES[event.id] ~= self.displayObject )) then
print( ‘touch’ )
TOUCHES[event.id] = self.displayObject

elseif( ‘ended’ == event.phase ) then
TOUCHES[event.id] = nil
end
end
[/code] [import]uid: 4596 topic_id: 9449 reply_id: 35020[/import]

Sounds like you need setFocus(): http://developer.anscamobile.com/reference/index/stagesetfocus
[import]uid: 6787 topic_id: 9449 reply_id: 35130[/import]

Thanks snarla, I hadn’t considered that. Will see what it does in my situation = ) [import]uid: 4596 topic_id: 9449 reply_id: 35154[/import]

@snarla

I haven’t been able to figure out how setFocus() can be used to listen for multitouch ROLL_OVER events. [import]uid: 4596 topic_id: 9449 reply_id: 35321[/import]

@snarla

I have a LG optimus s android 2.2 phone. As such it seems I am having a common problem of mutlitouch not working (ie; pinch zoom examples).

I have read that this is due to hardware limitations; yet, in my camera function I can pinch zoom photos easily. [import]uid: 31039 topic_id: 9449 reply_id: 35636[/import]

Print the co-ordinates that are detected. Depending on hardware they will transpose as fingers cross axis. For things like pinch zoom you can handle this in code. [import]uid: 8872 topic_id: 9449 reply_id: 35650[/import]

Would appreciate it if you guys took another look at this issue. I’m not having this issue with Android apps built with Adobe AIR.

I’m using multitouch events in an app. Everything is working great, however, when multiple fingers are onscreen, and the first finger is removed, all events for the remaining finger no longer dispatch or randomly dispatch in a buggy manner. [import]uid: 4596 topic_id: 9449 reply_id: 36176[/import]