0

I need to know how to get the input device that was used to open my application (in the onCreate method, for example) .

A bit more specific, how to know if my app was opened with "Amazon Fire TV Remote Input" or "Amazon Fire Game Controller Input"?.

Thanks!

rekire
  • 47,260
  • 30
  • 167
  • 264
raymercb
  • 11
  • 4
  • You can try dumping out all the fields and extras of the Intent, but if it is not there the information may simply not be available to you. – Chris Stratton Aug 11 '14 at 14:51
  • You can get useful information from the device configuration: developer.android.com/reference/android/content/res/Configuration.html but that will tell you about connected input devices in general, and it may be impossible to answer the exact question you're asking. – x-code Aug 11 '14 at 17:08
  • looks like there's nothing there to tell you, until you get a keypress and can then query the ID of the controller. Any reason you need that info at startup? – Offbeatmammal Aug 25 '14 at 22:31
  • Hi all, thanks for your answers. I had to change a bit the behavior because I have not found a solution for this. @Offbeatmammal the initial reason was to manipulate the initial behavior of the app, depending on the device that opened. For example, specific guide for a control or another. thanks – raymercb Aug 27 '14 at 16:18

0 Answers0