GLBasic forum

Main forum => GLBasic - en => Topic started by: svenart on 2011-Dec-04

Title: Android: Sensors and multitouch?
Post by: svenart on 2011-Dec-04
Hello,

I searched for this in the forums, but was not able to find anything.

Is it possible to use the android sensors (compass, display rotation ect.) with glbasic?
Is multitouch possible with glbasic and android?

Are there tutorials or examples for this?
Title: Re: Android: Sensors and multitouch?
Post by: spacefractal on 2011-Dec-05
Compass is no, but multi touch and rotation is supported.

Make sure on android to support single touch as well early bad multi touch screens (search goggle for axis flip issue), if you want to support so many v2.2 devices as possible. It's should not been happens on newer phones today.
Title: Re: Android: Sensors and multitouch?
Post by: svenart on 2011-Dec-05
thank you very much for the info.

But I still dont know HOW to retrieve multitouch. For singletouch I just use the mousepointer, but how can I retrieve more than just one position?
Title: Re: Android: Sensors and multitouch?
Post by: Hatonastick on 2011-Dec-05
Look up GETMOUSECOUNT().  I haven't checked yet, but supposedly it applies to Android as well, despite what the help file says. :)
Title: Re: Android: Sensors and multitouch?
Post by: Moebius on 2011-Dec-05
When I last checked you could only get the 'first' finger using SETMOUSE etc on android....
Title: Re: Android: Sensors and multitouch?
Post by: Minion on 2011-Dec-05
I use SETMOUSE in all my android games (on my phone I can have up to 4 multi touches)
Title: Re: Android: Sensors and multitouch?
Post by: Moebius on 2011-Dec-06
Actually?  Well I stand corrected  =D
Title: Re: Android: Sensors and multitouch?
Post by: spacefractal on 2011-Dec-06
its added in a newer update, just remind far from all android phones have it or might have flaws as well can take some sort of CPU.

So it's good choice to do both single touch and multitouch for android.
Title: Re: Android: Sensors and multitouch?
Post by: ampos on 2011-Dec-06
Multitouch works, as my app Glowing Sky has multitouch and it works.
Title: Re: Android: Sensors and multitouch?
Post by: MrTAToad on 2011-Dec-07
Should also remember that not all devices are capable of using multi-touch (especially the cheap, Chinese ones).
Title: Re: Android: Sensors and multitouch?
Post by: Wampus on 2011-Dec-07
Quote from: MrTAToad on 2011-Dec-07
Should also remember that not all devices are capable of using multi-touch (especially the cheap, Chinese ones).

Oh yeah! Worth remembering (thanks). Some control schemes assume at least two-touch for screen pinching, rotate around a point, etc. I suppose as long as a prototype game is playable on a PC using just a mouse it should be playable on a single-touch screen.
Title: Re: Android: Sensors and multitouch?
Post by: MrTAToad on 2011-Dec-07
Yes, as long as you do it for the left mouse button/Button 1 and no other there will be no problem