扫描/识别 NFC 意图时防止发出警报音
也许我遗漏了一些东西,但是当我通过 Galaxy Nexus 扫描 NFC 标签时,手机总是发出默认的警报音。
有没有办法以编程方式关闭此功能?我已经搜索了菜单/首选项,但找不到执行此操作的方法。下一步...ICS源代码:-/
Perhaps I'm missing something but when I scan an NFC tag via a galaxy nexus, the phone always makes the default alert tone.
Is there a way of programmatically switching this off ? I have scoured the menus / preferences and can't find a way of doing this. The next step ... ICS source code :-/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以下是如何静音/更改 nfc 声音的简单示例
}
Here is a simple example of how to silence/change nfc sounds
}
没有办法以编程方式关闭此声音或覆盖 Touch to Beam UI。
There isn't a way to pro grammatically turn this sound off or to override the Touch to Beam UI.
使用 android-19,您可以:
如以下所述:
http://developer.android.com/reference/android/nfc/NfcAdapter .html#FLAG_READER_NO_PLATFORM_SOUNDS
通过使用 NfcAdapter.enableReaderMode() 和标志FLAG_READER_NO_PLATFORM_SOUNDS 而不是 NfcAdapter.enableForegroundDispatch()
with android-19 you can:
as described in:
http://developer.android.com/reference/android/nfc/NfcAdapter.html#FLAG_READER_NO_PLATFORM_SOUNDS
By using NfcAdapter.enableReaderMode() and the flag FLAG_READER_NO_PLATFORM_SOUNDS instead of NfcAdapter.enableForegroundDispatch()