Is com.google.android.c2dm.intent.RECEIVE still in use?
Yes, com.google.android.c2dm.intent.RECEIVE
is still in use. It is used when receiving a broadcast from GCM server that contains a GCM message. Even though C2DM is long deprecated, GCM still uses some names that contain c2dm
.
As you can see in this manifest sample (taken from the GCM guide), there are multiple places that still use names containing c2dm
or C2D
:
<manifest package="com.example.gcm" ...>
...
<permission android:name="com.example.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
<application ...>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.gcm" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
</application>
As for the Receiver declaration
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.gcm" />
</intent-filter>
</receiver>
Google suggested to replace BroadcastReceiver with the com.google.android.gms.gcm.GcmReceiver, just like below.
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.gcm" />
</intent-filter>
</receiver>
the com.google.android.c2dm.intent.RECEIVE
is also used by the firebase cloud messaging