I an using account picker and getting credentials using scopes of google drive when i getting drive services when i call method for retrieving access token gives me this error but strange is till tomorrow app is working fine and now getting me Need permission exception.I found some solution from internet and update google play services but its not affected till this exception come.
public void getCal()
{
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Log.d("Enter","Thread Working");
AuthToken=credential.getToken();
Log.e("AuthToken", credential.getToken());
Log.e("App ", "Info");
events = client.events().list("primary").setPageToken(null).execute();
Log.e("Calendar", events.toString());
new ReadJSONFeedTask().execute("http://my.org/my_Web_Services/add_user.php?username="+accountName);
}catch(UserRecoverableAuthIOException e){
Log.d("USERRECOVERABLE EXCEPTION","ERROR3");
startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);
}
catch(Exception e)
{
Log.d("USERRECOVERABLE EXCEPTION","ERROR4");
Log.e("Exception", "Network");
e.printStackTrace();
}
}
});
t.start();
}
Error Happened at error 4 log info.please help i stuck my work from 3 days.Thanks