title: Google Cloud message register when lost connection then the app crash
body: <p>I am using GCM plugin for Unity. I register it with dynamic senderIDs. But if i lost connection while registering, the app crashes. </p>
  
  <p>The error log is :</p>
  
  <pre><code>W/System.err( 4993): java.lang.IllegalStateException: sender id not set on constructor
  W/System.err( 4993):    at com.google.android.gcm.GCMBaseIntentService.getSenderIds(GCMBaseIntentService.java:125)
  W/System.err( 4993):    at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:237)
  W/System.err( 4993):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
  W/System.err( 4993):    at android.os.Handler.dispatchMessage(Handler.java:102)
  W/System.err( 4993):    at android.os.Looper.loop(Looper.java:145)
  W/System.err( 4993):    at android.os.HandlerThread.run(HandlerThread.java:61)
  E/AndroidRuntime( 4993): FATAL EXCEPTION: IntentService[GCMIntentService-DynamicSenderIds-2]
  E/AndroidRuntime( 4993): Process: ba.lum.tribalrivals.arabic, PID: 4993
  E/AndroidRuntime( 4993): java.lang.Error: FATAL EXCEPTION [IntentService[GCMIntentService-DynamicSenderIds-2]]
  E/AndroidRuntime( 4993): Unity version     : 4.6.7f1
  E/AndroidRuntime( 4993): Device model      : samsung SM-N910C
  E/AndroidRuntime( 4993): Device fingerprint: samsung/treltexx/trelte:5.0.1/LRX22C/N910CXXU1BOE1:user/release-keys
  E/AndroidRuntime( 4993): 
  E/AndroidRuntime( 4993): Caused by: java.lang.IllegalStateException: sender id not set on constructor
  E/AndroidRuntime( 4993):    at com.google.android.gcm.GCMBaseIntentService.getSenderIds(GCMBaseIntentService.java:125)
  E/AndroidRuntime( 4993):    at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:237)
  E/AndroidRuntime( 4993):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
  E/AndroidRuntime( 4993):    at android.os.Handler.dispatchMessage(Handler.java:102)
  E/AndroidRuntime( 4993):    at android.os.Looper.loop(Looper.java:145)
  E/AndroidRuntime( 4993):    at android.os.HandlerThread.run(HandlerThread.java:61)
  </code></pre>
  
  <p>I found out that the reason is from this code inside gcm.jar (plugin library):</p>
  
  <pre><code>protected String[] getSenderIds(Context context)
    {
      if (this.mSenderIds == null) {
        throw new IllegalStateException("sender id not set on constructor");
      }
      return this.mSenderIds;
    }
  </code></pre>
  
  <p>Can anyone know how to fix this problem ? Should i change the code inside plugin ? And how do i do that ?</p>