I am working on a project and was wondering if it possible to communicate between both devices through the otg. The idea the app on the phone will send a command through the otg and the pi will have a listener and respond to the command. Would this be set up as if I were trying to communicate with a computer over com and serial ports? Or is it simply not possible? I have seen people tether to use the phone as a keyboard but that is not quite what I want. Any ideas?
The Raspberry Pi only has USB host ports, and Android has a client port that can also be used like a host port through OTG. Therefore the Pi can't be connected to the Android when the Android is an OTG host, as the Pi cannot be used as a client. The Android could be connected to the Pi as a client, but this doesn't involve OTG, just normal USB operation. Hope this is clearer than my previous answer.
It depends which way round you want it. The Pi's **micro*USB is power only, so you can't use the Pi as an OTG host. The two USB ports work fine, so any OTG stuff you'd do from android and receive from the Pi. The latter would be perfectly possible, I don't know what you'd use on the Pi and android.