title: How to add google +1 button in android app
body: <p>I am having problem while implementing <code>Google +1</code> button in my android application.
  I followed instruction on this <a href="https://developers.google.com/+/mobile/android/recommend" rel="nofollow">link</a> and my activity is showing <code>g+</code> button successfully but after clicking on button, it is showing a progress bar on the button only, please tell me how +1 button works in android it should open a login internet or what? 
  I am not implementing signin with google just +1 button in my app. Hhere is my code, this is part of my code so it is not that proper.</p>
  
  <pre><code>public class as {
  
      private static final String URL = "www.app.in";
      private static final int PLUS_ONE_REQUEST_CODE = 10;
      private static final int REQUEST_CODE_RESOLVE_ERR = 9000;
  
      private ProgressDialog mConnectionProgressDialog;
      private PlusClient mPlusClient;
      private ConnectionResult mConnectionResult;
      private PlusOneButton mPlusOneButton;
  
      protected void onCreate(Bundle savedInstanceState) {
  
          setContentView(R.layout.product_details);
          setCurrentContext(this);
          super.onCreate(savedInstanceState);
  
          mPlusOneButton = (PlusOneButton) findViewById(R.id.googleplus);
          mPlusClient = new PlusClient.Builder(this, this, this).clearScopes()
                  .build();
      }
  
      @Override
      protected void onStart() {
  
          super.onStart();
          Log.d(TAG, "OnStart");
          mPlusClient.connect();
  
      }
  
      @Override
      protected void onStop() {
          super.onStop();
          Log.d(TAG, "onStop");
          mPlusClient.disconnect();
      }
  
      @Override
      public void onConnectionFailed(ConnectionResult result) {
          Log.d(TAG, "onConnectionFailed");
          if (mConnectionProgressDialog.isShowing()) {
              // The user clicked the sign-in button already. Start to resolve
              // connection errors. Wait until onConnected() to dismiss the
              // connection dialog.
              if (result.hasResolution()) {
                  try {
                      result.startResolutionForResult(this,
                              REQUEST_CODE_RESOLVE_ERR);
                  } catch (SendIntentException e) {
                      mPlusClient.connect();
                  }
              }
          }
          // Save the result and resolve the connection failure upon a user click.
          mConnectionResult = result;
      }
  
      @Override
      protected void onActivityResult(int requestCode, int responseCode,
              Intent intent) {
          Log.d(TAG, "onActivityResult");
          if (requestCode == REQUEST_CODE_RESOLVE_ERR
                  &amp;&amp; responseCode == RESULT_OK) {
              mConnectionResult = null;
              mPlusClient.connect();
          }
      }
  
      @Override
      public void onConnected(Bundle connectionHint) {
          // String accountName = mPlusClient.getAccountName();
          // Toast.makeText(this, accountName + " is connected.",
          // Toast.LENGTH_LONG)
          // .show();
          Log.d(TAG, "onConnected");
      }
  
      @Override
      public void onDisconnected() {
          Log.d(TAG, "disconnected");
      }
  }
  </code></pre>