I am trying to build a project based on IoT. My goal is to trigger relays connected to GPIO pins in rpi4 by using an android application running in rpi4 itself which can be accessed with an official touchscreen. The same android app will run remotely in mobile. Overall, I will be able to trigger the relays using the touchscreen interface running android os in pi4 but also I can use the same application from my mobile to trigger them over the internet. And once the changes made in the rpi or in the mobile the trigger state will reflect dynamically on the other device as well, mobile or rpi.
I looked over the internet but there was no proper guidelines, I will be really grateful if anyone helps me with it or point me to specific direction on how to get started. Being a complete newbie its really difficult to pull this project off myself.
If there is any query please comment below.