The application prepared by me is using GCM to get push notifications from the server.
The emulator is getting the push notification but my device is not getting the push notification when I install the same app on the device.
I have provided the SENDER_ID and API Key to the server. The registration Id and device id is sent through the code.
I am fetching the device id using this code :
TelephonyManager telephonyManager1 =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
device_id = telephonyManager1.getDeviceId();
I am stuck with the problem since last 2 days, but not able to solve it till now. Any help is highly appreciated.
The issue was solved as the problem was from the server side.
In GCM we do not need to provide the device id. But just the sender id, registration id and api key are needed.