3

Some days ago I saw a interesting device for iphone, square, here: https://squareup.com/

you can plug it into iphone's earphone socket, and it can transfer data to iphone. A running App on iphone can receive it.

does any one know how it implemented? I guess it can encode data to audio stream and "sing" it, and App on phone can record the sound and decode it. but how to? is there a protocol or SDK?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user718538
  • 31
  • 1

1 Answers1

1

The implemention is likely to be no different to that of a simple acoustic modem. The relevant APIs include Audio Units (low-level) or Audio Queue Services (higher level).

Matt Gallagher has written an excellent (as always!) post on creating an iOS tone generator, which is one way of enabling what you are after.

Aidan Steele
  • 10,999
  • 6
  • 38
  • 59