I try to create an application that can start other applications (f.e. Gmail or Facebook or any installed one).
I tried to use the following code:
PackageManager pm = MainActivity.this.getPackageManager();
try
{
Intent it = pm.getLaunchIntentForPackage("FULLY QUALIFIED NAME");
if (null != it)
MainActivity.this.startActivity(it);
}
catch (ActivityNotFoundException e)
{ }
However, it requires the fully qualified name of the applications.
How can I acquire it? Is there any build in method to get them?