Search code examples
android-c2dm

C2DM question on fitness of purpose


I want to be able to push messages out to certain customers who have a particular postcode. Is this possible with C2DM or is it a case of only pushing to everyone who has the application?.


Solution

  • It is not possible to determine the postcode of a device via C2DM. But you might use the localization feature of Android and use this information to find the postcode.

    Edit: Or just ask the user to enter his postcode ;)

    Thus, your application needs to register at your server it could also submit the location information (in another step), and you could save it in your database along the device id.

    Then you could send a message to all users that are in a specific area.