How to control photon using an Android/Java app

I’m trying to figure out how to go about this. I’m building with intent to sell a training device for which Particle Photon is the core that controls everything. Idea was to use an Android app but I’m trying to figure out how this communication will look like.

I see that there are two SDKs enabled but neither really allows control of GPIO pins. Do I understand this correctly as that I would need to write the functions that interact with GPIO in the Web IDE for Particle devices, flash the device with this code.

But how do I then invoke these methods using Android/Java app. Also before I sell the hardware how do I flash the code onto the device without claiming it to my account ? Honestly in the end I was hoping that end user would not know anything about Particle if this is possible.

So:

  • How do I prepare device for end user without claiming the device ?
  • How do I communicate between my android app and the device ?
  • Can I interact with GPIO using Java/Kotlin ?