Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to check if multitouch on Android is available?
Started by happymongoose Sep 10 2013 03:24 AM

5 replies to this topic
android multitouch detect check supported support
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

happymongoose

[GLOBAL: userInfoPane.html]
happymongoose
  • Contributor

  • 350 posts
  • Corona SDK

Hi there,

 

Does anyone know if there is a way to check if multitouch is supported on an Android device?  I know this is possible through through native code such as:

    PackageManager pm = context.getPackageManager();
    boolean hasMultitouch = 
        pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);

But is this possible through Corona?  The system.activate function does not return a value, and system.getInfo doesn't seem to refer to it.

 

Many thanks in advance,

 

Simon.



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @simon6,

I believe there is a workaround that'll accomplish this on Android. You can use the "system.getInputDevices()" function and check for any devices of type "touchscreen". However, I don't think the device info provides the number of simultaneous touches it supports. Worth a try, however. ;)

 

http://docs.coronalabs.com/api/library/system/getInputDevices.html

 

Take care,

Brent



[TOPIC: post.html]
#3

happymongoose

[GLOBAL: userInfoPane.html]
happymongoose
  • Contributor

  • 350 posts
  • Corona SDK

I'll give it a try.

 

Many thanks,

 

Simon



[TOPIC: post.html]
#4

akao

[GLOBAL: userInfoPane.html]
akao
  • Contributor

  • 349 posts
  • Corona SDK

@simon6 - just want to check to see if you have been able to figure out a way to check if an Android device supports multitouch?

 

Thx!

Andrew



[TOPIC: post.html]
#5

happymongoose

[GLOBAL: userInfoPane.html]
happymongoose
  • Contributor

  • 350 posts
  • Corona SDK

I'm afraid I didn't - apart from being able to find out any sort of touch screen was attached, I wasn't able to find out whether it supported multitouch or not.

 

Simon



[TOPIC: post.html]
#6

akao

[GLOBAL: userInfoPane.html]
akao
  • Contributor

  • 349 posts
  • Corona SDK

@Simon - BTW, do you have a sense how much of an issue this still is for Android? We did some research on this online, it seems like a couple years ago, this was a really big issue. And frankly that's why a few years ago, we actually assumed that all Android devices aren't multi-touch capable in our apps. But we can't seem to find any reliable data on how prevalent the issue still is today.

 

But, with the modern devices, you would think this shouldn't be an issue any more. Also, multi-touch has been supported since Android 2.2, a while ago. I just have a hard time imagining HD device makers still not supporting this....




[topic_controls]
[/topic_controls]