Google plus integration: unable to load visible circles

I want to get information about people from google plus in my application: friends profile profile URL, visible name and identifier.

Here's the official google plus integrating tutorial . I am doing a test application in this tutorial and got caught in the error trap:

Error requesting visible circles: Status{statusCode=NETWORK_ERROR, resolution=null} 

Google Api Client Implementation:

 mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Plus.API, null) .addScope(Plus.SCOPE_PLUS_PROFILE) .addScope(Plus.SCOPE_PLUS_LOGIN) .build(); 

Here onResult:

 @Override public void onResult(People.LoadPeopleResult loadPeopleResult) { if (loadPeopleResult.getStatus().getStatusCode() == CommonStatusCodes.SUCCESS) { PersonBuffer personBuffer = loadPeopleResult.getPersonBuffer(); try { int count = personBuffer.getCount(); for (int i = 0; i < count; i++) { Log.d("TEST", "Display name: " + personBuffer.get(i).getDisplayName()); } } finally { personBuffer.close(); } } else { Log.e("TEST", "Error requesting visible circles: " + loadPeopleResult.getStatus()); } } 

And permissions on AndroidManifest.xml:

 <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> 

Please help me, what should I do?

+5
source share
1 answer

I fixed it! My problem: I do not have the correct package specification: for example com.example , but the correct path is com.example.moduledir

+1
source

Source: https://habr.com/ru/post/985894/


All Articles