You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we will use this code in fragment
googlePlusClient = new GooglePlusClient(this);
will call public GooglePlusClient(Fragment fragment) {
and after this will be call public GooglePlusClient(Activity activity) {
as conclusion init method will call twice and will be crashed with
java.lang.IllegalStateException: Already managing a GoogleApiClient with id 0
we can fix this crash if change googlePlusClient = new GooglePlusClient(this); to googlePlusClient = new GooglePlusClient(getActivity); (only activity constructor will be call) , but method onActivityResult call in activity class, not in fragment.
The text was updated successfully, but these errors were encountered:
If we will use this code in fragment
googlePlusClient = new GooglePlusClient(this);
will call public GooglePlusClient(Fragment fragment) {
and after this will be call public GooglePlusClient(Activity activity) {
as conclusion init method will call twice and will be crashed with
java.lang.IllegalStateException: Already managing a GoogleApiClient with id 0
we can fix this crash if change googlePlusClient = new GooglePlusClient(this); to googlePlusClient = new GooglePlusClient(getActivity); (only activity constructor will be call) , but method onActivityResult call in activity class, not in fragment.
The text was updated successfully, but these errors were encountered: