获取所有的acvivity
作者:
望月成三人 | 来源:发表于
2019-01-14 13:40 被阅读5次/**
* Get target package activities.
* @param context context
* @return activities
*/
public ActivityInfo[] getAllActivities(Context context){
try {
PackageManager pm = context.getPackageManager();
PackageInfo info = pm.getPackageInfo(context.getPackageName(), PackageManager.GET_ACTIVITIES);
return info.activities;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return null;
}
本文标题:获取所有的acvivity
本文链接:https://www.haomeiwen.com/subject/azbddqtx.html
网友评论