I am currently working on an simple app which parses data with JSON from a remote server. Server side, there is a php script which connects to the database and selects the necessary data.
My question is how to save the php script. My approach was to create only one username and one password for authenticating from every app. The app user wouldn't know about the login procedure and the php script would be securely accessed.
There are some problems with this approach, because I can't store data (encrypted) in a database because the user can delete it. SharedPreferences
is also no option because I have to hardcode the credentials. And that is right now the point who I am: how about storing credentials hardcoded? Out of my gut feeling, i would say it is a bad idea. But how to handle this problem?