My android app was able to generate text files with key value pairs. Now, I want to upload those data to an online MySQL Database.
My Idea is, my App will communicate with a PHP file and so this PHP file will parse the text file and then insert it to MySQL database.
My question is, how will android upload and communicate with the PHP file? Any codes and other ideas out there?
You use these classes.
For examples on how to use them, SO is full of related question. Just search for “android http request”.
Two things, first don’t use a text file, just send the key value pairs in a HTTP post request, second remember to do all http requests asynchronously, you can use for example AsyncTask to do this.