如何将GCM ID存储在设备上

I'm developing a app for Android, and I need to get the GCM RegID stored on Device (the registration already completed) and send to my sql server. How I can get the Reg ID stored?

Tks

Call GCMRegistrar.getRegistrationId(this); from your Activity or other Context. If it returns the empty string, you do not have a registration ID. If it returns a non-empty string, that is the registration ID.

Note that this is also delivered to your GCMIntentService in its onRegistered() callback method.