Comments (8)
Sure. We can set lower min SDK. I've set this version, because BLE beacons became popular in the last years and most of recent Android apps support min SDK from about 18 (or maybe 15). I'm also not sure how device with older API will behave when library Manifest has information about BLE usage and I currently don't have older devices to test it.
Which min API version you think we should use? What should be the most proper way or place to handle potential errors caused by decreasing min SDK? Do you know what errors could occur and when? As I mentioned earlier, I don't have older devices to test it myself and I'm afraid Bluetooth apps cannot be reliably tested on emulators.
When we clarify this issue, we can update library. Moreover, Pull Requests are welcome.
from reactivebeacons.
I'm wondering what could be the best way to solve this problem. According to Android 4.3 APIs - Wireless section, Bluetooth Low Energy (Smart Ready) was added in API 18 (Android 4.3), which is min SDK for ReactiveBeacons and we need to declare
<uses-feature android:name="android.hardware.bluetooth_le" />
tag in the Manifest. I'm not sure if we can use such declarations in lower API levels.
from reactivebeacons.
The uses-feature tag is not used by the OS itself when installing an app or running it - it is purely informational and allows eg. Google Play to filter out devices not supporting this feature (essentially hiding your app from users of those devices).
Imho the library shouldn't force this constraint on the app; if it can run (perhaps in fallback mode) without BLE it should be visible to non-BLE devices.
Regarding the minSdkVersion, I think it should be lowered to cover more devices in the wild. Personally, I'm thinking API 15 or 16. But perhaps even down to GingerBread? https://developer.android.com/about/dashboards/index.html gives an idea on how many users are left out. RxAndroid uses minSdkVersion = 9.
In any case, lowering it below API 18 requires the library to handle lower APIs runtime. I'm thinking something like throwing an exception if being initialized on devices running API < 18. This essentially forces the the app using the library to guard against using it on older APIs - which is ok imo.That could perhaps be achieved by a convenience method like isBleSupported()..
I don't know what you prefer.. but I can look at making a PR if you like?
TLDR;
As it stands, I - as an app developer using the library - both have to override the library's minSdkVersion and do runtime guards against using it. Settling with the latter would be preferable imo.
from reactivebeacons.
btw, kudos for creating the lib :)
from reactivebeacons.
Thanks for the clear and complete explanation as well as proposed solutions. I'll figure something out and we can lower API even to 9 (same as RxAndroid), so I could be available in the next release. :-)
from reactivebeacons.
I've decreased min SDK to 9 and added additional method isBleSupported()
. You can take a look at the updated documentation in the README.md
file and view code of updated sample app to check how to use it. Decreased SDK and checking BLE support will be available in the next release.
from reactivebeacons.
Cool, thx!
Do you have any plans or roadmap for the (next) releases?
from reactivebeacons.
Currently I don't have plans for next releases. Maybe I will take a closer look at GATT (Generic Attribute Profile) and try to use it in the library. Besides that, I'll probably and some Static Code Analysis, add sample code with Android Service and sample app in Kotlin.
If you have any ideas for the further improvements, feel free to share them through the GitHub issues.
from reactivebeacons.
Related Issues (20)
- Scan speed HOT 1
- Improve gradle configuration
- Organize Git branches & documentation
- Add permission annotations for library API HOT 1
- Update artifact id for RxJava2.x branch HOT 1
- Create separate gh-pages with JavaDoc for RxJava1.x & RxJava2.x HOT 1
- Release 0.6.0
- Consider making methods for creating observables static HOT 1
- Update package for library on RxJava2.x branch HOT 1
- Incorrect distance HOT 2
- Eddystone-URL HOT 1
- IllegalStateException in LollipopScanStrategy HOT 1
- NullPointerException in LollipopScanStrategy HOT 1
- Detecting when beacon signal is lost HOT 2
- Add beacon signal discovery monitoring
- Add beacon signal lost monitoring
- ScanRecord passing into Beacon object HOT 3
- Add RxJava based convenience methpds to AccessRequester class
- How to scan beacons at specified regular intervals HOT 2
- Add possibility to customize ScanSettings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactivebeacons.