Sending data from Android app to device

Looking for a way to press a button on an Android app that sends a message to a device to do something, preferably using Google Cloud Platform (“GCP”).

I followed this the GCP integration doc ( which explains how to set up the integration for the device to send data to GCP, but the integration page on my console shows this:


suggesting that I can send data from GCP to the Particle cloud, for which the event name will start with “/hook-response/server/”, so I can just program my device firmware to subscribe to that. But I can’t find anything about how to get GCP to send data to the Particle cloud in the first place. The data will originate from the Android app but it’s gotta go through GCP, right?


Hi Spencer, not necessarily.
The way suggested by Particle is that your app calls directly the cloud functions on the device.
Please refer to the cloud API here:

How do you declare a cloud function in the firmware?
Like this:

However, it could go via the GCP if you wanted, perhaps for a particular reason on your architecture.
I suggest you start by calling the functions directly via the cloud API, and then decide.


1 Like