-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Implement set and get bluetooth of devices. #790
base: master
Are you sure you want to change the base?
Conversation
lib/wire/wire.proto
Outdated
@@ -67,6 +67,8 @@ enum MessageType { | |||
RingerGetMessage = 64; | |||
WifiSetEnabledMessage = 57; | |||
WifiGetStatusMessage = 58; | |||
BluetoothSetEnabledMessage = 94; |
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.
Those lines should be after line 82 with ConnectStoppedMessage
.
Rebased and fixed that issue |
.col-md-4 | ||
h6(translate) Bluetooth | ||
.btn-group | ||
label.btn.btn-sm.btn-primary-outline(ng-model='bluetoothEnabled', ng-click='toggleBluetooth(false)', uib-btn-radio='false', uib-tooltip='{{"Disable WiFi" | translate}}') |
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.
Tooltips still refer to WiFi
I tested this on a Huawei Mate 10 just now. It does work, however there's a bug. When bluetooth is disabled, and you use the STF UI to enable it, bluetooth gets enabled just fine. However, after a few seconds the STF UI shows that bluetooth is disabled. So, in other words, when you click on the "enable" button, it works and looks fine for a brief moment ("enable" button is blue). But then the "enable" button deactivates and the "disable" button becomes blue. If I go to another tab in STF and then back to the "Automation" tab, it shows correctly again ("enable" is blue). Maybe some sort of a timing issue? By the way on the Mate 10 there's a dialog that pops up on the device every time you enable Bluetooth. It says "STFService is trying to turn on Bluetooth. Allow?" Might be related and/or causing the timing issue |
I have merged openstf/STFService.apk#20 now. I believe that the bug I mentioned is related to the changes here. Note that you'll also have to bump the STFService version as follows:
|
This contributes to the server side, see this ticket:
openstf/STFService.apk#18
and the corresponding pull request:
openstf/STFService.apk#20
The STFService.apk was updated to the changes in the pull request in order to be able to set and get the Bluetooth status. The .proto files have been adjusted. The functionality was very similiar implemented to the WiFi functionality. Like for WiFi, similiar buttons have been added to the Device->Automation view.
Be aware, that setting and getting the Bluetooth status is only possible with the new updated .apk, otherwise a timeout occurs.