sga*_*man 5 android intentfilter android-activity
在 android Activity 中,有没有办法以编程方式列出它已注册的内容?
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
我正在尝试确定当前活动是否为 LAUNCHER。
dld*_*dnh -1
我认为包管理器会告诉你你在寻找什么。
http://developer.android.com/reference/android/content/pm/PackageManager.html
public abstract ActivityInfo getActivityInfo (ComponentName component, int flags)
Run Code Online (Sandbox Code Playgroud)
其中标志可能包含
GET_INTENT_FILTERS
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2403 次 |
| 最近记录: |