This project is designed to fulfill the requirements of a socket interface application integrated with a database. It features a custom Android mobile client that communicates over Wi-Fi with a Python backend server. All transmitted data is permanently stored in an SQLite database to ensure persistence and traceability.
- Handles multiple client connections concurrently using threading.
- Ensures efficient and reliable message processing.
- Automatically logs all incoming messages.
- Stores timestamps and sender IP addresses.
- Data is saved in an SQLite database (
app_data.db).
- Modern and responsive Android application.
- Simple and intuitive user interface.
- Custom Settings page included.
- Allows dynamic server IP configuration without recompiling the app.
- Robust connection management.
- Handles network timeouts and unexpected server disconnections gracefully.
- Python 3
- Socket Library
- SQLite3
- Threading
- Flutter (Dart)
- shared_preferences (for local storage)
- TCP/IP
- Default Port: 6000
The server can run on any machine with Python installed.
git clone https://github.com/wol-98/socket-mobile-project.gitcd socket-mobile-projectpython3 server.pyThe server will start listening on Port 6000.
The mobile application is built using Flutter.
- Transfer
app-release.apk(if available in Releases) to your Android device. - Install the APK manually.
cd my_app
flutter pub get
flutter runRun the following command on your computer:
python3 server.pyFind your computer’s IP address:
Linux:
hostname -I- Open the mobile application.
- Tap the Settings (Gear Icon) in the top-right corner.
- Enter your computer’s IP address.
- Click Save.
- Type a message in the input field.
- Press the SEND button.
- The sent message appears instantly on the server terminal.
- The server sends a confirmation response:
Server replied...
To confirm that data is being stored successfully, run the following command on the server machine:
sqlite3 app_data.db "SELECT * FROM messages;"This will display all logged messages along with timestamps and sender IP addresses.
socket-mobile-project/
│
├── server.py
├── app_data.db
├── my_app/
│ ├── lib/
│ ├── pubspec.yaml
│ └── ...
└── README.md
- Name: Wol Wol
- Stream: TYBSC-IT
- UID: 2305074
Course: Network Socket Programming Project Type: Socket Interface Application with Database Integration
This project demonstrates real-time communication between a Flutter-based mobile client and a Python socket server with reliable data persistence using SQLite. It effectively showcases concepts such as multi-threading, TCP/IP communication, database integration, and mobile application development.