GithubHelp home page GithubHelp logo

Building fork help about rxandroidble HOT 6 CLOSED

fraune avatar fraune commented on June 4, 2024
Building fork help

from rxandroidble.

Comments (6)

dariuszseweryn avatar dariuszseweryn commented on June 4, 2024

Unfortunately I am no expert when it comes to project configuration but you could remove signing completely if you do not intend to distribute your package at all

from rxandroidble.

fraune avatar fraune commented on June 4, 2024

Maybe I should back up a little. While I'm comfortable working in Android, I'm still a beginner with working on packages. Disabling signing might be a helpful step, but I need some more guidance.

I didn't see anything in the readme under "Contributing" for how to build the library locally or how people usually experiment with their changes to this library before they make a PR. Do you have any advice on how to do so?

For some context: I have an app where my UI lags when I'm scanning, and I'd like to learn if I can do anything to improve that. I noticed the scanBleDevices() method observes on the main thread, and I'd like to see if my app behaves differently if I choose to add the ability to observe the scan with an IO thread pool.

from rxandroidble.

dariuszseweryn avatar dariuszseweryn commented on June 4, 2024

You can switch on which thread you observe an Observable by mixing in .observeOn() in the operator chain — no need to changing the library.

For prototyping you can build/deploy to your phone one of the sample applications which use the library source code. You can also checkin the library module into your app and depend on the module instead of the maven package.

from rxandroidble.

fraune avatar fraune commented on June 4, 2024

I understand I can switch the thread I observe on, but I guess I would like to try changing the upstream subscription to see if that may help alleviate UI lag in my circumstance.

For example, I have some test code that looks like this:

rxBleClient.scanBleDevices(scanSettings)
    .doOnNext { println("###1 Scanning on ${Thread.currentThread().name}") }
    .subscribeOn(Schedulers.io()) // I would expect this to affect upstream threading
    .doOnNext { println("###2 Scanning on ${Thread.currentThread().name}") }
    .observeOn(Schedulers.io()) // Only affects downstream operators
    .doOnNext { println("###3 Scanning on ${Thread.currentThread().name}") }
    ...

When I perform a scan with that code, I will get output that looks like this.

I/System.out: ###1 Scanning on main
I/System.out: ###2 Scanning on main
I/System.out: ###3 Scanning on RxCachedThreadScheduler-3

And yes, I think testing with the sample applications is a good smoke test, but it may be difficult for me to build the sample app up enough to simulate the same issue I'm experiencing on my other app. I'll keep that in mind though.

Do you know how I can checkin the library module into my app? I tried importing the local module, but I get a gradle error when trying to sync project files that I'm not sure how to resolve. I added all the repositories to the project-level build.gradle that I could think of, so I'm not sure what repository is missing/undefined.

A problem occurred configuring project ':dagger-compiler-shadow'.
> Could not resolve all files for configuration ':dagger-compiler-shadow:classpath'.
   > Cannot resolve external dependency gradle.plugin.com.github.johnrengelman:shadow:7.1.2 because no repositories are defined.
     Required by:
         project :dagger-compiler-shadow

from rxandroidble.

dariuszseweryn avatar dariuszseweryn commented on June 4, 2024

dagger-compiler-shadow is a regular dagger-compiler but shadowed for this project — that needs some additional configuration to work.
You can rename all the code references from import bleshadow.* to import *

from rxandroidble.

dariuszseweryn avatar dariuszseweryn commented on June 4, 2024

Closing due to lack of information and inactivity of the original poster.

When more data will be available—feel free to add that information and reopen this issue.

Best Regards

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.