All Projects → ThanosFisherman → BlueFlow

ThanosFisherman / BlueFlow

Licence: Apache-2.0 license
Android Bluetooth classic API wrapped in Coroutines Flow.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to BlueFlow

Retrofit2-Flow-Call-Adapter
A Retrofit 2 adapter for Kotlin Flows.
Stars: ✭ 41 (-35.94%)
Mutual labels:  coroutines, kotlin-coroutines, coroutines-android
NoMansWallpaperApp
Looking for your next No Man's Sky wallpaper?
Stars: ✭ 35 (-45.31%)
Mutual labels:  coroutines, kotlin-coroutines
FoodApp
Proof of concept for food app [JetPack + Coroutines + Flow + MockK + JaCoCo coverage + SonarQube]
Stars: ✭ 25 (-60.94%)
Mutual labels:  coroutines, coroutines-android
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+93.75%)
Mutual labels:  coroutines, kotlin-coroutines
SketchwareManager
Coroutine-based library for managing Sketchware (Sketchware Pro/Studio) projects, collections and etc.
Stars: ✭ 54 (-15.62%)
Mutual labels:  coroutines, kotlin-coroutines
CoroutineLite
Simple implementation of kotlinx.coroutines to clarify the design of Kotlin Coroutines.
Stars: ✭ 142 (+121.88%)
Mutual labels:  coroutines, kotlin-coroutines
FirebaseFlowExample
A sample android application which demonstrates use of Kotlin Coroutines Flow with Firebase Cloud Firestore.
Stars: ✭ 50 (-21.87%)
Mutual labels:  coroutines, coroutines-android
raffler-kotlin
A raffling app developed as a playground to study many topics related to Android. Kotlin + Coroutines + MVVM
Stars: ✭ 44 (-31.25%)
Mutual labels:  coroutines, coroutines-android
Simple-Notes-Kotlin-App
✍️ Simple Note Making App use mvvm architecture , dagger , coroutines and navigation component. Features includes 🗒️ create , edit and ❌ delete notes
Stars: ✭ 40 (-37.5%)
Mutual labels:  coroutines, coroutines-android
Stars
An android application build with a clean architecture approach and Star wars API
Stars: ✭ 54 (-15.62%)
Mutual labels:  coroutines, coroutines-android
mqtt
Kotlin cross-platform, coroutine based, reflectionless MQTT 3.1.1 & 5.0 client & server
Stars: ✭ 31 (-51.56%)
Mutual labels:  coroutines, kotlin-coroutines
android-clean-arc-coroutines
Clean Architecture(Coroutines,Dagger, MVVM, ROOM, retrofit, databinding)
Stars: ✭ 116 (+81.25%)
Mutual labels:  coroutines, kotlin-coroutines
NetworkX
🅽🅴🆃🆆🅾🆁🅺🆇 An easy & handy library to monitor device internet connection status.
Stars: ✭ 92 (+43.75%)
Mutual labels:  coroutines, coroutines-android
StarWarsSearch-MVI
Star wars sample android project showcasing the use of View components for rendering UI in Fragments and Activities. Uses Android Jetpack, clean architecture with MVI (Uni-directional data flow), dagger hilt, and kotlin coroutines with StateFlow
Stars: ✭ 189 (+195.31%)
Mutual labels:  coroutines, kotlin-coroutines
Delish
Delish, a Food Recipes App in Jetpack Compose and Hilt based on modern Android tech-stacks and MVI clean architecture.
Stars: ✭ 356 (+456.25%)
Mutual labels:  coroutines, kotlin-coroutines
kotlin-coroutines-android
Useful extensions for coroutines. AutoDispose + MainScope
Stars: ✭ 84 (+31.25%)
Mutual labels:  coroutines, kotlin-coroutines
MVI-Clean-Architecture
MVI + Clean Architecture + Best Practices | Example of Clean Architecture of Android app using MVI design pattern with Jetpack and popular libraries
Stars: ✭ 50 (-21.87%)
Mutual labels:  coroutines, coroutines-android
Android Clean Arch Coroutines Koin
Implemented by Clean Architecture, MVVM, Koin, Coroutines, Moshi, Mockk, LiveData & DataBinding
Stars: ✭ 173 (+170.31%)
Mutual labels:  coroutines, kotlin-coroutines
the-white-rabbit
The White Rabbit is an asynchronous RabbitMQ (AMQP) client based on Kotlin coroutines
Stars: ✭ 90 (+40.63%)
Mutual labels:  coroutines, kotlin-coroutines
android-clean-architecture
🚀🚀🚀 The boilerplate for Android using Kotlin & Clean architecture.
Stars: ✭ 21 (-67.19%)
Mutual labels:  coroutines, coroutines-android

BlueFlow

Android Bluetooth classic API wrapped in Coroutines / Flow inspired by RxBluetooth and AndroidBluetoothLibrary.

Dependency

Download

Add the following to your app module build.gradle file. Note that the respective Coroutine dependencies should also be included in the project.

dependencies {
   implementation "io.github.thanosfisherman.blueflow:blueflow:<latest-version-number-here>"
}

Permissions

The following permissions must be granted for this lib to be able to work correctly.

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<!-- Dangerous Permissions below. Make sure you explicitly ask for location Permissions in your app on Android 6.0+ -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Usage

Under Construction! For now check the sample project which demonstrates the bluetooth device discovery.

Creating an instance

Create a Singleton instance of BlueFlow like so

val blueFlow: BlueFlow = BlueFlow.getInstance(applicationContext)

Checking for Bluetooth availability

You can check whether bluetooth is available on a specific device and/or if it's enabled or not.

      if (blueFlow.isBluetoothAvailable()) { //Checks if bluetooth is supported on this device
          if (blueFlow.isBluetoothEnabled()) { //Checks if bluetooth is actually turned ON for this device
              Toast.makeText(applicationContext, "BLUETOOTH IS ON", Toast.LENGTH_LONG).show()
          } else {
              Toast.makeText(applicationContext, "PLEASE ENABLE BLUETOOTH", Toast.LENGTH_LONG).show()
          }
      } else { //Bluetooth is NOT Supported on the device
              Toast.makeText(applicationContext, "BLUETOOTH NOT AVAILABLE ON THIS DEVICE", Toast.LENGTH_LONG).show()
      }

License

License

Copyright 2020 Thanos Psaridis

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].