views:

3622

answers:

4

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.

A: 

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.

Jasarien
A: 

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.

nvuono
Just to clarify: the 1st gen iPhone (2.5G) does not support Bluetooth peer-to-peer (due to the older Bluetooth chip), so GameKit's Bluetooth functionality won't work on it. And, of course, the 1st gen iPod touch doesn't have Bluetooth at all.
Elliot
A: 

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.

Dimitris
+2  A: 

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.

Nathan de Vries