I used official tutorial to add google plus one button to one of my android apps. But plus one button shows wrong count. Everything i did in the code is the same as with the tutorial. I used it before never got this stupid error.
Right now my app has been recommended 26 times so plus one button shoud show count as “26” but it shows “13”.
To include plus button in my layout i used :
<com.google.android.gms.plus.PlusOneButton android:id="@+id/plus_one_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/drawer_list_item_padding_left" plus:annotation="inline" plus:size="standard" android:layout_marginBottom="@dimen/drawer_textview_paddingtopbottom" android:layout_marginTop="@dimen/drawer_textview_paddingtopbottom" />
To assign button to a member variable i used :
mPlusOneButton = (PlusOneButton) findViewById(R.id.plus_one_button);
As suggested i initialized it in onResume method of my activity using below code :
here APP_URL is my app’s google play page url, PLUS_ONE_REQUEST_CODE is the activity request code i used it as 0.
Any suggestions? Thanks in advance.
in my case, after some days it showed correct g+ count itself. I didn’t make any changes in my code because i was sure my code is right according to documentation. Why i got that annoying delay? I don’t know, maybe it was related with google servers and updates.
My best guesses are:
- There is a mistype on the APP_URL. Happens to everyone at some point
- I don’t know if this is a factor or not. The app version number is different with the one on Google Play Store. So it returns the wrong +1 count