Ping gcm server and register the device.