InvisibleWrench / FlutterMidiCommand

A Flutter plugin to send and receive MIDI
BSD 3-Clause "New" or "Revised" License
95 stars 50 forks source link

Android example not working #32

Closed systemcode closed 3 years ago

systemcode commented 3 years ago

I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices [Landroid.media.midi.MidiDeviceInfo;@62e62ae D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

mortenboye commented 3 years ago

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

systemcode commented 3 years ago

Clean clone into a new folder.

I’ve tried both SDK 28 and 29.

TBH Although I’ve released iOS apps with your plugin, I’m new to Android. My main apps seem to work fine on Android except for this.

What SDK would you recommend?

On Thu, 29 Apr 2021 at 18:11, Morten Boye Mortensen < @.***> wrote:

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829439984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA25FQQWFB3L3VCMKBISNJTTLGHMDANCNFSM432IDQUA .

mortenboye commented 3 years ago

Just to confirm. Is it also a fresh install on the device? Meaning, the old (if any) example app has been deleted before the new one gets installed.

I haven’t seen this issue myself, but will look into it.

On 29 Apr 2021, at 19.35, systemcode @.***> wrote:

 Clean clone into a new folder.

I’ve tried both SDK 28 and 29.

TBH Although I’ve released iOS apps with your plugin, I’m new to Android. My main apps seem to work fine on Android except for this.

What SDK would you recommend?

On Thu, 29 Apr 2021 at 18:11, Morten Boye Mortensen < @.***> wrote:

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829439984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA25FQQWFB3L3VCMKBISNJTTLGHMDANCNFSM432IDQUA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

systemcode commented 3 years ago

Fresh clone from GitHub into fresh folder.

Tried SDK 28 and 29

iOS emulator and real device and MacOS ok.

Run without any changes using IntelliJ as well as flutter run.

Fails on both: Pixel device emulator. No app previously installed. New Android tablet. V10

On Thu, 29 Apr 2021 at 18:54, Morten Boye Mortensen < @.***> wrote:

Just to confirm. Is it also a fresh install on the device? Meaning, the old (if any) example app has been deleted before the new one gets installed.

I haven’t seen this issue myself, but will look into it.

On 29 Apr 2021, at 19.35, systemcode @.***> wrote:

 Clean clone into a new folder.

I’ve tried both SDK 28 and 29.

TBH Although I’ve released iOS apps with your plugin, I’m new to Android. My main apps seem to work fine on Android except for this.

What SDK would you recommend?

On Thu, 29 Apr 2021 at 18:11, Morten Boye Mortensen < @.***> wrote:

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829439984 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA25FQQWFB3L3VCMKBISNJTTLGHMDANCNFSM432IDQUA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829468665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA25FQWFHHZHZNW6JIJL2YTTLGMOVANCNFSM432IDQUA .

mortenboye commented 3 years ago

Thanks. i’ll look into it.

On 29 Apr 2021, at 21.09, systemcode @.***> wrote:

 Fresh clone from GitHub into fresh folder.

Tried SDK 28 and 29

iOS emulator and real device and MacOS ok.

Run without any changes using IntelliJ as well as flutter run.

Fails on both: Pixel device emulator. No app previously installed. New Android tablet. V10

On Thu, 29 Apr 2021 at 18:54, Morten Boye Mortensen < @.***> wrote:

Just to confirm. Is it also a fresh install on the device? Meaning, the old (if any) example app has been deleted before the new one gets installed.

I haven’t seen this issue myself, but will look into it.

On 29 Apr 2021, at 19.35, systemcode @.***> wrote:

 Clean clone into a new folder.

I’ve tried both SDK 28 and 29.

TBH Although I’ve released iOS apps with your plugin, I’m new to Android. My main apps seem to work fine on Android except for this.

What SDK would you recommend?

On Thu, 29 Apr 2021 at 18:11, Morten Boye Mortensen < @.***> wrote:

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829439984 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA25FQQWFB3L3VCMKBISNJTTLGHMDANCNFSM432IDQUA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829468665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA25FQWFHHZHZNW6JIJL2YTTLGMOVANCNFSM432IDQUA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

systemcode commented 3 years ago

Thanks.

If there’s anything you want me to try then let me know.

On Thu, 29 Apr 2021 at 20:33, Morten Boye Mortensen < @.***> wrote:

Thanks. i’ll look into it.

On 29 Apr 2021, at 21.09, systemcode @.***> wrote:

 Fresh clone from GitHub into fresh folder.

Tried SDK 28 and 29

iOS emulator and real device and MacOS ok.

Run without any changes using IntelliJ as well as flutter run.

Fails on both: Pixel device emulator. No app previously installed. New Android tablet. V10

On Thu, 29 Apr 2021 at 18:54, Morten Boye Mortensen < @.***> wrote:

Just to confirm. Is it also a fresh install on the device? Meaning, the old (if any) example app has been deleted before the new one gets installed.

I haven’t seen this issue myself, but will look into it.

On 29 Apr 2021, at 19.35, systemcode @.***> wrote:

 Clean clone into a new folder.

I’ve tried both SDK 28 and 29.

TBH Although I’ve released iOS apps with your plugin, I’m new to Android. My main apps seem to work fine on Android except for this.

What SDK would you recommend?

On Thu, 29 Apr 2021 at 18:11, Morten Boye Mortensen < @.***> wrote:

Are you testing a clean app install or did you update an older version of the example app?

Targeting SDK 29 and higher requires fine location permissions, which is a change from previously only needing coarse location.

The error you show mentions showRationaleForPermission, so my guess is it’s related to the change in location permissions from earlier.

On 29 Apr 2021, at 18.31, systemcode @.***> wrote:

 I have tried the example v 0.3.7 on iOS and MACOS and it works fine.

It fails to show any devices on Android. The app screen is empty with no devices listed. Using SDK 28 and 29 on android 10 on a real device and emulator.

D/FlutterMIDICommand( 8881): tryToInitBT D/FlutterMIDICommand( 8881): Show rationale for Location D/FlutterMIDICommand( 8881): devices @.*** D/FlutterMIDICommand( 8881): list [] I/flutter ( 8881): Error showRationaleForPermission

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829439984

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AA25FQQWFB3L3VCMKBISNJTTLGHMDANCNFSM432IDQUA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829468665 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA25FQWFHHZHZNW6JIJL2YTTLGMOVANCNFSM432IDQUA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/32#issuecomment-829530119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA25FQVP7PVZWZIJHHAR35TTLGYARANCNFSM432IDQUA .

systemcode commented 3 years ago

I deleted and reinstalled allowing location perms. Still no list of devices displayed.

D/FlutterMIDICommand(18097): tryToInitBT D/FlutterMIDICommand(18097): Already permitted D/FlutterMIDICommand(18097): Start BLE Scan D/BluetoothAdapter(18097): isLeEnabled(): ON D/BluetoothLeScanner(18097): onScannerRegistered() - status=0 scannerId=6 mScannerId=0 D/FlutterMIDICommand(18097): FlutterStreamHandler onListen D/FlutterMIDICommand(18097): devices [Landroid.media.midi.MidiDeviceInfo;@4668262 D/FlutterMIDICommand(18097): list []

systemcode commented 3 years ago

Ok - The reason there is no list of devices is that Network Session is not displayed as it is with ios and macos. I connected a cable to a USB Midi device and all is good. I tend to use Network Session with iOS emulators and macos routed through to a MIDI port when in development on MAC.

slightly related issue - on emulator, there is no BT so an exception occurs which is is handled internally but I've got a tidyup fix which I'll PR.

So is Network Session a deliberate omission?

mortenboye commented 3 years ago

To my knowledge Network Sessions is an Apple term for MIDI over TCP or RTP-MIDI and only Apple implements it as standard.

On 30 Apr 2021, at 12.59, systemcode @.***> wrote:

 Ok - The reason there is no list of devices is that Network Session is not displayed as it is with ios and macos. I connected a cable to a USB Midi device and all is good. I tend to use Network Session with iOS emulators and macos routed through to a MIDI port when in development on MAC.

slightly related issue - on emulator, there is no BT so an exception occurs which is is handled internally but I've got a tidyup fix which I'll PR.

So is Network Session a deliberate omission?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

systemcode commented 3 years ago

Sorry for the bother.