Single touch events

I thought that the lack of a began touch event in certain situations on the Android simulator was an error, but it seems that it happens on the device as well.

Is this correct or is there something else required to detect touch events on Android?

matt

Hi,

the simulator isn't hardware specific, only the skin and resolution reassembles a certain platform. And on the IOs platform I never noticed something like this.

I think it has something to do with your code. Can you post it or a small example that illustrates the issue you have?

Cheers
Michael Hartlef

http://www.whiteskygames.com <-- home of IndeED
http://www.twitter.com/mhartlef

Something as simple as:

1
2
3
4
5
function touch( event )
print(event.phase)
end
 
Runtime:addEventListener( "touch", touch )

Which version of corona? I've never seen that before - although I've never checked - I've never had a problem in game.

Not ideal, but you could work around it for now by testing event == began and a flag which you can set on the first moved event.

Ok, now you are more specific. If I understood correctly, you say that the windows simulator behaves different than the OSX simulator. On Android device I didn't notice this behaviour and I use that touch eventlister extensively. Will watch if I noticed anything.

Yep - just tried on the Mac simulator on all the simulated devices and no problems. Definitely present on the Windows simulator and an Android device (not mine, can't remember which one, I'm afraid) though that binary was build on a Mac.

m

Sorry it's been a while, busy week, but I've got my pc running the same code as before and the Droid simulator.

Code:

1
2
3
4
5
function touch( event )
    print( event.id, event.name, event.phase, event.time )
end
 
Runtime:addEventListener( "touch", touch )

We've seen some reports of missing "began" events on Touch and now able to reproduce it on iOS devices and the Windows Simulator. This may also apply to Tap events too. This problem seems to be in our core code so it will apply to all platforms.

We are looking into the issue and hope to have a fix soon in our Daily Builds.

Good to hear on this - it's causing a major issue and pretty much breaks the iOS/Android code base.
It would be great not to have to cater for this in the touch library I'm building.

Thanks Tom,

M

views:1590 update:2011/10/8 15:12:54
corona forums © 2003-2011