New issue
Advanced search Search tips

Issue 636455 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

Web MIDI: improve BLE MIDI handling of Android native backend

Project Member Reported by toyoshim@chromium.org, Aug 10 2016

Issue description

Steps:
1. enable use-android-midi-api flag
2. call requestMIDIAccess and check inputs and outputs
3. virtual software devices and USB devices are enumerated, but BLE devices are not there

Device:
mi.1 - a third party's app that uses MIDI API and explicitly says supporting BLE MIDI works with this device, but others using MIDI API do not.
My understanding was that if an application connects to BLE MIDI devices through the MIDI API, the device can be seen from other applications via the API.

Version:
Android N + Chromium HEAD

 
Once the BLE MIDI device is paired by another right applications, e.g. https://play.google.com/store/apps/details?id=com.mobileer.example.midibtlepairing
The device can be enumerated correctly. But device name was empty in my case.
openBluetoothDevice() is needed to bind BLE MIDI by Chrome, itself. But it isn't trivial if we should call it since it may offer runtime permission dialog at Android layer. Probably, we want to do it after changing behavior to ask permission even if the MIDI is requested without sysex flag.

For empty name, it would be better to use PROPERTY_NAME if PROPERTY_PRODUCT returns empty string.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 20 2016

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

commit 98132ff7ce96eb3139c4979ba9fe18bab9f49f45
Author: toyoshim <toyoshim@chromium.org>
Date: Thu Oct 20 05:27:12 2016

Web MIDI Android: Use PROPERTY_NAME if PROPERTY_PRODUCT is empty

On BLE MIDI device, PROPERTY_PRODUCT can be an empty string.
To provide better information in MIDIPort interface, use
PROPERTY_NAME instead of an empty string.

BUG=636455

Review-Url: https://chromiumcodereview.appspot.com/2425863003
Cr-Commit-Position: refs/heads/master@{#426415}

[modify] https://crrev.com/98132ff7ce96eb3139c4979ba9fe18bab9f49f45/media/midi/java/src/org/chromium/midi/MidiDeviceAndroid.java

Summary: Web MIDI: improve BLE MIDI handling of Android native backend (was: Web MIDI: BLE MIDI seems not working with Android native API flag)
Now it works, but still room for improvement is there.

1. BLE MIDI device needs to be paired by other applications
2. MIDIPort can not expose enough information

For 1, as I commented at #c2, we would add pairing code after improving permission handling.

For 2, I'm asking Android team to expose more BLE information through the MIDI API in the later versions.

I'd keep this marked as Available for future improvement and discussion.
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 23 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Type-Bug -Hotlist-Recharge-Cold Type-Task
Status: Available (was: Untriaged)
Probably, we'd have a pairing page at chrome://midi-internals and eventually move it into settings or somewhere if it is useful.
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 24

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold

Sign in to add a comment