📱 Build a Kotlin Android App with Flask REST API – Full Integration Guide
Looking to connect a Python Flask backend with a Kotlin Android mobile app? In this blog, we’ll build a full-stack mini project where a Flask API serves TODO items and a Kotlin Jetpack Compose app consumes it using Retrofit. This is perfect for developers, students, or content creators looking to showcase mobile-backend integration.
5/1/20251 min read


My post content
🔧 What We’ll Build
We’ll create:
A Flask-based REST API that handles TODO tasks (GET, POST, DELETE)
A Kotlin Android App with Jetpack Compose UI
Integration using Retrofit for networkingWrite your text here...
🧩 Technologies Used
Backend: Python 3.10, Flask
Frontend: Kotlin, Jetpack Compose, Retrofit
Tools: Android Studio, Postman (for testing), Emulator/Device
🚀 Part 1: Build the Flask REST API
Step 1: Set Up Project Folder
Step 2: Install Flask & Setup API
Create requirements.txt:
Then create app.py:
Create todos.json:
Step 3: Run the Flask Server
🤖 Part 2: Build the Kotlin Android App
Step 1: Create a New Project in Android Studio
Select Empty Compose Activity
Name: TodoFlaskApp
Language: Kotlin
Minimum SDK: API 21 or higher
Step 2: Add Retrofit & Compose Dependencies
Edit build.gradle (Module: app):
Sync Gradle.
Step 3: Create Models
Create Todo.kt:
Step 4: Retrofit API Interface
Create TodoApi.kt:
Step 5: Create Retrofit Client
Create RetrofitClient.kt:
Step 6: MainActivity with Jetpack Compose UI
Replace MainActivity.kt with:
🧪 Testing
Run the Flask app: python app.py
Launch Android Emulator
Run the Kotlin app
Add and delete todos – changes will reflect instantly!