在Android中Java的,我怎么捉对蓝牙设备的呼叫按钮长preSS?蓝牙、按钮、我怎么、设备

2023-09-08 09:43:01 作者:步子大了゛难免扯到蛋蛋

我如何赶上(拦截)长的蓝牙设备呼叫按钮preSS(安卓)?

How do I catch (intercept) a long Bluetooth device call button press (android)?

推荐答案

您正在寻找的是 android.intent.action.VOICE_COMMAND ,它是一个活动的意图,没有一个接收器的意图。你需要在你的清单如下:

You're looking for is android.intent.action.VOICE_COMMAND, and it's an Activity intent, not a Receiver intent. You need the following in your manifest:

<activity android:name="LongPressActivity">
    <intent-filter>
        <action android:name="android.intent.action.VOICE_COMMAND"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
</activity>

问题出现,一旦你的活动开始。大多数的语音命令应用程序中使用的API是隐藏的,所以你必须通过跳跃燃烧的火圈来访问它们。无论是使用反射,或看到的本系列文章的。