I am not sure why your registration ID changes every 30 minutes. Perhaps if you post your registration code, I can tell. Regardless of this problem, your server should be able to handle multiple registrations for the same device. When you send the registration identifier to your server, send it another unique identifier created by your application or your server, and this will allow you to identify when you will receive a new registration identifier for an existing device, in which case you will replace the old registration identifier with new.
Another thing you have to do on the server is to handle the case where the gcm server returns the canonical registration identifier, in which case you must replace the identifier that you used to send the canonical message.
source share