【问题标题】:How to add my app to long press on home button? [duplicate]如何将我的应用程序添加到长按主页按钮? [复制]
【发布时间】:2013-09-26 12:50:42
【问题描述】:
当我在我的 Android 设备上长按 主页按钮 时会发生这种情况。
可以看到,除了 Google Now,还有另外两个应用……
我需要将我自己的应用程序添加到此菜单中,但我无法在任何地方找到如何对其进行编码。
我在 StackOverflow 上找到的答案,例如 this one 说,这是不可能的,我必须是 root 等。但是,我的手机没有 root 并且这两个其他应用程序能够做到。怎么样?
我会用啤酒和黄金支付:)
【问题讨论】:
标签:
android
long-press
android-homebutton
【解决方案1】:
在我向主要活动添加标签之前,我的应用也不会出现在最近的应用列表中。
<activity
android:name=".MainActivity"
android:label="@string/app_name_short" > <!-- this attribute can't be empty -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>