please help me i'm surfing on this topic and still going to this new gcm
my last project using gcm push at this link
XT **: //www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
but now the last GCM (C2DM) is deprecated, so we no longer use the GCMRegistrar
here, take a look at this h ** p: //developer.android.com/google/gcm/c2dm.html there is a claim "Android Cloud to Device Messaging (C2DM) is out of date. C2DM service will continue to be supported in the short term, but C2DM is not will accept new users and will not provide new quotas "
I use this link to study the concept
and for example, I use: https://code.google.com/p/gcm/source/browse/#git
I think I have completed all the necessary steps.
I link to my project on google play service lib
I also changed my sender id to my google project number
I also got RegID from GCM
but the problem is that whenever I click the submit button
he never shows me anything
from the google documentation example, he says that he should echo back to my device, but he never performs
i checked the documentation in the concept it says gcmbroadcastreceiver will receive any GCM message clicked on my device,
so I tried to enter "OnReceive" in this broadcaster, but it never shows anything
I also tried implementing the HTTP GCM Server using this documentation http://developer.android.com/google/gcm/http.html
I get an answer like this {"Multicast_id": 6256370624066466203, "success": 1, "failure": 0, "canonical_ids": 0, "Results": [{"message_id": "0: 1378114688323559% eab45603f9fd7ecd"}]}
but my magazine never shows anything
here is my translator
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Log.v("HAHA BANGET","masuk ke broadcastReceiver");
and here is my intenservice
public class GcmIntentService extends IntentService { public static final int NOTIFICATION_ID = 1; private NotificationManager mNotificationManager; NotificationCompat.Builder builder; public GcmIntentService() { super("7134XXXXX"); } public static final String TAG = "HAHA"; @Override protected void onHandleIntent(Intent intent) { Log.v(TAG,"MASUK INTENT NIH"); Bundle extras = intent.getExtras(); GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
and here is my manifest
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <permission android:name="com.coba.pushgcmbaru.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="com.coba.pushgcmbaru.permission.C2D_MESSAGE" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <receiver android:name="com.coba.pushgcmbaru.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.coba.pushgcmbaru" /> </intent-filter> </receiver> <service android:name="com.coba.pushgcmbaru.GcmIntentService" /> <activity android:name="com.coba.pushgcmbaru.PushBaruLagi" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
I am using 2.2 FROYO
and I updated my Google Play services to the newest.
so guys if anyone can help me, thanks a lot :)