title: Registration id is not generating for sending push notification using firebase
body: <pre><code>//Here is my code of FIREBASEINSTANCEIDSERVICE
  </code></pre>
  
  <p>//reg_id is not generating
  //without id i am not able to send notifications. app is running without any errors.
  //I am not getting why it is happening, i am beginner, that is why i m not getting. please resolve this.</p>
  
  <pre><code>package com.fication.noti.mynotification.service;
  
  import android.content.Intent;
  import android.content.SharedPreferences;
  import android.support.v4.content.LocalBroadcastManager;
  import android.util.Log;
  
  import com.fication.noti.mynotification.app.Config;
  import com.google.firebase.iid.FirebaseInstanceId;
  import com.google.firebase.iid.FirebaseInstanceIdService;
  
  /**
   * Created by lenovo on 05/11/2016.
   */
  public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService {
  
      private static final String TAG =           MyFirebaseInstanceIDService.class.getSimpleName();
  
      @Override
      public void onTokenRefresh() {
          super.onTokenRefresh();
          String refreshedToken = FirebaseInstanceId.getInstance().getToken();
        //  Log.d(TAG,"Refreshed token: " + refreshedToken);
  
          // Saving reg id to shared preferences
          storeRegIdInPref(refreshedToken);
  
          // sending reg id to your server
          sendRegistrationToServer(refreshedToken);
  
          // Notify UI that registration has completed, so the progress   indicator can be hidden.
          Intent registrationComplete = new  Intent(Config.REGISTRATION_COMPLETE);
          registrationComplete.putExtra("token", refreshedToken);
        LocalBroadcastManager.getInstance(this).sendBroadcast(registrationComplete);
      } 
  
      private void sendRegistrationToServer(final String token) {
          // sending gcm token to server
          Log.e(TAG, "sendRegistrationToServer: " + token);
      }
  
      private void storeRegIdInPref(String token) {
          SharedPreferences pref = getApplicationContext().getSharedPreferences(Config.SHARED_PREF, 0);
          SharedPreferences.Editor editor = pref.edit();
          editor.putString("regId", token);
          editor.commit();
      }
  }
  </code></pre>