@kvn_krishna You get the registration ids from your application running on the device. So you'll need to investigate the client side implementation as well as this server side code.
You'll need to setup some communication between your application and your server to send the registration ids to your server.
Here's a tutorial on using our native extensions to retrieve the registration id though not sure this will be applicable to you: http://distriqt.com/post/1627
You're probably best referring to the android developer documentation: http://developer.android.com/google/gcm/gs.html#android-app