¿ÜºÎ ¾Û ½ÇÇà½ÃÅ°±â (launch external app in android) |
|
|
![](icon/private_name/1.gif) |
8³â Àü |
½ÇÇà½Ãų ¼ö ÀÖ´Â ¾Û Á¤º¸ ¾ò±â
final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
PackageManager pm = context.getPackageManager();
List<resolveinfo> installedApps = pm.queryIntentActivities(mainIntent, 0);
for (ResolveInfo ai : installedApps) {
Log.d("tag", ai.activityInfo.packageName);
}
½ÇÇà½Ãų ÆÐÅ°ÁöÀÇ ¾×Ƽºñ¸¦ ¾Ë °æ¿ì,
ComponentName compName = new ComponentName("com.package","com.package.activity");
Intent intent = newIntent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(compName);
startActivity(intent);
½ÇÇà½Ãų ÆÐÅ°Áö¸í¸¸ ¾Ë °æ¿ì,
Intent intent = context.getPackageManager().getLaunchIntentForPackage("ParkageName");
startActivity(intent);
|
|
̵̧ : 277 |
̵̧
¸ñ·Ï
|
|