Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't establish connection on Android 7.1.1 #83

Closed
klemzy opened this issue Oct 20, 2016 · 3 comments
Closed

Can't establish connection on Android 7.1.1 #83

klemzy opened this issue Oct 20, 2016 · 3 comments
Assignees
Labels
bug Bug that is caused by the library

Comments

@klemzy
Copy link

klemzy commented Oct 20, 2016

Summary

Establish connection with autoconnect=true connection crashes with reflection exception.

Preconditions

Android 7.1.1

Steps to reproduce actual result

  1. Try to establish connection with autoconnect=true

Actual result

java.lang.IllegalArgumentException: method android.bluetooth.BluetoothGatt.<init> argument 1 has type android.bluetooth.IBluetoothGatt, got context
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
    at com.polidea.rxandroidble.internal.util.BleConnectionCompat.createBluetoothGatt(BleConnectionCompat.java:108)
    at com.polidea.rxandroidble.internal.util.BleConnectionCompat.connectGatt(BleConnectionCompat.java:53)
    at com.polidea.rxandroidble.internal.operations.RxBleRadioOperationConnect.lambda$getConnectedBluetoothGatt$40(RxBleRadioOperationConnect.java:77)
    at com.polidea.rxandroidble.internal.operations.RxBleRadioOperationConnect$$Lambda$8.call(Unknown Source)


#### Expected result

Connection got established

@dariuszseweryn dariuszseweryn added the bug Bug that is caused by the library label Oct 21, 2016
@dariuszseweryn dariuszseweryn self-assigned this Oct 21, 2016
@dariuszseweryn
Copy link
Owner

Using reflection for autoConnect = true is no longer needed past Android 7.0.0. Fix is on it's way.

dariuszseweryn added a commit that referenced this issue Oct 25, 2016
…d 7.0.0+. It is no longer needed as the issue for using reflection was fixed.

Summary: #83

Reviewers: michal.zielinski, pawel.urban

Reviewed By: pawel.urban

Differential Revision: https://phabricator.polidea.com/D1893
@dariuszseweryn
Copy link
Owner

Just pushed to the master. Should be available in the SNAPSHOT release shortly.

@klemzy
Copy link
Author

klemzy commented Oct 25, 2016

Great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is caused by the library
Projects
None yet
Development

No branches or pull requests

2 participants