Giter Site home page Giter Site logo

blexplorer's People

Contributors

gszy avatar hrdl-github avatar ligi avatar mwarning avatar sandy-8925 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ildar

blexplorer's Issues

Let BluetoothController store BLE device list and last_seen

  • Currently, the BLE device list is scoped to DeviceListActivity. Instead of doing that, it's better to have BluetoothController store the BLE device list and associated last_seen data, in one central location. This data can be cleared when the app UI goes to the background, and refreshed when the app comes back to the foreground.

Handle Bluetooth state/permission changes correctly

  • For Bluetooth APIs to work, Bluetooth atleast must be enabled, and sometimes Location too. Location permissions may also be needed.
  • The app has to listen for changes to Bluetooth, Location setting and location permission changes and react correctly
  • For example, the background device scanning code has to start/stop scanning based on these state changes (already implemented)
  • The UI must also react accordingly - DeviceServiceExploreActivity and CharacteristicActivity must gracefully exit when Bluetooth is disabled (since they depend on working Bluetooth APIs to create a connection to the device and interact with it).

version bump

plz increase version and make a git tag. I'm going to ask F-Droid for switching upstream to yours. Of course if @ligi doesn't mind.

Handle JCenter deprecation

JCenter is deprecated, and newer libraries won't be uploaded. They have said that existing ones will remain indefinitely, but it's better to move off of JCenter entirely if possible.

The only library that's available only on JCenter seems to be 'net.steamcrafted:load-toast:1.0.12'

Original source is https://github.com/code-mc/loadtoast

There's a forked and updated version here: https://github.com/mohsenoid/load-toast which seems to be a suitable replacement. Will have to work on using that in the future.

Update targetSdk to 26+

Targeting API 26+ means the app will suspend after being in the background for a few minutes, ensuring reduced CPU usage.

[FR] sort and/or filter devices

in many cases a user is surrounded by tens of devices. So user interface is flooded by those. Better UX could be reached by either:

  1. sorting devices by the signal strength or
  2. filtering by name / addr parts.

Fix crash that occurs sometimes, when we try to connect to a Bluetooth device we are already connected to

Stacktrace:

2021-02-27 16:16:48.866 29233-29233/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.ligi.blexplorer, PID: 29233
io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | com.polidea.rxandroidble2.exceptions.BleAlreadyConnectedException: Already connected to device with MAC address FF:FF:AE:46:A4:80
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
at com.uber.autodispose.HalfSerializer.onError(HalfSerializer.java:148)
at com.uber.autodispose.AutoDisposingObserverImpl.onError(AutoDisposingObserverImpl.java:88)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7697)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: com.polidea.rxandroidble2.exceptions.BleAlreadyConnectedException: Already connected to device with MAC address FF:FF:AE:46:A4:80
at com.polidea.rxandroidble2.internal.RxBleDeviceImpl$1.call(RxBleDeviceImpl.java:84)
at com.polidea.rxandroidble2.internal.RxBleDeviceImpl$1.call(RxBleDeviceImpl.java:72)
at io.reactivex.internal.operators.observable.ObservableDefer.subscribeActual(ObservableDefer.java:33)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableDoOnLifecycle.subscribeActual(ObservableDoOnLifecycle.java:33)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableDoOnEach.subscribeActual(ObservableDoOnEach.java:42)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservablePublishAlt.connect(ObservablePublishAlt.java:79)
at io.reactivex.internal.operators.observable.ObservableRefCount.subscribeActual(ObservableRefCount.java:87)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at com.jakewharton.rx.ReplayingShare$LastSeenObservable.subscribeActual(ReplayingShare.java:78)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableFlatMapSingle.subscribeActual(ObservableFlatMapSingle.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableFlatMapSingle.subscribeActual(ObservableFlatMapSingle.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableObserveOn.subscribeActual(ObservableObserveOn.java:45)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at com.uber.autodispose.AutoDisposeObservable.subscribeActual(AutoDisposeObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.Observable.subscribe(Observable.java:12270)
at io.reactivex.Observable.subscribe(Observable.java:12172)
at com.uber.autodispose.AutoDispose$1$4.subscribe(AutoDispose.java:267)
at org.ligi.blexplorer.characteristics.CharacteristicActivity.onCreate(CharacteristicActivity.kt:82)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.