Copy link to clipboard
Copied
Hi there,
I've started using AIR 20 to take advantage of the Android TV support. I successfully built a version of my game supporting Android TV and have it running great on the new Razer Forge TV.
I can't, however, seem to get the controller to be recognized. I'm using a wired Xbox360 controller, which works perfectly when plugging it on the PC build, but not on the Forge TV. The controller works well in the Forge TV menus and in other games.
Are there any outstanding issues with controller recognition on Android TV? The GameInputEvent.DEVICE_ADDED doesn't trigger at all.
Thank you
Copy link to clipboard
Copied
Hi,
To get the support of game controller in your application, you have to ensure that your application is well-suited for multiple input devices with varying capabilities and controls.
Can you please check if your controller device is getting detected using below code:
trace("GameInput.isSupported - " + GameInput.isSupported);
trace("GameInput.numDevices - " + GameInput.numDevices);
trace("GameInput.getDeviceAt- " + GameInput.getDeviceAt(0));
you can refer to this blog to get the support of game controller in your application:
Game controllers on Adobe AIR | Adobe Developer Connection
Thanks.
Adobe Air Team
Copy link to clipboard
Copied
I just ran a test and both isSupported=true and numDevices=1 so it correctly sees there's a controller connected.
However the listeners still fail to activate, whether the controller is plugged in at app start or not.
No errors are thrown.
Is what I'm experiencing related to this?
[Android] AIR Game Pad is not getting launched on Android M. (4015404)
Copy link to clipboard
Copied
Hi,
No, Your issue is not related to bug: [Android] AIR Game Pad is not getting launched on Android M. (4015404)
I want to confirm if you are not getting the device id when using trace("GameInput.getDeviceAt- " + GameInput.getDeviceAt(0)); ?
Thanks,
Adobe AIR Team
Copy link to clipboard
Copied
I've done some more testing:
I tried with a PS4 Controller (via bluetooth) and the result is:
GameInput.isSupported = true
GameInput.numDevices = 0
GameInput.getDeviceAt(0) = null
And I tried with a plugged in X360 controller:
GameInput.isSupported = true
GameInput.numDevices = 0
GameInput.getDeviceAt(0) = null
So the exact same thing. Not sure how i got numDevices = 1 the previous time. I can't get that to happen again.
Copy link to clipboard
Copied
Hi,
I've got same issue =/ I get this results :
GameInput.isSupported true
GameInput.numDevices 1
GameInput.getDeviceAt null
I need to instantiate one GameInput object before in order to have one device. But still can't access to it because it's always null value. =/
Copy link to clipboard
Copied
Any answer on this? Is this officially a bug?
Copy link to clipboard
Copied
I added a bug! Bug#4099831 - Controller not recognized on Android TV
Copy link to clipboard
Copied
Hi,
We tried diagnosing the bug at our end and we are able to get the below results:
GameInput.isSupported - true
GameInput.numDevices - 1
GameInput.getDeviceAt- [object GameInputDevice]
AIRSDK Used: 20.0.0.185
Please find the attached sample project here: Bug#4099831 - Controller not recognized on Android TV
Please verify the bug at your end using the sample project.
Do let us know if you face any further problem.
Thanks,
Adobe AIR Team
Copy link to clipboard
Copied
I'll test it soon and get you a response. Thanks for checking into it
Copy link to clipboard
Copied
The latest AIR SDKs on Windows (.225 or .230) have trouble compiling with the AndroidTV tags. It says they're invalid and I can no longer compile 😕