BirdyDrop is an Android library for sharing data using Bluetooth Low Energy (BLE).
It enables seamless and efficient data exchange between devices using BLE, making it ideal for peer-to-peer communication and proximity-based sharing in Android apps.
- Simple integration as an Android library
- Fast peer-to-peer data sharing over BLE
- Minimal permissions required
- Optimized for low energy consumption
These instructions will help you set up and use BirdyDrop in your Android project.
- Android Studio (recommended)
- Minimum SDK version: 24+
- Bluetooth Low Energy support on device
-
Download the AAR library file from Releases
-
Add BirdyDrop to your
build.gradle
dependencies:dependencies { implementation(files( [AAR_FILE_PATH] )) }
Replace
[AAR_FILE_PATH]
with the path of AAR file downloaded. -
Sync your project with Gradle files.
-
Initialize BirdyDrop in your application or activity:
val birdyDrop = ApiBirdydrop(this, object : BirdydropUpdateListener { override fun onReceiveInfo(info: String) { } override fun onNewDevice(devices: List<DeviceBluetooth>) { } })
-
Start service:
birdyDrop.onStart()
-
Share data:
birdyDrop.sendMsg("Hello world")
-
Initialize Birdydrop UI:
BirdyDrop(birdyDrop) { msg: String -> /* Example to open URL when receiving link */ val p = Patterns.WEB_URL val m = p.matcher(msg) if (m.matches()){ //It's an URL val browserIntent = Intent( Intent.ACTION_VIEW, Uri.parse(msg) ) startActivity(browserIntent) }else{ // Do something else } }
Contributions are welcome! Please open issues or submit pull requests for improvements and fixes.
- Fork the repository
- Create a new branch (
git checkout -b feature/my-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/my-feature
) - Open a pull request
[Specify your license here, e.g., MIT, Apache 2.0, GPL, etc.]
For questions or support, please contact the maintainer or open an issue on GitHub.