Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Plus One button shows wrong count in Android App(wrong count issue)

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 :

mPlusOneButton.initialize(APP_URL, PLUS_ONE_REQUEST_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.

like image 898
code8x Avatar asked Mar 02 '15 18:03

code8x


1 Answers

My best guesses are:

  1. There is a mistype on the APP_URL. Happens to everyone at some point
  2. 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

Cheers

like image 195
Hanny Udayana Avatar answered Sep 28 '22 02:09

Hanny Udayana