According to the docs
Google may periodically refresh the registration ID, so you should
design your Android application with the understanding that the
com.google.android.c2dm.intent.REGISTRATION
intent may be called
multiple times. Your Android application needs to be able to respond
accordingly.
Also Note:
The registration ID lasts until the Android application explicitly
unregisters itself, or until Google refreshes the registration ID for
your Android application.
So you need to update the registration ID on your server when you recieve the com.google.android.c2dm.intent.REGISTRATION
intent.
Also you can have a code in your launcher/main activity that checks whether you are registered on GCM as follows
String regid = getRegistrationId(context);
if (regid.length() == 0) {
registerBackground();
}