Detect multitouch capability

Is there a way to detect whether multitouch is available (or not) during runtime?

My app has a zoomable map. Currently, I set up the app to use the pinch zoom code when the app runs on iOS, and a zoom slider if iOS is not detected (When it runs on Corona simulator or on Android).

When pinch zoom is available through multitouch, I hide the zoom slider, since its not required.

Since I’d like Android users to enjoy pinch zoom as well, but not all Android devices support multitouch, how do you test to see if multitouch is available on the device? [import]uid: 33608 topic_id: 17221 reply_id: 317221[/import]

I would suggest taking a look at the Multitouch-ipad SampleCode in the ‘PlatformSpecific’ folder and see how it handles multi-touch, and just have the app handle single-touches in a specific manner. That way, you may never have the need to check if multi-touch is enabled upfront. [import]uid: 52430 topic_id: 17221 reply_id: 64962[/import]

Single touch is the default for Corona. You have to explicitly set multitouch and in doing so you can set a flag for reference.

-David
[import]uid: 96411 topic_id: 17221 reply_id: 64965[/import]

Thanks you for the quick replies. However, I don’t think we are thinking about the same problem.

What I’m looking for is a functionality equivilant to:

--[[ Pseudo-code:  
--(This doesn't really work, since the system.activate API doesn't --return anything, but it should explain what I'm trying to accomplish)  
--]]  
-------------------------------------  
  
--again, I know the next line is not supposed to work...  
local didItActivate = system.activate("multitouch");  
  
if didItActivate then  
 --use pinch zoom  
else  
 --draw a zoom slider  
end  
  

Since system.activate(“multitouch”) doesn’t tell you if it was successful, is there any other way to figure it out?

Creating a list of all devices that support multitouch and using that list as a flag to whether or not to use pinch zoom is my fall-back solution, but its not very practical or effective. [import]uid: 33608 topic_id: 17221 reply_id: 64969[/import]

You could make a first decision by guessing and let the user configure it. So you are save for each case… [import]uid: 70114 topic_id: 17221 reply_id: 65049[/import]