Giter VIP home page Giter VIP logo

Comments (3)

btkelly avatar btkelly commented on August 27, 2024

First I just want to point out that it is intentional that GandalfActivity blocks the UI. This is because when issuing a force update it is usually related to some unforeseen event or bug found in the future. Without knowing which section of the app the update is for you risk executing code that should not be executing before the Gandalf check can complete.

But Gandalf is built in such a way that you can use it however you would like to get the same update functionality. The README has a quick explanation about using Gandalf without the Activity approach:

If extending GandalfActivity doesn't work for you the Gandalf class can be used directly by calling shallIPass(GandalfCallback callback). In this case make sure you respond to the callback methods and make a call to gandalf.save(Alert alert) and gandalf.save(OptionalUpdate optionalUpdate) if not using the BootstrapDialogUtil for your UI.

Let me know if that isn't clear enough or you need a little more direction.

from gandalf.

jeffbordon avatar jeffbordon commented on August 27, 2024

OK, thanks. I got your point why using a splash activity makes sense.

Another idea to minimize the unwanted delay could be adjusting the http request timeout as this especially happens with bad internet connection. However, this would increase the risk of passing the check simply due to a timeout.

from gandalf.

btkelly avatar btkelly commented on August 27, 2024

That is a possible solution to avoid long delays during the Gandalf check. You can accomplish this by passing a custom OkHttpClient to the Installer and setting your own timeout length. The current default for Gandalf is set to 30 seconds.

from gandalf.

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.