If you ever need to use Pure Data patches in Android combined with sensors, networking, and more you can use PHONK. There is an example where you just drop a patch inside and you can communicate with it using the typical send/receives
PHONK https://phonk.app/