Is it possible to have the data from a Nordic UART Service (NUS) fed to multiple Apps (on the same Android device)?
Is it possible to have the data from a Nordic UART Service (NUS) fed to multiple Apps (on the same Android device)?
You are best asking this on an Android forum. Sounds a bit hairy and as Android is notoriously inconsistent between versions and handsets with BLE I don't know why you would want to do this. Have you considered pulling data in via one app and then using local storage to make it accessible by/or pushing it to the other apps?
Yes, probably. Any recommendations for a "good" one?
Reason to want it: there are various apps that can work with my BLE device. For testing, it could be convenient to have them all running on one Android device at the same time.
Hi, Yes, it's possible.
What you have to do is:
There is currently no other way on Android to obtain a list of connected devices (there is a method for that on iOS).
After you are done with the device you have to disconnect it from all apps to terminate the physical connection.
How to test it? You may use nRF Master Control Panel. In navigation menu select Configure GATT Server, select any configuration (can be the Sample one), go back, (make sure the 'Settings->Connectivity->Show incoming connection' option is set (default)), minimalize the nRF MCP app with a HOME button, or switch to your app (but don't close the MCP with a back button), connect to a device, start using it. Now, you may switch to nRF MCP and you'll see that it's connected. You may enable notifictions and you'll be getting the same data as your app.
On Android N you may have both apps open at the same time using multiwindow :) (there is a but on Android N and you have to specify the Write type manually before writing a characteristic).
Hope that helped, Aleksander