- macOS 11.0 and Later
- Android 4.0 and Later (Tasker requirement, but not tested on any version below the Android 16 QPR1 Beta 3 😐)
- Tasker 4.2u3 (if you have it installed, you likely have a version higher than this)
- Download the latest installation file here on your Mac
- Turn on Nearcast after installation
- Open tasker_airbattery_sender.js in a new tab, and copy the file contents into a text editor such as TextEdit
- Replace the 4 variables in the configuration section to match your mac as shown in comments
- Copy the file contents to your Android device (using Google Docs, KDE Connect Clipboard Sync, or a similar technology)
- Create a Tasker task and add an action for "JavaScriptlet"
- Paste the file contents into the code section
- Scroll down, disable "Auto Exit", and reduce the "Timeout" to something below 15 seconds to reduce battery impact
- Back out of the task, and create a profile
- Set trigger to Event -> Power -> Battery Changedhanged
- Set task to run as the task you created earlier
Shared with original:
- After AirBattery is started, it will be displayed on both the Dock and the status bar by default, or only one of them (can be configured)
- AirBattery will automatically search for all devices supported by the "Nearbility Engine" without manual configuration.
- Click the Dock icon / status bar icon, or add a widget to view the battery usage of your devices.
- You can also use the "Nearcast" feature to check the battery usage of other Macs and their peripherals in the LAN at any time.
- You can also change the status bar icon to a real-time battery icon in preferences, just like the one that comes with the system.
- If necessary, you can hide certain devices in the Dock menu or status bar menu, and unhide them at any time.
Unique to this fork:
- The Nearcast feature now extends to Android devices that run the Tasker script above in the LAN or over Tailscale
Screen.Recording.2025-08-15.at.11.28.49.AM.mov
1. Why does the original not have Android support?
The creator has mentioned that there is no Android support, and while they didn't state why, I found out the hard way. The project uses MultipeerKit, which is exclusive to Apple devices.
2. Why are you not requesting to merge this fork?
This fork has been vibe-coded into oblivion to create a local REST API server that runs a second instance of MultipeerKit for the Android device. While the HTTP server the app has is encrypted with the same private key as nearcast, it is still a janky solution, and I would rather the creator implement it themselves a more efficient way.
This fork would not be possible without lihaoyun6