title: How to get Package name from activity name
body: <p>I use the code below to get the launcher activity name belongs to specific package name:</p>
  
  <pre><code>    Intent intent = new Intent();
      intent.setPackage(aPackageName);
      intent.setAction(Intent.ACTION_MAIN);
      intent.addCategory(Intent.CATEGORY_LAUNCHER);
      ResolveInfo result = getPackageManager().resolveActivity(intent, 0);
  </code></pre>
  
  <p>I save result.activityInfo.name to shared preference</p>
  
  <p>Later I want to start this activity, but how to get its package name?</p>
  
  <p>or, Is it possible to start this activity without knowing the package name it belongs to?</p>
  
  <pre><code>    Intent launchIntent =  
      getPackageManager().getLaunchIntentForPackage(How to get the package name);
  
      if(launchIntent != null){
          startActivity(launchIntent);
      }
  </code></pre>
  
  <p><strong>Knowing that the activity(s) name(s) that I save are not mine.</strong></p>