This workspace contains one complete feature:
V2N_Demo/
├── backend/
│ ├── app.py
│ ├── summarizer.py
│ ├── youtube_utils.py
│ ├── requirements.txt
│ └── README.md
└── android-feature/
├── build-gradle-snippets.txt
└── app/
└── src/
└── main/
├── AndroidManifest.xml
├── java/com/studyos/notes/
│ ├── model/
│ │ ├── SummarizeRequest.kt
│ │ └── SummarizeResponse.kt
│ ├── network/
│ │ ├── RetrofitClient.kt
│ │ └── StudyOsApi.kt
│ └── ui/
│ └── SmartNotesActivity.kt
└── res/layout/
└── activity_smart_notes.xml
From workspace root:
cd backend
python3 -m venv ../.venv
source ../.venv/bin/activate
pip install -r requirements.txt
python app.py
Server runs on:
http://127.0.0.1:5000http://<your-laptop-ip>:5000Health check:
curl http://127.0.0.1:5000/health
Summarize test:
curl -X POST http://127.0.0.1:5000/summarize \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw"}'
Expected response shape:
{
"summary": "...",
"key_points": ["...", "..."]
}
Copy files from android-feature/app/src/main/... into your Android project module.
Add dependencies from android-feature/build-gradle-snippets.txt into your module build.gradle.
Make sure your manifest has internet permission:
<uses-permission android:name="android.permission.INTERNET" />
Use SmartNotesActivity as your screen (launch directly or navigate from your existing app).
In RetrofitClient.kt, keep:
BASE_URL = "http://10.0.2.2:5000/"10.0.2.2 maps emulator -> host machine localhost.
ip a (example: 192.168.1.78)BASE_URL in RetrofitClient.kt:
http://192.168.1.78:5000/0.0.0.0 (already configured in app.py).5000.Request:
{
"url": "https://www.youtube.com/watch?v=..."
}
Success response:
{
"summary": "...",
"key_points": ["...", "..."]
}
Error response example:
{
"error": "Transcript not available for this video"
}
Invalid YouTube URLTranscript not available for this videoNetwork error in Android10.0.2.2 is used.localhost.Failed to fetch transcriptpip install -U youtube-transcript-apiAndroidManifest.xml has usesCleartextTraffic=trueres/xml/network_security_config.xml allows cleartext traffic