I want to start with a new project for Android and therefore I need a centralized database. As it is very easy to decompile java and get the database connection. For my project I need read/write access.
My idea was to create an API with php and query the websites from Android.
The problem I see it, that if someone knows the url of the API he can modify the database...
So my question is, how I can protect my php based API from unauthorized access?