New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676639 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature

Blocking:
issue 632100



Sign in to add a comment

bluetooth: android: improve "Turn on bluetooth" flow

Project Member Reported by fbeaufort@chromium.org, Dec 22 2016

Issue description

I've witnessed some real users having trouble when they're asked to turn ON Bluetooth for the first time in the Android Web Bluetooth chooser. I wonder how we could make this experience better as it may be the first time they actually visit Android Bluetooth settings.

When they turn it on, they see some Bluetooth devices popping up and they're inclined to pick one. However they should go back to the Web page and "restart" the Web Bluetooth chooser by clicking on a button or something else similar.


A first good step may be to show the Web Bluetooth chooser again when they're coming back to the web page in order to not lose context.

Then, I wish we could "simply" enable Bluetooth on our side or maybe show Android Bluetooth settings in a way that users know they have to go back to Chrome.  

 
Screenshot_20161222-153633.png
82.1 KB View Download

Comment 1 by juncai@chromium.org, Dec 23 2016

"When they turn it on, they see some Bluetooth devices popping up and they're inclined to pick one."
Not sure what this means. Where do the users see some Bluetooth devices popping up? Is it in our chooser or some other app of the phone?
In Android Bluetooth settings, when you turn on Bluetooth, some Bluetooth devices may show up below.

Comment 3 by juncai@chromium.org, Dec 27 2016

Another option is to update the text that is shown in the chooser to explicitly say that users need to come back to this page to open the chooser and select a Bluetooth device from the chooser.
I'm not sure this will be enough sadly ;(
Blocking: 632100
Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
We can programmatically enable bluetooth on Android with BluetoothAdapter.enable(); [1]

We'll need to change the strings in the chooser to do so, they should be very clear that the system's Bluetooth is being enabled. 

Alternatively we could use ACTION_REQUEST_ENABLE [2] to have Android display UI for us. Some examples of what that looks like [3].

[1]
https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#enable()

[2]
https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_ENABLE

[3]
https://www.google.com/search?q=bluetooth+ACTION_REQUEST_ENABLE&source=lnms&tbm=isch&sa=X
Cc: -juncai@chromium.org rolfe@chromium.org jun...@chromium.orgm
ACTION_REQUEST_ENABLE seems a good thing to do there. Here are attached some mocks on how it would look like. 

I've changed "Turn on Bluetooth [in device settings] to allow pairing" string to "[Turn on Bluetooth] to allow pairing".
Tapping on "Turn on Bluetooth" blue link shows a system activity that allows the user to turn on Bluetooth.

What do you think rolfe@?


before-tap-on-turn-on-bluetooth-link.png
109 KB View Download
after-tap-on-turn-on-bluetooth-link.png
81.0 KB View Download
Cc: -jun...@chromium.orgm juncai@chromium.org

Comment 8 by rolfe@chromium.org, Jan 6 2017

Cool. This is way more efficient. The Chrome string change is fine. Do we have any control over the activity dialog one? Might be nice to pull up more of the official-looking Android permission style (icon + "Allow Chrome to turn on Bluetooth?") even though management isn't within Chrome app permissions.

I can also run the string by our new UX writer (!!) srahim@ if we have control over it.
By using ACTION_REQUEST_ENABLE, user needs to click twice to enable Bluetooth.

By using BluetoothAdapter.enable(); no UI change needed, only the string needs to clearly say that clicking the link will enable Bluetooth on the phone. And it is a one-step action. And it seems more straightforward?
Owner: juncai@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Here are some screenshots.
chooser_1.png
137 KB View Download
chooser_2.png
181 KB View Download
chooser_3.png
181 KB View Download
In discussion juncai described wanting to try to update the chooser to stay while the pop up permissions and "turning bluetooth on" dialogs appear.
Cc: -juncai@chromium.org
I modified the code to make the chooser stay while the pop up permissions and "turning bluetooth on" dialogs appear. Here are some screenshots.
chooser_1.png
107 KB View Download
chooser_2.png
116 KB View Download
chooser_3.png
107 KB View Download
chooser_4.png
134 KB View Download

Comment 15 by rolfe@chromium.org, Jan 13 2017

I do agree with juncai@ it's nice to keep the chooser open in the background.

Not sure if my question in Comment 8 got answered. Do we have control over the dialog strings at all? I'd like to massage "an app wants to turn on bluetooth" if that's not an OS requirement.

Another thought: Do we need the "turning bluetooth on" part? I'd go straight to the chooser with the loader. (Or we'd use a different style for that sort of thing, like a toast or snackbar. But the loading circle does the same thing.)
For the dialog string "An app wants to turn on Bluetooth.", we don't have control over it since it is specified by Android system. The "Turning Bluetooth on..." part also comes with the Android system. I think it is better to use them since they are consistent with other apps which also use Bluetooth on Android.
After talking to scheib@, I think I am going to try the other method by creating another CL that directly calls BluetoothAdapter.enable() (as Comment 5 mentioned) and shows the throbber when it is enabling the Bluetooth. And we can see how it looks like and compare these two methods.

Comment 18 by rolfe@chromium.org, Jan 13 2017

Just noting I better understand and agree with Comment 16 if that's the final path (if it's part of the OS flow we just use that.)
Here are the screenshots for the other approach. By clicking "Turn on Bluetooth" link, a throbber is shown to indicate the Bluetooth adapter is turning on. And after the adapter has been turned on, the search starts immediately, so the throbber is still shown in the third screenshot. It is simpler since it needs only one click from users.

Notice that the second screenshot is when the Bluetooth is turning on, so the Bluetooth icon is not shown on the top of the screen and the status is just "Get help". The third screenshot is when the Bluetooth has been turned on and is searching for devices, so the Bluetooth icon is shown on the top of the screen and the status is "Get help while scanning for devices...".

What do you think of this approach?
chooser_1.png
121 KB View Download
chooser_2.png
110 KB View Download
chooser_3.png
119 KB View Download
FWIW, I think the approach in #19 is fine. I haven't managed to think of an interpretation of "Turn on Bluetooth" that would imply that the user gets another chance to change their mind, or that it's off for other apps after the user taps it, so I don't expect #19's behavior to make any users sad. Users might not know how to turn Bluetooth off again, but the same is true for the system flow shown in #14, so I don't think we need to worry about it.

Comment 21 by rolfe@chromium.org, Jan 18 2017

Agree with jyasskin - this looks good to me. (Really like how slick the flow is, with way fewer steps than before.)
Project Member

Comment 22 by bugdroid1@chromium.org, Jan 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661

commit 1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661
Author: juncai <juncai@chromium.org>
Date: Wed Jan 18 22:03:39 2017

Improve "turn on Bluetooth" flow (another approach)

When Bluetooth is off on the device, the "device settings" link will
open a device settings page where users can turn on Bluetooth. This
CL modifies the link to directly turn on the Bluetooth adapter. While
turning on the adapter, the throbber is shown to indicate that. This
simplifies the "turn on Bluetooth" flow by staying on the same web
bluetooth application page.

I uploaded some screenshots on the issue page.

BUG= 676639 

Review-Url: https://codereview.chromium.org/2643573002
Cr-Commit-Position: refs/heads/master@{#444505}

[modify] https://crrev.com/1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
[modify] https://crrev.com/1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
[modify] https://crrev.com/1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/1bb6a96b7a6aa53e2a9834a2939bc60f1a40a661/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java

Status: Fixed (was: Started)
This is so much better in terms of first-time experience! Thank you Jun.
Verified in Chromium (57.0.2987.0)

Sign in to add a comment