5

We created an external iOS notification light that uses the device’s audio for power. When you get a phone call on iPhone and the light is plugged in, you still get the ringtone but when you pick up, the audio is rerouted to the headphones (the iPhone thinks our light/device is a headphones set) and the user has to extract myLED for at least 2mm to get the audio from the front receiver of the phone.

We have been exploring alternative solutions to this challange - recently we made a prototype with a particular jack shape so that it could be rotated by the user when getting a call to "reroute" the audio to the iPhone speaker/mic. Although it may sound a clever option, this hardware solution is far from being neat - this leads to having positions where the myLED does not work/ it is not reliable, plus other complications.

I know of the existence of kAudioSessionOverrideAudioRoute_Speaker however I suspect that this will only direct the app audio to the rear speaker (the “loud” one) and not to the front receiver (because the “receiver” for the iphone is the headphones set if they are detected).

What would you suggest? Super appreciated!

4

1 回答 1

4

我认为你处境艰难:

  1. Apple 极不可能发布覆盖电话音频路由的选项。作为电话的一项关键功能,它们倾向于将呼叫方面保持在锁定和密钥状态。

  2. 耳机插孔(可能 - 大多数人都是这样做的)使用接地与一个或两个扬声器或遥控器之间的阻抗来确定插头是否插入。除了断开电路之外,没有好的方法来模拟这个。

我认为您拥有的唯一选择是:

  1. 要求用户在来电时移除设备。

  2. 在插孔上提供一个微控制器来驱动晶体管;该晶体管可以通过电子方式断开电路,以提供与未插入插孔相同的阻抗特征。

我不知道如何、何时以及是否可以向千斤顶提供电话正在进行的信息:是否有一个 API 可以用于“来电但尚未接听的电话”?你是否必须做一个看门狗来确保与你的应用程序的通信?您可以改用扩展坞连接器吗?我认为这些确实是您的选择。不是一个完整的答案,但这些是我的想法。

于 2013-01-09T00:00:25.210 回答