Hi,
I have set up a project to use C2DM and am having trouble getting the
registration process working. I have the project debugging on the emulator so
I can run Wireshark on my development computer to see the packets. It appears
there is traffic between the emulator and Google's servers, but I can't tell
what is coming back (it's all in https).
I think I have the manifest set up correctly for the BroadcastReceiver although
I am not seeing anything come through (I have breakpoints in the
BroadcastReceiver).
I have the service configured:
<service android:name=".XXC2DMBroadcastReceiver" />
and the permissions and receiver:
<permission
android:name="xxx.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission
android:name="xxx.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Send the registration id to the server -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!--
Only C2DM servers can send messages for the app. If permission
is not
set - any other app can generate it
-->
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action
android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="xxx" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action
android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="xxx" />
</intent-filter>
</receiver>
<uses-sdk android:minSdkVersion="8" />
As an aside I have set up the account with Google for the service and have an
Auth key.
Does anyone have any tips as to what I might be able to do, to see where I
might be going wrong (or maybe can see what I've done wrong in the manifest)?
Regards,
Julius.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en