Transfer Data Between iOS and Android via Bluetooth

Data communication between Android and iOS over Bluetooth

After spending some time on Bluetooth And BLE Following are my observations:-

In BLE:

Data can be transferred Max of 185 in write without response characterstics, But for write characterstics it can go upto 512. when calculate the speed of the connection in BLE

Throughput = (1000ms) * (no. of packet for time interval) * (Data per packet) / (connection Interal in ms)

which comes close to 193kbps for (183 byte packet as 3 byte is header), But practically I got upto 72kbps.

For Classic bluetooth:

There is no framework available from apple but you can enroll to apple's MFI program and use External accessory framework for connection.

Transfer data between iOS and Android via Bluetooth?

This question has been asked many times on this site and the definitive answer is: NO, you can't connect an Android phone to an iPhone over Bluetooth, and YES Apple has restrictions that prevent this.

Some possible alternatives:

  1. Bonjour over WiFi, as you mentioned. However, I couldn't find a comprehensive tutorial for it.
  2. Some internet based sync service, like Dropbox, Google Drive, Amazon S3. These usually have libraries for several platforms.
  3. Direct TCP/IP communication over sockets. (How to write a small (socket) server in iOS)
  4. Bluetooth Low Energy will be possible once the issues on the Android side are solved (Communicating between iOS and Android with Bluetooth LE)

Coolest alternative: use the Bump API. It has iOS and Android support and really easy to integrate. For small payloads this can be the most convenient solution.

Details on why you can't connect an arbitrary device to the iPhone. iOS allows only some bluetooth profiles to be used without the Made For iPhone (MFi) certification (HPF, A2DP, MAP...). The Serial Port Profile that you would require to implement the communication is bound to MFi membership. Membership to this program provides you to the MFi authentication module that has to be added to your hardware and takes care of authenticating the device towards the iPhone. Android phones don't have this module, so even though the physical connection may be possible to build up, the authentication step will fail. iPhone to iPhone communication is possible as both ends are able to authenticate themselves.

How to connect iOS and Android devices and send small data between them?

You'll need to use Bluetooth 4.0, aka Bluetooth Low Energy, or BTLE, or BLE. On iOS this has been supported since iOS 6 and doesn't require any special approval (i.e. Apple's MFI program doesn't apply). I have no idea about availability on Android (I assume it's available in at least some cases, depending on the version of Android and the capabilities of the Android device).

BTLE is designed around the idea of one device being a "central" node that can communicate with multiple "peripheral" nodes. You would need to work out how your app will chose modes to communicate.

Apple provides the Core Bluetooth framework to support BTLE. There's extensive documentation of the framework. Apple also provides a sample project that demonstrates how to use both the central and peripheral modes. On the iOS side, once the devices discover each other, you can read/write NSData blobs that can contain whatever bytes you need.

BTLE is an open protocol, so it should work on both platforms, but I can't provide any Android info.

How to transfer data between two device (android,iphone)?

While p2p is possible in some cases, you will achieve the most widespread compatibility with a client-server architecture, at the cost of having to deploy, power, connect, and maintain servers.

  • You will be able to use both wifi access points and mobile (3g, etc) networks
  • You have a ready place in the system to measure (or restrict) usage and/or insert ads
  • You don't have to worry about firewalls blocking inbound connections to the devices (common on wifi, almost always the case on mobile)
  • Relative locations of the devices are irrelevant
  • You can interoperate not only with smartphones and tablets, but with traditional PCs and laptops

Can iOS detect and pair to an Android devices over bluetooth?

This is not possible. WiFi connection may be your best bet.

See here:

Transfer data between iOS and Android via Bluetooth?



Related Topics



Leave a reply



Submit