Android Google Plus SDK: ProgressBar never stops after clicking +1 button

I have applied the +1 button in my android app. Almost everything works fine:

  • I can login / log out
  • when i logged in, the +1 button says which is the number +1 and turns red / white according to the fact that i did or didn’t add +1 to my webpage.

BUT. When I click the +1 button, an activity bar (ProgressBar) appears on my +1 button (which turns white) and it never stops spinning! The undo / share / create +1 window never appears ...

Note that I have another action with a +1 button in my application and that the +1 button in this other action works fine ...

I do not understand what the problem is!

Idea?

Thank!

+1


source to share


2 answers


Found a solution: I had a listener like this on my PlusOneButton ...:

PlusOneButton on Android, how do I know if the user has clicked?

Very bad idea ... It is causing this error!



Don't use this listener! If anyone has a solution to put a listener without causing an error, let me know! I would like to track the number of clicks on this button ...

Also, make sure you are signed in (you must enable the login code).

0


source


try this.it has a bug where user cancels +1.



        mPlusButton.setOnPlusOneClickListener(new PlusOneButton.OnPlusOneClickListener() {
       @Override
       public void onPlusOneClick(Intent intent) {
         try {
            mConnectionResult.startResolutionForResult(HomeActivity.this, REQUEST_CODE_RESOLVE_ERR);
        } catch (SendIntentException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

       }
   });

      

0


source







All Articles