Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:58:02+00:00 2026-06-01T13:58:02+00:00

I send the text file to multiple devices using the following code, ContentValues values

  • 0

I send the text file to multiple devices using the following code,

ContentValues values = new ContentValues(); 
String filePath1   =Environment.getExternalStorageDirectory().toString()+"/filename.txt";
values.put(BluetoothShare.URI, Uri.fromFile(newFile(filePath1)).toString()); 
values.put(BluetoothShare.DESTINATION,itDevices.getAddress());               values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND); 
Long ts = System.currentTimeMillis(); 
values.put(BluetoothShare.TIMESTAMP, ts); 
Uri contentUri = getContentResolver().insert(BluetoothShare.CONTENT_URI, values);

I want the same type of code for sending a message. By using the Bluetooth API application when i try to send the message to multiple devices first i connect to a device and send message to that device and again disconnect and connect to another device and send message to another device in this way this goes.

Is it possible to send a message to multiple devices one by one without disconnect the communication ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:58:04+00:00Added an answer on June 1, 2026 at 1:58 pm

    Yes, I believe it is possible to exchange messages with multiple Android Bluetoooth devices simultaneously – without disconnecting and reconnecting.

    Leaving the Android API aside for starters, Bluetooth definitely allows you to connect to and communicate with multiple devices simultaneously. All Bluetooth connections happen in piconets which include a master and up to 7 slaves. A device can be part of more then one piconet but this is inefficient (the timing of the two piconets isn’t coordinated) and can be unreliable, so if you want to connect to multiple other devices you must make sure you are the master.

    I’ve done this sort of thing with BlueZ (the Bluetooth stack on most Linux and Android devices including AOSP) so I can verify that it is fairly straight-forward and works reliably.

    However, I’ve only done one-to-one connections on Android, so I can’t say for sure how you control the master-slave assignment there. Android provides much less power and control compared to regular Linux, and it provides no way to directly read or change the master slave role assignment.

    In theory, you should be able to control the roles based on the rule that which-ever side initiates the connection will be the master, but I would want to do some testing to see what else might be going on. My concern comes mainly from the possibility that one of the client devices (that you expect to be a slave) might already have a connection to e.g. a headset or keyboard, so when it receives the incoming connection request it might request to switch to master role so it can add your server to its piconet.

    What I would suggest is, when you are testing, get access to hcitool on one of your devices (e.g. a Linux box or a rooted Android) and do ‘hcitool con’ and it will give you a list of the current connections and I think this includes the role. (hcitool is a standard tool on Linux and is included in AOSP.) I guess you could also just use the empirical approach: if you are able to create a bunch of simultaneous connections that work reliably then it doesn’t matter much how it works – just make sure you test situations where some of the devices have existing connections to other devices.

    Sorry about going on, but I think this is a good question and would be interested to hear from people who have done this on Android. I think I’ve heard of multi-player Bluetooth games for Android – I wonder if those work reliably.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a server / client environment, I need to send a plain text file
I have a text file that I want to send over the network, this
i have an iphone 3g and can successfully send text messages using the PHP
how to send rich text message in system.net.mail need code for send a mail
I've been trying to use MFMailComposer to send a text file with encrypted data
I'm using the code from this link to send attachments in the email notifications
All,In my requirement need to send a mail with attached text file, which is
I'm using the EmailMultiAlternatives class to send text and html mails with django. While
I am using Access to send text to Word via bookmarks. I have bookmarks
I am able to select multiple options that I send from my .jsp file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.