开发者

how to dynamically load the app list in android

Let's say, there are four apps in the system: app1, app2, app3, app4.

Be default, when the system is up, all apps will be shown in the home screen. Now if we provide a customized log in screen, user开发者_Go百科 A log in, then for this user, he can only see (and use ) app1 and app2.

Then A log out, user B log in, he can only see app3 and app4.

Does API provide such capability to load the app list dynamically?

Hope someone can help, thanks.


I think the answer depends on how you build your logging system. But, in theory,the basisc around applications list in Android system would be something like that :

Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
List pkgAppsList = mContext.getPackageManager().queryIntentActivities(intent, 0);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜