MCQs > IT & Programming > Android Programming > What does A() function do? private void A() { B(getActivity(), 'com.app.package.here'); } public void B(Context context, String packageN) { Intent i = context.getPackageManager().getLaunchIntentForPackage(packageN); if (i == null) { i.addCategory(Intent.CATEGORY_LAUNCHER); context.startActivity(i); } else { try { context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse('http://play.google.com/store/apps/details?id=' + packageN))); } } }

Android Programming MCQs

What does A() function do? private void A() { B(getActivity(), "com.app.package.here"); } public void B(Context context, String packageN) { Intent i = context.getPackageManager().getLaunchIntentForPackage(packageN); if (i == null) { i.addCategory(Intent.CATEGORY_LAUNCHER); context.startActivity(i); } else { try { context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageN))); } catch (android.content.ActivityNotFoundException anfe) { context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + packageN))); } } }

Answer

Correct Answer: Launch other app named as “com.app.package.here”

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Android Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Android Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it