Skip to content

Fix NoSuchMethodException BluetoothAdapter.setScanMode#17

Open
AchimStuy wants to merge 3 commits into
raghavk92:masterfrom
AchimStuy:master
Open

Fix NoSuchMethodException BluetoothAdapter.setScanMode#17
AchimStuy wants to merge 3 commits into
raghavk92:masterfrom
AchimStuy:master

Conversation

@AchimStuy

Copy link
Copy Markdown

Fixes #10

Thanks also to @cuongnv for his code snippet on how to enable discover.

@rostopira

rostopira commented Feb 9, 2021

Copy link
Copy Markdown
Collaborator

Seems you have deleted old code and replaced it with fix for Android 11.
Could you please add an if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) statement to leave old code for Android 10?

@raghavk92

Copy link
Copy Markdown
Owner

Seems you have deleted old code and replaced it with fix for Android 11.
Could you please add an if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) statement to leave old code for Android 10?

I think it might be Build.VERSION_CODES.R (For android 11 and above)

@AchimStuy

Copy link
Copy Markdown
Author

I can add that, but according to docs I did not use any APIs newer than Android 9, so my fix should also work there. Have you checked that? (I don't have any Android 9 to try..)

@AchimStuy

Copy link
Copy Markdown
Author

I just spotted a flaw in the logic to not show the intent to activate Bluetooth when there is already a device plugged. And other way round this might have prevented new devices to be discovered.

@raghavk92

Copy link
Copy Markdown
Owner

I just spotted a flaw in the logic to not show the intent to activate Bluetooth when there is already a device plugged. And other way round this might have prevented new devices to be discovered.

Hey bro sorry , cant look at your pull request just right now....I am pretty busy this month. If @rostopira is able to look at them and has time he will look at them. But really appreciate your effort.

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.

Crashes (NoSuchMethodException for hidden APIs) on Android 11

3 participants