मैं वर्तमान में Google प्लस पर काम कर रहा हूँ लॉग-इन मेरे एप्लिकेशन में सुविधा।Plus.PeopleApi.getCurrentPerson रिटर्न अशक्त
मैं नीचे
Plus.PlusOptions options = new Plus.PlusOptions.Builder()
.addActivityTypes("http://schemas.google.com/AddActivity")
.build();
myGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
// .addApi(Plus.API, Plus.PlusOptions.builder().build())
.addApi(Plus.API, options)
.addScope(Plus.SCOPE_PLUS_LOGIN)
.addScope(Plus.SCOPE_PLUS_PROFILE).build();
तरह GoogleApiClient बिल्डर और onConnected विधि बनाया
@Override
public void onConnected(Bundle arg0) {
// TODO Auto-generated method stub
plusUtilities.ShowToast("Login successful");
updateGPbutton();
// hide progress DiaLog
plusUtilities.DissmissPD();
// it has deprecated
// plusUtilities.ShowToast("Login to Google+ with " +
// mPlusClient.getAccountName().toString());
// upgraded class
plusUtilities.ShowToast("Login to Google+ with "
+ Plus.AccountApi.getAccountName(myGoogleApiClient).toString());
// deprecated
// mPlusClient.loadPeople(this, "me");
Plus.PeopleApi.load(myGoogleApiClient, "me");
// plusUtilities.ShowPD("Fetching user data... ");
// upgraded and call fetch_user_details method here instead of calling
// in onPersonLoad() override method
Log.d("Googleplusclient",
"" + Plus.PeopleApi.getCurrentPerson(myGoogleApiClient));
Plus.PeopleApi.loadVisible(myGoogleApiClient, null).setResultCallback(this);
if (Plus.PeopleApi.getCurrentPerson(myGoogleApiClient) != null) {
Person currentPerson = Plus.PeopleApi
.getCurrentPerson(myGoogleApiClient);
fetch_User_Details(currentPerson);
}
}
नीचे दी गई विधि रिटर्न अशक्त
Plus.PeopleApi.getCurrentPerson (myGoogleApiClient)
मैं the link के बाद का पालन किया आर समाधान। फिर मैंने इस developer link का भी पालन किया। जब तक मुझे शून्य मान नहीं मिल रहा है।
यह कैसे हल करने के लिए?
क्या आप customkey.keystore SHA1 हस्ताक्षर मतलब है! ? – tranquil
@tranquil - यह आपकी रिहाई .keystore, जो उपयोग अपने रिहाई/आवेदन के बाजार संस्करण पर हस्ताक्षर करने के लिए उपयोग करना चाहिए मतलब है –