I have setup the Android part for C2DM, and here's a part of the code:
private void handleRegistration(Context context, Intent intent) {
// (...)
else if (registration != null) {
Log.d("c2dm", registration);
Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();
editor.putString(REGISTRATION_KEY, registration);
editor.commit();
// Send the registration ID to the 3rd party site that is sending
// the messages.
// This should be done in a separate thread.
// When done, remember that all registration is done.
}
}
So it says to send the registration ID to my server. What should I do with it, and how can I send messages in php?
Code examples would be great, as I'm not very experienced with PHP. I've seen this answer, but that uses sessions, which I'm not using.