GithubHelp home page GithubHelp logo

Creating a Fork about rxandroidble HOT 2 OPEN

MaxWebfactor avatar MaxWebfactor commented on July 2, 2024
Creating a Fork

from rxandroidble.

Comments (2)

dariuszseweryn avatar dariuszseweryn commented on July 2, 2024

Hmmm... I am not a master of grade myself. You may first of all remove signing as it is not needed for jitpack as far as I can tell.
As for using the project as a module you could look how the sample app is using rxandroidble:

dependencies {
    implementation project(path: ':rxandroidble')
    implementation rootProject.ext.libs.appcompat
    implementation rootProject.ext.libs.material_design
    implementation 'com.jakewharton:butterknife:10.2.3'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
    implementation rootProject.ext.libs.rxandroid
    implementation rootProject.ext.libs.rxjava2
    implementation rootProject.ext.libs.rxjava_binding
    implementation rootProject.ext.libs.rxjava_replayingshare
}

P.S. Would you share what have you changed in your fork?

from rxandroidble.

MaxWebfactor avatar MaxWebfactor commented on July 2, 2024

Thanks for the advice, I will give it a shot!

_

P.S. Would you share what have you changed in your fork?

_

It's a simple change to the service discovery function of the ServiceDiscoveryManager:

Single<RxBleDeviceServices> getDiscoverServicesSingle(final long timeout, final TimeUnit timeoutTimeUnit) {
        return deviceServicesObservable.doOnSubscribe(
                new Consumer<Disposable>() {
                    @Override
                    public void accept(Disposable disposable) {
                        timeoutBehaviorSubject.onNext(new TimeoutConfiguration(timeout, timeoutTimeUnit, Schedulers.computation()));
                    }
                });
    }

My goal is to remove the cached services to see if the operating system is caching the services of our Bluetooth device or not. I am currently developing an application where the smartphone is the Bluetooth peripheral device that communicates with the Bluetooth central device.
The central device is highly customizable, so its services can change at any time.
On iOS this works fine (ok, I'm a Flutter developer, so I use the flutter_reactive_ble plugin from Philips Hue https://github.com/PhilipsHue/flutter_reactive_ble, which depends on your project), but on the Android side I've found that there is no way to reliably update the services. This means that I always get the same services, except that I have to reconnect the smartphone (programmatically reconnect works fine). This works, but has some unpleasant side effects.

While researching where the cached services come from, I came across the service discovery feature mentioned above.

I also tried implementing this workaround that you discussed in 2018 - to no avail:
Feature DiscoverService with clearCache #453

from rxandroidble.

Related Issues (20)

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.