-
Notifications
You must be signed in to change notification settings - Fork 588
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
[#319] Added possibility to change default operation timeout. #321
Conversation
* @throws BleGattCallbackTimeoutException emitted when an internal timeout for connection has been reached. The operation will | ||
* timeout in direct mode (autoConnect = false) after 35 seconds. | ||
*/ | ||
Observable<RxBleConnection> establishConnection(ConnectionSetup connectionSetup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to wait with the signature establishConnection(ConnectionSetup)
till the new Connection
API will be ready
Reasoning:
establishConnection(ConnectionSetup)
is the easiest possible entry point- if we will use it with now—we will not be able to introduce the new
Connection
API without coming up with a new name for the function
Maybe we could use something like Observable<RxBleConnection> establishConnection(boolean autoConnect, TimeoutSetup timeoutSetup)
for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok for me.
settings.gradle
Outdated
@@ -1,3 +1,4 @@ | |||
include ':rxandroidble', ':mockrxandroidble', ':sample' | |||
include ':rxandroidble' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, a bug. Will revert.
[#319] Added possibility to change default operation timeout.
571b454
to
ef0139d
Compare
ef0139d
to
dde7f08
Compare
@dariuszseweryn Ready to be checked again. |
1 similar comment
@dariuszseweryn Ready to be checked again. |
* @throws BleGattCallbackTimeoutException emitted when an internal timeout for connection has been reached. The operation will | ||
* timeout in direct mode (autoConnect = false) after 35 seconds. | ||
*/ | ||
Observable<RxBleConnection> establishConnection(boolean autoConnect, TimeoutSetup operationTimeoutSetup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add @NonNull
annotation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
this.timeUnit = timeUnit; | ||
this.timeout = timeout; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
public final TimeUnit timeUnit; | ||
public final long timeout; | ||
|
||
public TimeoutSetup(long timeout, TimeUnit timeUnit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just Timeout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
[#319] Added possibility to change default operation timeout.