Django Backend + Android Frontend
This project is a Vishing (Voice Phishing) Detection System that uses an Android mobile application to intercept incoming phone calls and send call information to a Django backend for real-time analysis. The backend analyzes the call data and determines whether the call is safe, suspicious, or potentially harmful.
This system consists of two major components:
- Runs on the user’s phone.
- Intercepts incoming calls (using Android Telephony API).
- Extracts caller phone number and metadata.
- Sends call information to the Django backend via REST API.
- Displays the backend’s analysis (Safe / Suspicious / Vishing).
- Receives call data from Android devices.
- Runs ML or rule-based vishing detection logic.
- Returns a JSON response with the risk analysis.
- Stores logs for future training and improvement.
-
A call arrives on the Android phone.
-
Android App captures:
- Phone number
- Call time
- Call type (incoming/outgoing)
-
App sends this data to Django backend →
/api/call-detection/ -
Django backend:
- Processes the phone number
- Checks machine-learning or blacklist rules
- Generates a "risk score" or "threat category"
-
Backend responds with:
{ "status": "suspicious", "score": 87, "reason": "Number reported multiple times" } -
Phone displays an alert (RED / YELLOW / GREEN).
-
Django saves the call analysis for future dataset building.
- Django REST Framework
- Python
- SQLite / PostgreSQL
- Machine Learning model or rule-based detector
- Android Studio (Java/Kotlin)
- TelephonyManager
- Retrofit for API calls
- Notifications / UI alerts
Send call details to backend.
Example request:
{
"phone_number": "+123456789",
"call_type": "incoming",
"timestamp": "2025-11-16T10:30:00"
}Example response:
{
"status": "vishing",
"confidence": 0.92,
"message": "Number associated with scam patterns"
}git clone https://github.com/yourusername/vishing-detector-backend.git
cd vishing-detector-backendpython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython manage.py migratepython manage.py runserver-
Open
/android_app/folder with Android Studio -
Update backend URL in Retrofit service:
const val BASE_URL = "http://YOUR_SERVER_IP:8000/"
-
Run on device
-
App requests permissions:
- READ_CALL_LOG
- READ_PHONE_STATE
- POST_NOTIFICATIONS
-
Intercepted calls will now be analyzed by Django server.
You may use:
- Train using past call logs + labels (safe/spam/vishing)
- Use logistic regression, SVM, or transformer language model on call remarks
-
Check phone number:
- Reported spam lists
- Known fraud numbers
- Short suspicious patterns (e.g., “+255 6XX 00XX”)
- Time-based anomalies
| Phone Number | Status | Score | Timestamp |
|---|---|---|---|
| +255621XXXX | vishing | 0.91 | 2025-11-15 |
| +1415555XXXX | safe | 0.02 | 2025-11-16 |
| +255784XXXX | suspicious | 0.62 | 2025-11-16 |