Skip to content Skip to sidebar Skip to footer

Google Cloud Message Sandbox

I followed the tutorial to implement push notifications on my Android App (Google Cloud Message). I managed to successfully implement these messages but now I'm concerned about dev

Solution 1:

You can use the dry_run field :

dry_run

If included, allows developers to test their request without actually sending a message. Optional. The default value is false, and must be a JSON boolean.

If it doesn't work you can try the restricted_package_name field with an invalid package name. I haven't tried it, but it might behave the way you want.

restricted_package_name

A string containing the package name of your application. When set, messages will only be sent to registration IDs that match the package name. Optional.

The quotes were taken from the GCM Architectural Overview.

Solution 2:

You can do this by creating a new API Project.

  • From the Google Developer Console create a new sandbox API project
  • Create a new public API access key for server applications
  • Server sandbox environments push using the public API access key for server applications from the sandbox API project
  • Android debug builds use the project ID from the sandbox API project

Post a Comment for "Google Cloud Message Sandbox"