cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iono sphere <999ionosphe...@gmail.com>
Subject Regarding Cordova and Gamepad
Date Tue, 13 Sep 2016 14:56:09 GMT
I am developing a game using Construct 2 which could export the project to
Cordova. Then, I could put the game into Crosswalk and play the game on my
Android. My Construct 2 game supports gamepad, and this is the issue:

While my HTML5 game could respond to gamepad input just fine on Desktop, I
see that the game does not respond to D-Pad, LT, RT, R3 analog stick on
Android. I have tested several gamepads on the game and also on
http://html5gamepad.com/ and I see that all gamepads pretty much got
identical issue. It seems that the Gamepad API does not fully support
Android gamepads.

Because of this, I think this is more of HTML5 issue on Android. Is it
possible to make it so the HTML5 Cordova exported game could access the
device's gamepad input? From the overview section in Cordova document:

-----

Use Apache Cordova if you are:

a mobile developer interested in mixing native application components with
a *WebView* (special browser window) that can access *device-level APIs*,
or if you want to develop a plugin interface between native and WebView
components.

-----

"access device-level APIs"? If I understand this correctly, does this mean
I could somehow make it so that the HTML5 game could read gamepad input
using Android's device-level APIs instead of the HTML5 Gamepad API? I see
that a native gamepad app (such as GamepadTest from Play Store) could read
all of the gamepad's inputs just fine, unlike HTML5 games and
http://html5gamepad.com .

Because of this, is this actually possible in Cordova? If so, what must be
done?

Regards,
Iono

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message