Android app for AirSync 2.0 built with Kotlin Jetpack Compose
Min : Android 11
Use your built-in camera or Google lense or anything that can scan a QR code. I twill prompt you to open the app. Once authorized, The last device will be saved on the mobile for now for easier re-connection.
-
Enable Developer Options on your Android
- Open
Settings
βAbout phone
- Tap Build number 7 times until you see βYou are now a developer!β
- Open
-
Enable Wireless Debugging
- Go to
Settings
βSystem
βDeveloper options
- Scroll down and enable
Wireless debugging
- Go to
-
Pair your device with your Mac
- Tap on
Wireless debugging
- Tap
Pair device with pairing code
- Note down the IP address and port, and the 6-digit pairing code
Example:
IP:Port β 192.168.1.35:37099 Pairing Code β 123456
- Tap on
-
On your Mac, open Terminal
Run the pairing command using the IP and port:
adb pair 192.168.1.35:37099
When prompted, enter the 6-digit pairing code:
Enter pairing code: 123456
You should see:
Successfully paired to 192.168.1.35:37099 [guid=...]
-
Finalize and connect
- Close the pairing dialog on Android
- You'll return to the
Wireless debugging
screen - Use the IP:port shown there (usually
:5555
) in the AirSync Mac app - Enter it, then start ADB connection
β It should now connect successfully!
You can expand the console in the Mac app for more information. Once connected, the Mirror button will appear automatically.
π Done! Youβre now connected over Wi-Fi.
Definitely need someone to help with documentation ;)
- Currently utilizing a web socket for the communication between the mac which is the server and the Android device as the client.
- 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.
- 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
- 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.
- This is an important topic on explaining the sensitive permission usage on mostly the Android app in order to provide features with transparency.
- This permission is necessary in order to read and listen to new notifications on Android and then to continue syncing them. Also extends itβs usage to media player as itβs also a notification that holds playback information.
- Starting from Android 14, apps now have to request permission in order to send notifications. This is not yet utilized well in AirSync but the current usage is to display the connected deviceβs status as a persistent notification. There will be more uses of this.
- Well, that is self explanatory
- App requires incoming and outgoing local network access for the websocket to perform and connect to the android devices
- App may use the internet for updates which are now built-in tot he app itself for easier updating process.
- To display Android notifications
- To store app data for persistence.
- AirSync 1.0, Yes, I had an initial version of the application vibe coded a while ago which was not close to being user friendly. But it is the base
- The ACTUAL inspiration, Itβs been a thing I wanted to do for a while.. for many reasons
- I could just leave my phone somewhere in the home and continue on my day without missing anything
- Less distractions
- I donβt have to log into my work account on everywhere to get notified
- Sometimes, mobile apps are more reliable when it comes to notifying
- Less apps to run on my poor mac
- Also why not?
Now we into the goodies,
- Sync Android notifications to mac
- Take actions with the notifications (currently dismissing)
- Clipboard sync (there are improvements to be made)
- Sync Android battery status to mac
- Show Android now playing and control
- Share text by sharing it tot he AirSync app in android
And more⦠Especially more to come and planned.
- Wireless ADB assist
- scrcpy integration
iPhoneAndroid Mirroring and remote access assist- Synced widgets on both devices
- QS tiles on Android for easier actions
- Run in macOS menubar
- Sync mac device status to Android
- Low battery alerts
- Take actions with notifications, maybe reply
- Maybe file share, but use Blip instead
- Live activities?
- Remotely lock devices?
The list goes on, You are welcome to open feature requests and inspire me for new ideas.
- To you, seriouslyβ¦
- To my community mostly known as TIDWIB (Things I Do When Iβm Bored β¦.. see the connection)
- May sound weird but AI, Yeah, without that deep research, assistant in helpless topics, explanations, occasional detonations and all lead to the rapid development of AirSync. Without this, how da hell do I implement a notification listener without weeks of study? Yeah, if you know how to use it efficiently, it is a damn good buddy to do things that you never could imagine.
- All the reddit peeps for showing that this is actually a thing that they wanted.
- All the libraries, apps and tools used for development and their creators. Issue volunteers, reddit community helpersβ¦
- My sleep schedule⦠the lack of.
com.sameerasw.airsync/
βββ data/
β βββ local/
β β βββ DataStoreManager.kt # Local data storage
β βββ repository/
β βββ AirSyncRepositoryImpl.kt # Repository implementation
βββ domain/
β βββ model/
β β βββ Models.kt # All data models
β βββ repository/
β βββ AirSyncRepository.kt # Repository interface
βββ presentation/
β βββ viewmodel/
β β βββ AirSyncViewModel.kt # ViewModel
β βββ ui/
β βββ components/ # Reusable UI components
β β βββ ActionCards.kt
β β βββ Dialogs.kt
β β βββ StatusCards.kt
β βββ screens/
β βββ AirSyncMainScreen.kt # Main screen composable
βββ service/
β βββ MediaNotificationListener.kt # Notification service
βββ utils/
βββ DeviceInfoUtil.kt
βββ JsonUtil.kt
βββ PermissionUtil.kt