title: Share Button using ShareActionProvider Not Responsive
body: <p>In my app I am trying to add a share button to do the same function as this one:
  <a href="http://postimg.org/image/pcpg9bdn7/" rel="nofollow">http://postimg.org/image/pcpg9bdn7/</a> (I need more rep to post images)</p>
  
  <p>I got the Share button to show up, but it does not respond when I click on it. I am using 4.4 API.
  Here is my button in XML in the menu layout file</p>
  
  <pre><code>&lt;item android:id="@+id/menu_item_share"
            android:actionProviderClass="android.widget.ShareActionProvider"
            android:title="Share"
            android:showAsAction="always"/&gt;
  </code></pre>
  
  <p>This works but I think it is the Java that is broken. Here is my OnCreateOptionsMenu:</p>
  
  <pre><code>   public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.action_bar_share_menu, menu);
          provider = (ShareActionProvider) menu.findItem(R.id.menu_item_share)
                  .getActionProvider();
          return true;
      }
  </code></pre>
  
  <p>Finally here is the code in onOptionsItemSelected:</p>
  
  <pre><code>case R.id.menu_item_share:
                  Intent intent = new Intent(Intent.ACTION_SEND);
                  intent.setType("text/plain");
                  intent.putExtra(Intent.EXTRA_TEXT, "This is a message for you");
                  provider.setShareIntent(intent);
                  break;
  </code></pre>
  
  <p>What am I doing wrong? Any help would be awesome!!!!</p>