[Bug]: Android 14 usb support
Closed this issue · 4 comments
jorbuedo commented
Impacted Library name
@ledgerhq/react-native-hid
Impacted Library version
all
Describe the bug
After upgrading Android project to sdk 34 (which is now required to publish to play store), the following error occurs:
One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
Expected behavior
App should not crash when using the library.
Additional context
https://stackoverflow.com/a/77276774
Lines:
and
Need to be updated to include RECEIVER_NOT_EXPORTED like
getReactApplicationContext().registerReceiver(receiver, intFilter, RECEIVER_NOT_EXPORTED);
Or rather this for retrocompatibility
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getReactApplicationContext().registerReceiver(receiver, intFilter, Context.RECEIVER_NOT_EXPORTED);
} else {
getReactApplicationContext().registerReceiver(receiver, intFilter);
}
nicolas-meilan commented
I create this PR that fix the error: #7880
github-actions commented
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.
jorbuedo commented
Still an issue, the PR is just stuck it seems.
github-actions commented
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.