• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Bluetooth data to multiple Apps

JazzdroidOz

Lurker
Mar 20, 2017
3
1
Hi All,

New here. Just wondering if it's possible to receive data on my tablet and send that data to two different Apps at the same time. The data will be coming from a bluetooth scanner. I believe you need to program in on the BluetoothSocket area.

Is this possible? My tablet is a Samsung Galaxy Tab A.

Thanks
 
Bluetooth is a point to point communications protocol, not broadcast. So it involves establishing a dedicated communications channel between two devices.
What you could do is establish multiple communication channels to different devices, and write the same data to all devices.
I found this sample application which implements a Bluetooth chat service. It may be useful to you:

https://developer.android.com/samples/BluetoothChat/index.html
 
Upvote 0
I may have misunderstood what you want to do. You could implement a Bluetooth receiver, which handles the incoming data, and then passes this on to other applications. That's possible.

So it's possible. It already works with one active App, all I want to do is keep the scanned data in a text file for archiving. I've attached a diagram on how I would like it to happen.

I saw the sticky regarding familiarity with Java and other programming language and I am doing that. I hope I can work together with all of of you to figure this out.
 

Attachments

  • Screenshot_20170322-210929.png
    Screenshot_20170322-210929.png
    96.7 KB · Views: 130
Upvote 0
That's good stuff. A slight complication I can forsee is that each application has its own personal data area on internal storage, which is private to each app. So sharing your data that way won't be possible.
This leaves a couple of possibilities to share this data between your apps:-

1. Write data to external storage (SD card) if possible
2. Communicate the data between running apps

But obviously option 2 requires both apps to be running at the same time.
Does your device have an SD card?
 
Upvote 0
Thanks LV. I'll probably need to provide more details to give more context.

The main App used is an ordering system connected to the store intranet. You scan the barcode then either place an order or move on to the next product(barcode). Each supplier has a list of products that is supposed to be in store and the way the representatives check this is manually checking their list of products. It becomes a problem though when you need to check more than 150 products in store.

Now the idea is while the representatives are scanning to order, all scanned barcodes are written either to a text file, spreadsheet or another App for range checking. I know the easiest way is to scan the barcodes into a spreadsheet and either do a list comparison. However, representatives are only allowed a certain amount of time per store visit, the need to double check their orders becomes difficult. The collected barcode data can be used to check against the list so the representatives know what they're checked in their last visit, then they can check the products they missed on the next visit.

This is the reason for this and I know it will benefit both the representatives and the visited store. Thanks for your patience.
 
Last edited:
  • Like
Reactions: sweetndreemy73
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones