java - Android Google +1 Button Issues -


i have implemented google+ 1 button outlined here https://developers.google.com/+/mobile/android/recommend.

however clicking +1 button not increment counter , sharing shares empty post. have no idea why happening, have tried various solutions.

here's code implementing button:

private static final int plus_one_request_code = 0;  //in oncreate(): mplusonebutton = (plusonebutton) findviewbyid(r.id.plus_one_button);      @override     protected void onresume() {         super.onresume();         // refresh state of +1 button each time activity receives focus.         mplusonebutton.initialize(url, plus_one_request_code);     } 

here's xml button:

<com.google.android.gms.plus.plusonebutton         xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus"         android:id="@+id/plus_one_button"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_margin="5dp"         plus:size="standard"         plus:annotation="inline" /> 

reason of issue was

android:launchmode="singleinstance" 

in manifest current activity.

could please share code maybe can help.

in case change code

android:launchmode="singletask" 

regards


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -