根据这个:
请注意,Google可能会定期刷新注册ID,因此您应该设计> Android应用程序,并了解可能会多次调用> com.google.android.c2dm.intent.REGISTRATION意图。
我正在使用新的GCM(Google Play服务),所以我想为此目的使用广播接收器:
<receiver
android:name="com.example.gcmclient.RegistrationHandler"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
</intent-filter>
</receiver>
我会使用此广播接收器来检测Registration_ID是否已更改并将其发送到我的服务器。我可以这样做,还是我错了?