An example application of a video socket connection between an android device and a REST-Service with socket.io.
This project uses:
- android application with the
android.hardware.camera2
library to get each frame that the camera captures flask
for the frame transfer endpointsocket.io
for the socket communication between the android app and the flask service
- Install
flask pip packages
throughpip install flask
andpip install flask_socketio
- Start the flask service with
python websocket.py
. The server runs on port5000
. - Update the socket url in the android class
SocketStream.java
to communicate with your flask Service for exampleprivate String url = "http://192.168.1.1:5000";
- Start the android application on an emulator or a real device, keep in mind that the device needs to be in the same network as your flask server! Press the "Start"-Button and your terminal should look like this.