Live Sync
Engine
Advanced IPC architecture using secondary executables for dedicated socket bridging. Facilitates high-performance, bidirectional event streaming between Android services and Windows.
⚙️ Process Lifecycle & Initialization
To maintain stability and non-blocking UI in the main application, media and notification listeners are offloaded to separate child processes.
Process Orchestration
The main engine adb_devices.exe spawns two dedicated
child executables: media_server.exe
and notification_server.exe
This isolation ensures the main UI remains non-blocking.
Socket Initialization
Both child processes immediately initialize their own independent TCP Socket Servers on distinct ports and enter a listening state, awaiting incoming connections.
Android Handshake Trigger
Once the Windows application is ready and listening, it sends explicit handshake commands to the Android device. These commands instruct the Android background services to establish socket connections and begin streaming data.
http://$android_ip:$port/start_socket_io_for_media_sessions
http://$android_ip:$port/start_socket_io_for_notifications
Reverse Connection
Android receives the request and immediately establishes a TCP Connection back to the respective sub-executable (Media → Media Server, Notif → Notif Server).
Auto-Optimization & Lifecycle
Fail-Safe Closure: If the device disconnects, goes offline, or detects a network change (e.g., WiFi switch), the connection is automatically terminated on both sides. The Windows executables self-close to free up system resources instantly.
"type": "notification", "notification_id": "pkg|title|text", "app_name": "WhatsApp", "title": "Meta AI", "text": "Hello world", "sub_text": "Personal", "when": 1700000000000, "is_big_img": true, "actions": [ { "title": "Reply", "is_text_field": true } ]
"type": "notification_list", "notifications": [ /* Array of notification objects */ ]
"type": "notification_update", "notification": { /* Full object */ }
"type": "notification_removed", "notification_id": "...", "app_package_name": "..."
{ "type": "resend_notifications" }
"type": "send_reply", "notification_id": "...", "text": "I'll be there soon!"
"type": "action_click", "notification_id": "...", "title": "Mark as read"
"type": "core_info", "package_name": "com.spotify.music", "song_title": "Believer", "song_subtitle": "Imagine Dragons", "is_currently_playing": true, "current_time": 45231, "end_time": 204000, "last_position_update_time": 1700000000123
"type": "app_icon", "package_name": "com.spotify.music", "app_icon_base64": "base64_png..."
"type": "album_art", "song_title": "Believer", "album_art_base64": "base64_jpeg..."
"type": "remove_info", "package_name": "com.spotify.music"
"type": "playback_cmd", "package_name": "com.spotify.music", "cmd": "play" // play | pause | next | prev
// SEEK { "type": "seek_update", "cmd": "seek_to", "position": 60000 } // SKIP { "type": "seek_update", "cmd": "skip", "value": 10000 }
{ "type": "resend_all" }