Skip to main content
geretti
Known Participant
November 24, 2015
Question

Controller not recognized on Android TV

  • November 24, 2015
  • 1 reply
  • 1649 views

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

This topic has been closed for replies.

1 reply

deesharm
Adobe Employee
Adobe Employee
November 25, 2015

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

geretti
gerettiAuthor
Known Participant
November 27, 2015

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)

deesharm
Adobe Employee
Adobe Employee
November 30, 2015

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