title: Android launch Twitter intent
body: <p>I used below code for launching Twitter through intent but it's not working. I have twitter app installed on my phone.</p>
  
  <pre><code>Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
  shareIntent.setType("text/plain");
  shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Content to share");
  PackageManager pm = contexto.getPackageManager();
  List&lt;ResolveInfo&gt; activityList = pm.queryIntentActivities(shareIntent, 0);
  for (final ResolveInfo app : activityList) {
      if ("com.twitter.android.PostActivity".equals(app.activityInfo.name)) {
          final ActivityInfo activity = app.activityInfo;
          final ComponentName name = new ComponentName(activity.applicationInfo.packageName, activity.name);
          shareIntent.addCategory(Intent.CATEGORY_LAUNCHER);
          shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
          shareIntent.setComponent(name);
          contexto.startActivity(shareIntent);
          break;
      }
  }
  </code></pre>
  
  <p>Getting exception when I try to calling the activity:</p>
  
  <blockquote>
    <p>android.content.ActivityNotFoundException: Unable to find explicit
    activity class {com.twitter.android/com.twitter.android.PostActivity};
    have you declared this activity in your AndroidManifest.xml?</p>
  </blockquote>