Home > Article > Backend Development > javascript - Android connects to an existing php service, how to execute it?
Hello everyone,
I have recently started practicing writing programs.
I want to make an Android program to execute an existing network service.
That network service probably requires logging in with a user account and password, and you can enter it by clicking Press Execute to print the report and print out to pdf or excel.
How would you seniors complete this program?
Grateful
Hello everyone,
I have recently started practicing writing programs.
I want to make an Android program to execute an existing network service.
That network service probably requires logging in with a user account and password, and you can enter it by clicking Press Execute to print the report and print out to pdf or excel.
How would you seniors complete this program?
Grateful
If this php service is a web page and does not have any special functions, you can directly use a WebView
to load the web page.
Or just roughly follow the steps below:
Clear the functions, and then determine the API provided by the server
Writing Android interface and business, network connection can use frameworks such as OkHttp, Retrofit, AndroidAsyncHttp.
Get the web page source code directly and use jsoup to parse it. If the web page data is obtained dynamically using js, then just grab the api called by js.
Just use webview. If you don’t mind it, just embed a browser