Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test Post with java Android
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_login:
String token=gauth.getAccessToken();
if(token==null) doLogin();
else mPerformEdit.setDefaultText("Has Login, Token: "+token);
break;
case R.id.menu_settings:
if(gauth.getAccessToken()!=null){
doPost();
}
break;
}
return super.onOptionsItemSelected(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.