Is it possible to register and receive C2DM messages from the Android NDK in C++?
All the C2DM examples on Google’s site are from the Java SDK. I checked through the NDK docs and could find no mention of C2DM.
I am relatively certain there is no way to do this. Does anyone know differently?
Not entirely. The receiving end for C2DM needs to be implemented as a Java class that derives from BroadcastReceiver and is listed in the manifest. AFAIK, you cannot create a brand new Java class entirely in NDK – you need a Java file, even if it has nothing but
nativemethod declarations.From there, it’s a matter of overriding BroadcastReceiver methods – primarily
onReceive(). That you can do in NDK.And you won’t, most likely, find any examples.