Read the full article from here: https://medium.com/analytics-vidhya/how-to-make-client-android-application-with-flask-for-server-side-8b1d5c55446e.
An Android app with a Flask server backend. This open-source project provides a seamless integration of Flask web framework in the server-side and Android app development in the client-side. By following the steps below, you can quickly get started with building your own Android-Flask web app.
Open your terminal and execute the following command:
$ pip3 install Flask
Start developing your Flask web app by leveraging the extensive capabilities of the Flask framework. With its simplicity and flexibility, Flask allows you to build robust and scalable web applications effortlessly. Note: you will find the python code inside the src folder.
Configure your development environment by installing the necessary tools and libraries. Ensure that you have Android Studio properly set up for Android app development.
Leverage the power of OkHttp/Retrofit library and the versatility of Java/Kotlin to develop a feature-rich Android app. Utilize the Android Studio IDE to streamline your development process and create stunning user interfaces.
Don't forget to add the following line to your Android manifest file to enable sending clear text to the server: xml
<application
android:usesCleartextTraffic="true"
...
>
...
</application>
When running the Android app on an emulator, you can access the Flask server using the default localhost IP:
http://10.0.2.2:PortNumber/
This allows the emulator to connect to the Flask server running on your local machine.
Feel free to explore and contribute to this project. Let's build amazing mobile/web apps together!
This project is licensed under the MIT License.