We have an android app that currently sends data to a php script which writes to a mysql DB on the same server. We are thinking of using a scalable remote DB e.g. amazon RDS.
The question is how does our android app write to these remote DBs? Do they have some kind of rest API, or do we have to send the data to the same php script on our server but use that to post to the remote mysql DB?
Thanks
It depends entirely on the remote database. Sift through their developer docs to find out what you need to do to work with them.
You can most likely do either option you mentioned (interact directly through your Android app or use a PHP script on your server as a man-in-the-middle).
Personally, I would go for a man-in-the-middle PHP script on your server that acts as an API, because it allows you to change remote DBs without changing/repackaging your Android app.