Java Code Examples for android.content.pm.ApplicationInfo#CATEGORY_IMAGE
The following examples show how to use
android.content.pm.ApplicationInfo#CATEGORY_IMAGE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppInfo.java From LaunchTime with GNU General Public License v3.0 | 4 votes |
private static String getCategoryFromPiCat(ApplicationInfo appinfo) { String cat = null; if (Build.VERSION.SDK_INT >= 26) { int category = appinfo.category; switch (category) { case ApplicationInfo.CATEGORY_AUDIO: cat = "AUDIO"; break; case ApplicationInfo.CATEGORY_GAME: cat = "GAME"; break; case ApplicationInfo.CATEGORY_IMAGE: cat = "IMAGE"; break; case ApplicationInfo.CATEGORY_MAPS: cat = "MAPS"; break; case ApplicationInfo.CATEGORY_NEWS: cat = "NEWS"; break; case ApplicationInfo.CATEGORY_PRODUCTIVITY: cat = "PRODUCTIVITY"; break; case ApplicationInfo.CATEGORY_SOCIAL: cat = "SOCIAL"; break; case ApplicationInfo.CATEGORY_VIDEO: cat = "VIDEO"; break; case ApplicationInfo.CATEGORY_UNDEFINED: cat = "UNDEFINED"; break; default: cat = null; break; } } else if ((appinfo.flags & ApplicationInfo.FLAG_IS_GAME) == ApplicationInfo.FLAG_IS_GAME) { cat = "GAMES"; } return cat; }
Example 2
Source File: Categories.java From LaunchTime with GNU General Public License v3.0 | 4 votes |
public static String getCategoryFromPiCat(ApplicationInfo appinfo) { if (appinfo==null) return null; String cat = null; if (Build.VERSION.SDK_INT >= 26) { int category = appinfo.category; switch (category) { case ApplicationInfo.CATEGORY_AUDIO: cat = CAT_MEDIA; break; case ApplicationInfo.CATEGORY_GAME: cat = CAT_GAMES; break; case ApplicationInfo.CATEGORY_IMAGE: cat = CAT_GRAPHICS; break; case ApplicationInfo.CATEGORY_MAPS: cat = CAT_INTERNET; break; case ApplicationInfo.CATEGORY_NEWS: cat = CAT_INTERNET; break; case ApplicationInfo.CATEGORY_PRODUCTIVITY: cat = CAT_Utilities; break; case ApplicationInfo.CATEGORY_SOCIAL: cat = CAT_TALK; break; case ApplicationInfo.CATEGORY_VIDEO: cat = CAT_GRAPHICS; break; case ApplicationInfo.CATEGORY_UNDEFINED: default: cat = null; break; } } else if ((appinfo.flags & ApplicationInfo.FLAG_IS_GAME) == ApplicationInfo.FLAG_IS_GAME) { cat = CAT_GAMES; } return cat; }