Home assistans commnds and android studio

Hello, Im a beginner in the open source developing. never dealed with phyton and Home Assistant.
I would like to start with some android app(written in Java).
Once I Set up the HA server and connecting the component(xiaomi bulb), how do I send a command to the HA system from the android studio (written in java) .
Note- outside the network
Thanks

You need to tie into the websockets or the REST API for your HA instance.

Here are a couple of android projects that might help get you started