r/FlutterDev • • Jan 26 '21

Discussion Push for first class bluetooth support.

I have been working with the flutter_blue library, and it is in shambles. I think for something like bluetooth, flutter should be giving first class support. If you agree....upvote.

https://github.com/flutter/flutter/issues/74752

111 Upvotes

28 comments sorted by

48

u/demarcoPaul Jan 27 '21 edited Jan 27 '21

FlutterBlue creator here. I wish I had more time to maintain the plugin, but it just doesn’t put food on the table and other projects take priority. I’m hoping to circle back and merge some of the wonderful PR’s the community has submitted, but I can’t offer any timelines. With the combination of native library bugs, improper peripheral setup, device irregularities and general questions, the GitHub has been overrun with issues and needs a serious triage session.

It’s been a goal of the library to keep as thin a layer as possible over the platform libs.

I hope that whatever flutter official decides moving forward; it will be focused on performance, battery optimization, and a clean API.

4

u/scorr204 Jan 27 '21

Thanks for your work! You can always turn on the sponsor button on the repo. Also if you decide you can not maintain it, make sure to update the repo with a notice pointing to one of the active bluetooth libs. Or potentially see if you can hand off to a new maintainer.

15

u/moralesnery Jan 27 '21

Thank you for your hard work

5

u/fender21 Jan 27 '21

Flutter Blue is at the heart of my project, I appreciate every you do with this library.

25

u/xvagr Jan 26 '21

I use flutter_reactive_ble. It works well and is very well maintained.

4

u/TheFr0sk Jan 26 '21

This one is developed by Philips right? I might try it. I use flutter ble lib and it works ok most of the time, but I'm having some troubles with exceptions not being thrown and stopping my entire process. Both of them seem to use the Polidea adapter on Android, but this one looks like it's better on the error handling... Might be just what I need.

3

u/[deleted] Jan 27 '21

You’re not the only one. Support for Bluetooth especially on Android has been quite a mess. I still have nightmares programming BLE years ago.

10

u/[deleted] Jan 26 '21

Unfortunately bluetooth is pretty broken on Android itself, so making a good working lib on top of a broken system is pretty complicated

2

u/flagellant Jan 26 '21 edited Aug 09 '24

outgoing automatic saw reply deserve scale alleged encourage fuzzy disagreeable

This post was mass deleted and anonymized with Redact

4

u/scorr204 Jan 26 '21

Ouch. If this is the case....flutter is in dire straits.

2

u/jwknows Jan 26 '21

Yes same with video player. There is no caching functionality wich is an absolute essential feature for apps that play multiple videos. There was a PR that fixed it for almost 2 years which ended up being rejected.

1

u/JulianV98 Jan 28 '21

If your app is Android only, my plugin might help you: https://pub.dev/packages/flutter_background.

I was in a similar situation and this was the quickest solution I could come up with, but I might look into only running the networking in the background. However, iOS is very difficult to handle (background audio processes might be the only solution) and I'm not an iOS developer/have any Apple devices atm.

1

u/jwknows Jan 28 '21

Sorry but what does this has to do with video caching?

1

u/JulianV98 Jan 28 '21

How did my post end up here!? I intended to answer to another comment about background tasks :) Sorry

1

u/jwknows Jan 29 '21

I see, no problem :)

5

u/HugoVS Jan 26 '21

Agreed. Had to work with flutter_blue recently for the first time, it was not great.

9

u/autognome Jan 26 '21

Hire a developer (or the maintainer?) to make flutter_blue better. There is only so much the Flutter team can work on simultaneously. In our case we are looking for background tasks to be more mature. I would personally like to see a website "flutter-mobile-swot" which had a list of common mobile functionality that Flutter does well and things it does not do terribly well. This would be more beneficial for the community. I'm not talking about something like uservoice or voting up github issues. A proper "domain specific" website that explained what features Flutter is strong/weak at. If this exists - please let me know.

1

u/[deleted] Jan 26 '21

Yeah I would love background tasks to be easier. I really have no idea how to do them at the moment and I would love to write an app that runs a web server.

2

u/JulianV98 Jan 28 '21

If your app is Android only, my plugin might help you: https://pub.dev/packages/flutter_background.

I was in a similar situation and this was the quickest solution I could come up with, but I might look into only running the networking in the background. However, iOS is very difficult to handle (background audio processes might be the only solution) and I'm not an iOS developer/have any Apple devices atm.

1

u/[deleted] Jan 28 '21

Wow that looks really useful, I'll try it out!

My only question is that it seems to keep the entire app running? Is that allowed on Android? It's been a while since I did any Java background service stuff but I vaguely recall that you have to put all of the service code in some Service class that maybe runs in another process (it was never really clear - typical Java overcomplication).

What happens if the user swipes away the app?

I'll probably use it anyway even if it's not perfect actually since I only want it for a private app for my dad.

1

u/supertrampsookah Jan 26 '21

Definitely would be in like with IoT goals! I am upvoting

1

u/Estugrul Feb 04 '21

Support FlutterBlue Development https://discord.gg/Yw4Y7Ceb8f

1

u/Estugrul Feb 06 '21

Inspired by the "Push for first class bluetooth support" post, yesterday I posted an initiative (naive as it was) to SUPPORT FLUTTER_BLUE DEVELOPMENT on reddit, in the FlutterDev workspace (or whatever it's called).

A moderator deleted the post. He said I was soliciting donations. That was his interpretation.

You can see the same post here https://discord.gg/Yw4Y7Ceb8f .

I say we have free speech problems in reddit.

0

u/[deleted] Jan 26 '21

[deleted]

6

u/MediocreLedger Jan 26 '21

In our current project we actually switched from flutter_blue to flutter_ble and I am very happy so far.

1

u/Swaqfaq Mar 02 '21

How did you get past the random exceptions thrown from the ble manager? I get BLE Error 2 or something like that fairly regularly.

1

u/MyNameIsIgglePiggle Jan 27 '21

I did a fairly extensive project that required communicating with multiple ble devices at the same time for both iOS and Android.

Damn it was hard, but I had also done the same in React native and flutter wasn't any worse.

Yes it's frustrating, yes it sucks, quote accordingly.

But the flutter ble lib is what I used in the end as well.