I am doing simple google login and logout using API. but when i logout using below code, sometimes googleapiclient not disconnect. and because of that when i am going for login, it will automatic login to my previous account rather that asking for select account.
Code for logout:
public void googlePlusLogout() {
if (mGoogleApiClient.isConnected()) {
Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
mGoogleApiClient.disconnect();
Log.e("APPLICATION", "DISCONNECTED");
}
when i call above method for logout, sometimes mGoogleApiClient.disconnect()
not called. help me with this problem.