I have three devices.
- Amazon Kindle Fire 5 ( android version 5.1.1 )
- Samsung Mini 4 ( android version 4.4.2 )
- Moto G4 ( android version 7.0 )
In the sample code below the Samsung and Kindle increase the counter by 2 each time you tap the screen and you get two message boxes. The moto works as expect.
This was happening on the last version of AppGameKit and is also happening on the version that was released this week. 2018.04.12
If you uncomment the sync() after Message() it works as expected on the samsung and kindle suggesting something not getting flushed after the usual sync() on older version of android maybe?
SetErrorMode(2)
SetWindowTitle( "proj" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
SetPrintSize( 32)
counter as Integer
do
touchid = GetRawFirstTouchEvent( 1 )
If GetRawTouchType(touchid) = 1
counter = counter + 1
message("tapped")
`Sync()
endif
Print( counter )
Sync()
loop