Skip to content

remove protected properties from device map.#1

Merged
DeveloperRejaul merged 1 commit intoDeveloperRejaul:mainfrom
RhinoLance:bug/getDeviceList-accessing-protected-properties
Mar 31, 2026
Merged

remove protected properties from device map.#1
DeveloperRejaul merged 1 commit intoDeveloperRejaul:mainfrom
RhinoLance:bug/getDeviceList-accessing-protected-properties

Conversation

@RhinoLance
Copy link
Copy Markdown
Contributor

Newer versions of Android require permissions to access UsbDevice properties which used to be "open". As such, getDeviceList always fails with permission errors.

This PR strips most properties from the device map created from getDeviceList, so that only unprotected properties are accessed.

Once the user requests permissions for a specific device, they can then access protected properties, such as serialNumber.

@DeveloperRejaul
Copy link
Copy Markdown
Owner

🙌 Thanks for the Contribution!

Thank you for this PR — really appreciate you taking the time to address the USB permission issues on newer Android versions.

The approach of limiting getDeviceList to unprotected properties is clean and practical, and it helps prevent those permission-related crashes while keeping the flow smooth for users.

I've merged your changes into the library ✅

Thanks again for the thoughtful fix and contribution!

@DeveloperRejaul DeveloperRejaul merged commit 203f027 into DeveloperRejaul:main Mar 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants