AnDevCon: Android C2DM
I am scheduled to give a talk titled "Mastering C2DM - the Android Cloud to Device Messaging Framework" at AnDevCon San Francisco conference on March 9th, 2011, so I thought it would make sense to post some of my content online.
- Presentation Slides on Android C2DM
- Yamba (C2DM) Android Application (C2DM Client, source) (400.78 KB)
- Yamba (C2DM) Android Application (C2DM Client, APK) (328.86 KB)
- C2dm Plugin for Status.net (C2DM app-server) (15.10 KB)
If you ever need help testing out an app somehow let me know.
I have downloaded the application from the link mentioned above. When I executed the application in my Android Emulator, I am able to only refresh the data to see the messages in the "http://yamba.marakana.com/gdc2dmyamba", but I dont see any popup (push popup) on my emulator when a message is posted in the link: http://yamba.marakana.com/gdc2dmyamba
Please help me.
We are currently experiencing some issues on the server-side of yamba.marakana.com, which is preventing us from talking to Google's C2DM cloud.
Once we move this to a new server, we should be back in business again.
That said, you should still be able to run this code yourself on your own status.net appliance.
thx for the tutorials..
so where can i find tutorials on how to set up the app server to handle c2dm...
ohh by the way can zend server or wamp be used..
Check out documentation on the plugins on http://status.net
It would take some effort to port to Zend.
I'm trying to shake things a little, and my app has this main activity instead of an application class as such.
The thing is that i am trying to lunch a service from one of the activities to star the c2dm registratios process by doing this:
Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGISTER");
registrationIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
The services is already declared in the manifest file like this:
<service android:name=".RegService" android:exported="false">
<action android:name="com.wizard3d.discovernrv.REGISTER" />
If I comment the lines that try to start the service my app does not crash... and when it crash it shows the following:
Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1647
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1663
ActivityThread.access$1500(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 117
ActivityThread$H.handleMessage(Message) line: 931
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 130
ActivityThread.main(String) line: 3683
Method.invokeNative(Object, Object, Class, Class, Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 507
ZygoteInit$MethodAndArgsCaller.run() line: 839
ZygoteInit.main(String) line: 597
NativeStart.main(String) line: not available [native method]
Any help would be appreciated! Thanks in advance!