0

iPhone 4 has a mic on bottom-left, iPhone 3GS and earlier had a mic on bottom-right.

How can I detect where is the mic on iPhone? What function does that?

kolinko
  • 1,633
  • 1
  • 14
  • 31
  • I think there could be possibility to check if device has front camera. So the algorithm will be simple..if front camera available then mic on bottom-left else bottom-right – Vanya Nov 15 '10 at 11:26

2 Answers2

2

You will have to detect the specific model of device (e.g. "iPhone2,1", etc.) and do a table look-up from information you determine. And to future-proof the result, you may also have to have it look up the position of the mic from your web site, where you can keep a table updated with device types as Apple introduces new ones.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • thanks for the answer - I could only approve one of them, but your is also correct, so upvote :) – kolinko Nov 17 '10 at 08:20
1

I would not use the method as said in the comment to your post. The minute the new iPad or iPod Touch is released with a front facing camera, your application is off.

Why not just use a method like in this post: Determine device (iPhone, iPod Touch) with iPhone SDK

The code (if you scroll a bit down) shows how to detect which version of iPod/iPhone/etc is running on.

Community
  • 1
  • 1
Wim Haanstra
  • 5,918
  • 5
  • 41
  • 57
  • Plus Vanya's method breaks already with the latest iPod touch which has a front camera and a microphone on the back. – Mr. Berna Nov 15 '10 at 13:39