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

  • SEARCH
  • Home
  • 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 3982892
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:34:56+00:00 2026-05-20T05:34:56+00:00

I can successfully connect through Bluetooth my Nexus One Android Phone to another Bluetooth

  • 0

I can successfully connect through Bluetooth my Nexus One Android Phone to another Bluetooth Android Phone. I can use the input and output streams for connection and write my requests and read their responses . My application uses real time data for processing. I was wondering is there any way to open two input/output streams on different sockets (sort of like dedicated sockets) for communication? And if yes how could i accomplish that ? Any pointers would be helpful …

mmSocket.connect();

public void connect ()
Since: API Level 5
Attempt to connect to a remote device.

This method will block until a connection is made or the connection fails. If this method returns without an exception then this socket is now connected.

Creating new connections to remote Bluetooth devices should not be attempted while device discovery is in progress. Device discovery is a heavyweight procedure on the Bluetooth adapter and will significantly slow a device connection. Use cancelDiscovery() to cancel an ongoing discovery. Discovery is not managed by the Activity, but is run as a system service, so an application should always call cancelDiscovery() even if it did not directly request a discovery, just to be sure.

Now my question is : How can i connect using two sockets … because the function above uses a socket to connect … And after a connection it disconnects any other attempt by another socket ????

  • 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-05-20T05:34:57+00:00Added an answer on May 20, 2026 at 5:34 am

    It is of course possible, but I am guessing you use blocking calls for the sockets, so you will need more than one thread to do useful work in real time. This also means you need a bit of synchronization between threads if they are to communicate.

    Your’e question is frankly a bit vague, so I don’t think you will get any good answers unless you qualify it a bit: what exactly do you want to do? Why do you need more than one socket? What is the second socket for?

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

Sidebar

Related Questions

I can successfully connect to MySQL from a DOS prompt, but when I try
Is it possible to connect to an SSH server through a Telnet connection? I
I can successfully include main jquery files in /Scripts, but if my custom test.js
Having integrated merb_auth_password_slice as per the README, I can successfully login as redirect_after_login is
Title says what i'm trying to do. I can successfully generate an assembly if
I have an HBITMAP containing alpha channel data. I can successfully render this using
Can iPhone applications compiled against 2.1 be successfully installed via iTunes on a 2.0
How can I set a parameter of a sub-report? I have successfully hooked myself
Can you cast a List<int> to List<string> somehow? I know I could loop through
I have successfully wired up a Facebook Connect application and everything is working fine.

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.