Answer the question
In order to leave comments, you need to log in
How to link PHP and Android Studio?
Hello experts in your field!
I ask you to orient in training / judging with the construction of the application.
The task is this. I am making an app in Android Studio. You need to link a table from the MySQL database with one of the application activities - display a list of tools from the hosted database within one activity.
I couldn't find any proper instructions on the internet. I found a couple of lessons with approximately the same content (apparently brazenly torn from each other :)), which are complex and incomprehensible and redundant for a beginner (for example, I don’t want to learn how to write to the database yet, I just want to count).
I want to try to figure it out step by step on my own. So far, the logic is this:
1. Make a server script in php that reads the database and outputs everything to the body of the document
2. Take the data from PHP and put it inside the activity
Here, according to point 2, the main question arises :)
How can such data be transferred? I read about JSON , but is this technology suitable here? In which direction to dig? Will anyone share sane instructions (possible in English)? And the main global question is that I am constantly looking for information on Android Studio, if I study solutions in Java, will the studio eat it in its purest form?
Thank you for your attention.
Answer the question
In order to leave comments, you need to log in
Dig towards the REST API.
Multiple examples are on GitHub.
1. The REST API generates a JSON file from your database
2. The application parses the JSON file
3. Displays the JSON in the required fields
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question