Support for multitouch on Android 2.x browser?

Discussion and feedback on Construct 2

Post » Wed May 30, 2012 4:14 pm

Reading the blog post "The Great HTML5 Mobile Gaming Performance Comparison" (23 May, 2012 wrote by Ashly) It leaves me a doubt:

"Android 2.x is rescued by directCanvas and CocoonJS - both add support for multitouch even if the stock browser does not support it"

This is if I wrap the game to a native form only right? Or this miraculous works if i keep it as a browser-webgame too?

Android in my country just recently sells v.2.3 as a new thing. Waiting for a standar sell of Android 4 smartphones could take some time that i don't want to wait (for multitouch on android browser).

This could add a masive amount of devices to the list of supported devices for browser-webgames.

Thanks in advance for any insight on this.

B
31
S
4
G
4
Posts: 110
Reputation: 4,588

Post » Wed May 30, 2012 5:45 pm

as i believe (not too far), multi touch could be supported with phonegap, appmobi or cocoonJS, however , android (v.2.3 i think) their browser don't support multi touch.
prinsukun2012-05-30 17:46:02
B
22
S
3
G
5
Posts: 141
Reputation: 5,117

Post » Fri Jun 22, 2012 12:12 am

These two polyfill solutions that (re-)enable the Android 2.x browser with multitouch came up just recently:

[URL=http://fastr.wordpress.com/2012/06/13/fastr-de-mtfix-for-andoird-2-x-applications-version-0-1-released/]MTFix[/URL] and [URL=https://github.com/Philzen/WebView-MultiTouch-Polyfill]WebView MultiTouch Polyfill (WMP)[/URL]

Whilst MtFix requires another javascript-file to be included, WMP is self-contained and thus enables multitouch on existing and/or online multitouch apps without further ado.

However, both polyfills will require you to provide an Android app container for download via the market. If that isn't a problem (i'd be happy to provide one), you could still have a pure online game, so when a user agent string containing a specific 2.x series webkit version is detected, you simply make a notice/direct link to the app container to download for 2.x users.

As both were developed with the priority intent to get pinch zooming working (which both solutions successfully do), there is still a lot of device testing to be done and opportunity for optimisation to be realised.

Therefore, speaking for the WMP project - it'd be great any HTML5 game developers would test and share their experiences, ideas and criticism by filing bug reports and questions on the Github page for WMP.
B
2
Posts: 4
Reputation: 258

Post » Fri Jun 22, 2012 12:34 am

There is nothing that can be done, at all, to enable multitouch in the 2.x browser. I'm afraid it's a lost cause.

Making native apps with CocoonJS or directCanvas is *the* workaround. Both workarounds posted by @Philzen seem to require making a native app too.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Jun 22, 2012 2:37 am

Questions:

[QUOTE=Ashley] Making native apps with CocoonJS or directCanvas is *the* workaround.[/QUOTE] Can you elaborate on that?

After having been googling for "multitouch android 2.x" for months and being surprised there was nothing even in phonegap/cordova, WMP was created out of desparation. I am also wondering why nobody posted that to the appropriate Android Bug Ticket

[QUOTE=Ashley]    Both workarounds posted by @Philzen seem to require making a native app too.[/QUOTE]

So are you saying i can actually include either CocoonJS or directCanvas in my project and it will make any html5 based app work with multitouch on android 2.x, no matter whether the app is local or remote?

That'd be absolutely awesome and i would certainly want to use that further advanced project.
B
2
Posts: 4
Reputation: 258

Post » Fri Jun 22, 2012 10:01 am

CocoonJS and directCanvas are native app wrappers. They don't fix the browser, but they will fix your specific app.

How to export to CocoonJS

How to export to appMobi directCanvas
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Jun 22, 2012 5:14 pm

I believe there's a confusion over what CocoonJs or appMobi do to a C2 project. It seems like CocoonJS or appMobi can make html5 games work with their fixes also as webgames directly embeded on the devices browsers.

But to make it clear to everyone, both CocoonJS and appMobi will transform a C2 project into a native app. But won't fix a game so it can work directly on android/ios browsers with the added functionality of those wrappers. (But it might be really helpful if they could).
B
31
S
4
G
4
Posts: 110
Reputation: 4,588

Post » Fri Jun 22, 2012 6:31 pm

CocoonJS and directCanvas are not actually real browsers - that's how they get around the problems in the device browser. So they don't use an actual browser at all. They just implement the parts needed to run HTML5 games, and faster and better than the browsers do, usually.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468


Return to Construct 2 General

Who is online

Users browsing this forum: anty21ro, mystazsea, nimos100 and 9 guests