@Override
 protected void onGcmRegistrationComplete() {
   super.onGcmRegistrationComplete();
   tryRefresh();
 }
 @Override
 protected void onGcmRefresh() {
   super.onGcmRefresh();
   forceRefresh();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.details);

    // Retrieve the SwipeRefreshLayout and ListView instances
    mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swiperefresh_detail);
    // Set the color scheme of the SwipeRefreshLayout by providing 4 color resource ids
    mSwipeRefreshLayout.setColorSchemeResources(
        R.color.swipe_color_1, R.color.swipe_color_2,
        R.color.swipe_color_3, R.color.swipe_color_4);

    mHeaderImageView = (ImageView) findViewById(R.id.imageview_header);
    mHeaderTitle = (TextView) findViewById(R.id.textview_title);
    mButtonPlus = (ImageButton) findViewById(R.id.imageButton_plus);
    mButtonMinus = (ImageButton) findViewById(R.id.imageButton_minus);
    mTextViewIntroduction = (TextView) findViewById(R.id.textview_introduction);
    mButtonCallPhone = (ImageButton) findViewById(R.id.imageButton_callPhone);

    mButtonPlus.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            attend();
          }
        });

    mButtonMinus.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            leave();
          }
        });

    mButtonCallPhone.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            callOthersPhone();
          }
        });

    mSwipeRefreshLayout.setOnRefreshListener(
        new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
            Log.i(LOG_TAG, "Start swipe refresh");
            initiateRefresh();
          }
        });

    // BEGIN_INCLUDE(detail_set_view_name)
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      /**
       * Set the name of the view's which will be transition to, using the static values above. This
       * could be done in the layout XML, but exposing it via static variables allows easy querying
       * from other Activities
       */
      ViewCompat.setTransitionName(mHeaderImageView, VIEW_NAME_HEADER_IMAGE);
      ViewCompat.setTransitionName(mHeaderTitle, VIEW_NAME_HEADER_TITLE);
    }
    // END_INCLUDE(detail_set_view_name)

    // Show item data
    refreshByIntentItemId(savedInstanceState);
  }