gplay rtdn
gplay rtdn
Section titled “gplay rtdn”Real-Time Developer Notifications: setup, status, decode.
gplay rtdn <subcommand> [flags]gplay rtdn setup
Section titled “gplay rtdn setup”Create the Pub/Sub topic and grant Play publisher access.
gplay rtdn setup --project <id> [--topic <name>] [--dry-run]Create a Pub/Sub topic and grant Google Play’s system service account the Pub/Sub Publisher role so it can push notifications.
You still need to paste the topic name (projects/<id>/topics/<topic>) into the Play Console -> Monetization setup page afterwards. The topic name is printed at the end.
| Flag | Description | Default |
|---|---|---|
--dry-run |
Print gcloud commands without executing | false |
--output |
Output format: text (default), json | text |
--pretty |
Pretty-print JSON output | false |
--project |
GCP project ID (required) | `` |
--topic |
Pub/Sub topic name | play-rtdn |
gplay rtdn status
Section titled “gplay rtdn status”Show Pub/Sub topic configuration and Play publisher binding.
gplay rtdn status --project <id> [--topic <name>]| Flag | Description | Default |
|---|---|---|
--output |
Output format: text (default), json | text |
--pretty |
Pretty-print JSON output | false |
--project |
GCP project ID (required) | `` |
--topic |
Pub/Sub topic name | play-rtdn |
gplay rtdn decode
Section titled “gplay rtdn decode”Decode a Pub/Sub RTDN payload into a typed notification.
gplay rtdn decode --file <payload.json>Decode a Pub/Sub RTDN payload into a typed notification.
Accepts either a full Pub/Sub envelope (message.data is base64) or the raw inner JSON (packageName/subscriptionNotification/etc.).
Examples: gplay rtdn decode –file payload.json cat payload.json | gplay rtdn decode –file - gplay rtdn decode –data ‘{“message”:{“data”:“…”}}’
| Flag | Description | Default |
|---|---|---|
--data |
Inline payload JSON (overrides –file) | `` |
--file |
Path to payload JSON file (‘-’ for stdin) | `` |
--output |
Output format: json (default), table, markdown | json |
--pretty |
Pretty-print JSON output | true |