I have made an application where the user is required to sign into their google account before they can access my app. However I don't know how the user can log out of their Google account from within my app. Could anyone point me in the right direction. Thanks
My Code is as fallows for logging into my app Using Google
public class Menu extends AppCompatActivity {
private MobileServiceClient mClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
try {
mClient = new MobileServiceClient(
"https://craigsapp.azure-mobile.net/",
"BTkcgnFQvevAdmmRteHCmhHPzdGydq84",
this
);
} catch (MalformedURLException e) {
e.printStackTrace();
}
authenticate();
}
private void authenticate() {
mClient.login(MobileServiceAuthenticationProvider.Google, new UserAuthenticationCallback() {
@Override
public void onCompleted(MobileServiceUser user, Exception exception, ServiceFilterResponse response) {
if (exception == null) {
Log.w("TodoActivity", "Logged in");
} else {
Log.e("TodoActivity", "They aren't logged in");
}
}
});
}
}