BLE multiple connections - flutter

I am trying to create a mobile app using flutter that connects and reads/writes data from multiple Bluetooth low energy devices. I am a beginner in flutter and I have read that using BluetoothGatt you can achieve that but I haven't found any exhaustive documentation on the steps I should follow.

Flutter is a UI framework.
If the main purpose of your app involves BLE, controlling it from flutter would cause you a headache.
Build your app where all the BLE logic is on the native side, and use the Native bridge as an interface for sending/receiving data to/from the UI.
(You can build it as a plugin, but it's more advanced stuff)
You'll benefit a simple multiplatform unified UI, with all advantages of working natively and having full control over the hardware-related stuff.

Related

Multiple BLE Connections using Flutter

I am working on a cross-platform mobile app that will connect to 5 or more BLE devices simultaneously and send/receive data. These BLE devices are trackers that monitor objects movement and transmit data intermittently.
I have a few questions regarding this and I couldn't find any clear answers online:
Is flutter a good choice for this application considering BLE communication is the primary concern?
How many stable simultaneous connections are possible using flutter for both iOS and Android?
Sending/Receiving data from multiple BLE devices simultaneously (can be asynchronous) is achievable? Are there any existing issues in this?
Does flutter library automatically handle multiple connections and simultaneously send/receive data?
Any recommended libraries for this application?
Any example of cross-platform app that has multiple BLE connections and communication. (preferably flutter)
Thanks.
Both iOS and Android support multiple BLE connections. It all depends on the Bluetooth controller's maximum number of connections and if the phone manufacturer has added additional restrictions. 5 should definitely be supported on most phones.
All BLE stacks and libraries I've seen support send/receive for multiple devices out-of-the-box since you will get one object/handle per device or connection.
So to all your Bluetooth-specific questions I would answer "yes". Just note that once you reach the maximum number of connections, you might get different various errors or that it simply never connects to the next device, since this is not handled in a unified way, at least not on Android.
Now, Flutter itself is just a UI toolkit and has not really so much to do with the Bluetooth stack's stability and features. Since Flutter uses Dart as programming language you however have to write a bridge between native bluetooth code and Dart (or use an existing plugin someone else has already written). If this is a "good choice" is out of scope for Stack overflow since that is an opinion-based question. But there are a lot of people using Flutter for BLE apps...
Library recommendations are also out of scope for Stack Overflow.

Package Receiving heart rate data from a flutter smartwatch

I am looking for a package that can fit me in a flutter that will sync between smart watches like Samsung watch or Apple Watch. I want to get heart rate data from them. Anyone know of such a package or idea to communicate with the watch?
At present all of wear, tizen, and watch os have different mechanisms for obtaining this data natively, all of which would need a flutter MethodChannel mapping to expose to the flutter side. For wear you can use the wearable_communicator plugin for communicating via the data layer, but I’m not aware of any equivalent for the other two. Alternatively, you could publish this data from the watch to something like an MQTT broker and use an MQTT client on the flutter app to obtain the readings.

Measuring cellular strength in Ionic Framework

In the Ionic framework, is there a way to read the current cellular signal strength & other data (currently connected tower, band, etc..) via the Ionic APi?
Thanks!
Ionic is a frontend framework so no you can't read low level network related data via its API. Also if you are referring to ionic-native, thats only a wrapper around the APIs exposed by different cordova plugins to provide some convenience features such as autocomplete, promise-callbacks and change-detection out of the box.
What you can do is searching for a cordova-plugin which can deliver this kind of information (for example: cordova-plugin-signal-strength (Android only)). Another possibility is to create your own plugin and implement the native parts yourself.

Are real time cross-platform applications between html and android possible

I'm currently investigating the scope of my project and have come across an issue with regards to the platform on which it can operate. The initial goal is to create a cross platform game across html, andriod and ios.
Is this type of application possible? It is important to note that it would require real time(low latency and consistent) interaction between the three platforms.
If so what are some tools I should take advantage of while developing.
We are doing this exact sort of thing using the 3rd party asset within the Unity UI's:
https://www.assetstore.unity3d.com/en/#/content/10872
and custom Socket.IO (http://socket.io/) server implementation. Works like a champ and is totally agnostic wether the client is Unity3D or just a browser.

touchengine iPhone cocoa touch Google App Engine Communication framework: two-way communication

As far as I can understand the touchengine framework supports one-way communication and 'Future Features' section on the project page says that two-way communication is partially done (Creating new data or modifying data on the server from iPhone using plists) but I am unable to confirm status of the feature, i.e whether it's complete.
Can anyone please let me know whether the feature is complete and two-way communication is possible using the framework?
Or is there other iPhone framework for python Google App Engine application which supports two-way communication.