Kontroller icon indicating copy to clipboard operation
Kontroller copied to clipboard

Fix NoSuchMethodException BluetoothAdapter.setScanMode

Open AchimStuy opened this issue 5 years ago • 5 comments

Fixes #10

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

AchimStuy avatar Feb 06 '21 19:02 AchimStuy

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?

rostopira avatar Feb 09 '21 12:02 rostopira

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)

raghavk92 avatar Feb 09 '21 13:02 raghavk92

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 avatar Feb 09 '21 19:02 AchimStuy

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.

AchimStuy avatar Feb 11 '21 05:02 AchimStuy

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.

raghavk92 avatar Feb 11 '21 14:02 raghavk92