You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using a gamepad via USB, like a Gamesir X2, it's convenient to lock the device orientation to landscape, something that would be nice to automate. You could also wire it up to open a game UI app or disable battery optimization.
I have not found any simple way to detect USB device connection, there may be some obscure Android event or such that would allow for it, but nothing simple like detecting bluetooth devices.
Describe the solution you'd like
An event/condition to detect USB device connections, alongside product and vendor IDs if possible (not sure how much Android exposes USB info from the Linux kernel).
Describe alternatives you've considered [optional]
If detecting USB devices in general proves difficult/not allowed by Android, then perhaps registering an InputDeviceListener would suffice for this specific use case (provided we can detect what kind of input device it is to make the rule more useful).
Additional context
These devices appear to connect like any other USB gamepad on Android and a notification appears showing that the OS is "charging them" (though it doesn't appear to affect battery life significantly). Some also feature passthrough charging.
Here's what one of these devices looks like (click to expand):
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When using a gamepad via USB, like a Gamesir X2, it's convenient to lock the device orientation to landscape, something that would be nice to automate. You could also wire it up to open a game UI app or disable battery optimization.
I have not found any simple way to detect USB device connection, there may be some obscure Android event or such that would allow for it, but nothing simple like detecting bluetooth devices.
Describe the solution you'd like
An event/condition to detect USB device connections, alongside product and vendor IDs if possible (not sure how much Android exposes USB info from the Linux kernel).
Describe alternatives you've considered [optional]
If detecting USB devices in general proves difficult/not allowed by Android, then perhaps registering an
InputDeviceListener
would suffice for this specific use case (provided we can detect what kind of input device it is to make the rule more useful).Additional context
These devices appear to connect like any other USB gamepad on Android and a notification appears showing that the OS is "charging them" (though it doesn't appear to affect battery life significantly). Some also feature passthrough charging.
Here's what one of these devices looks like (click to expand):
The text was updated successfully, but these errors were encountered: