Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Created August 24, 2012 17:09
Show Gist options
  • Save benigumocom/3452990 to your computer and use it in GitHub Desktop.
Save benigumocom/3452990 to your computer and use it in GitHub Desktop.
登録・解除を確認するのでそれらのメニューを有効化する1
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
/*
* Typically, an application registers automatically, so options
* below are disabled. Uncomment them if you want to manually
* register or unregister the device (you will also need to
* uncomment the equivalent options on options_menu.xml).
*/
// 以下2つのcaseをコメントインする。
case R.id.options_register:
GCMRegistrar.register(this, SENDER_ID);
return true;
case R.id.options_unregister:
GCMRegistrar.unregister(this);
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment