Adding a Google +1 button in Android App

前端 未结 4 1976
遇见更好的自我
遇见更好的自我 2020-12-02 18:37

I was just wondering if there was anyway to add a Google +1 button inside my Android app. I have seen a +1 on the Android Market so I would think there would be some way to

4条回答
  •  无人及你
    2020-12-02 19:27

    the accepted answer is outdated....

    XML :

    
    

    Activity :

    // The request code must be 0 or greater.
    
        private static final int PLUS_ONE_REQUEST_CODE = 0;
    
    protected void onResume() {
        super.onResume();
        // Refresh the state of the +1 button each time the activity receives focus.
        mPlusOneButton.initialize(URL, PLUS_ONE_REQUEST_CODE);
    }
    

    and even before that fallow this link :

    https://developers.google.com/+/mobile/android/getting-started

提交回复
热议问题