傍晚时分,我有一个安装有SOS按钮的Android设备(硬件)我正在设置它,以便它调用我纯粹作为概念验证创建的测试应用程序。在哪里添加@SdkConstant?
这是我一直在由制造商提供的信息
// Add for SOS/PTT Key Start
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_EXT_PTTDOWN = "com.TMZP.Main.PTTDown";
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_EXT_PTTUP = "com.TMZP.Main.PTTUp";
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_EXT_SOSDOWN = "com.TMZP.Main.SOSDown";
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_EXT_SOSUP = "com.TMZP.Main.SOSUp";
// Add for SOS/PTT Key End
Please NOTE:
Both the PTT up and PTT down intent are useful.
int ACTION_DOWN getAction() value: the key has been pressed down.
int ACTION_UP getAction() value: the key has been released.
的问题是,我不知道该怎么办与@SdkConstant,我从来没见过它并不能似乎找到任何解释。
目前我只是简单地将下面的意图过滤器添加到我的测试活动中,但按下硬件按钮不会产生任何结果。
<intent-filter>
<action android:name="com.TMZP.Main.SOSDown"/>
</intent-filter>
任何深入了解,我加入@SdkContant将是很有益(或者干脆指着我对一些阅读材料。)
在此先感谢。
你正在构建你自己的Android操作系统的副本?或者您是否在尝试使用Android SDK编写应用程序? – CommonsWare
我打算用Android SDK编写它。 – user2014175