Communication
- Currently utilizing a web socket for the communication between the mac which is the server and the Android device as the client.
Security
- Non encrypted local network usage for now via websocket protocol.
- Will be looking into device to device encryption in the future as it’s very possible, just that I’m needing to do more research on it.
Authentication
- Currently done through a QR code scan which includes the websocket host IP, Port, Device name and the AirSync+ availability.
- Once scanned with any camera, Google lens based or any scanner that can handle Android intents, It will prompt the user to open the AirSync app.
- It will present the user with an authentication dialog to accept the connection and once done, it will start communication
How it communicate?
- JSON objects via websocket, As an example, the initial authentication response from the Android will be it’s IP, Name and some other details.
- Then there will be another a bit heavy network call which gathers, encodes and sends all the app icons to the mac client for caching them for easier usage when displaying notifications. This will get improved over time.
- Along with that, the initial call with device status will be shared which includes battery %, volume and currently playing media and related info. This will be a less frequent polling but if there is a detected action like a change of media playback, it may update instantly.
- Then at last, the confirmation message will appear from the android to the mac after the setup is completed.
- Pretty much the same with the clipboard sync. It detects, syncs the text.
Permissions usage