Question

A simple question. Is it possible to use bluetooth in iPhone to transfer file to other mobile phone such as Nokia or Blackberry. I tested iPhone bluetooth function today. I found it's possible to detect other phone in discovery mode. But the iPhone is not detected in other devices.

Was it helpful?

Solution

The iPhone does not support the GOEP/FTP bluetooth profiles required to send/receive files between devices made by different manufacturers. If you only need to share files between iPhones, you can use the GameKit framework from the iPhone SDK.

OTHER TIPS

From what was shown at WWDC, the file transfer might be limited to inter-iphone transfers. And even then, the types of files you can send are limited, I believe. For example, you might only be able to send document files (word, excel), contacts, pictures and non-DRM media files.

However, I couldn't find any documentation in the 3.0 SDK that says anything about bluetooth file transfer, so take this with a pinch of salt.

Hope that helps.

I would also be wary about the particular version of the iPhone that you are targeting.

I found out with my upgrade yesterday that the original iPhone 2G doesn't support A2DP stereo bluetooth audio so I can bet you might run into other problems with any bluetooth operations besides your basic mono headsets.

The GameKit Framework of the iPhone SDK provides a way to detect and exchange data only with other iPhones. So you can't communicate with Nokias and Blackberries.

Now if you want to send data to other iPhones, I don't think there is a limit to the kind of data you can send. Because to send data you can use:

NSData* myData = [[NSData alloc] initWithBytes:&<yourData> length:sizeof(<yourData>)];
[session sendDataToAllPeers:myData withDataMode:GKSendDataReliable error:nil];

The NSData object can be anything you want obviously because it's just bytes. The only problem could be a limit to the length of that object, imposed by GameKit, but you probably bypass that by splitting your data into chunks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top