Giter Club home page Giter Club logo

Comments (3)

calimero-project avatar calimero-project commented on June 12, 2024

The gradle version part does not start with a 'v', remove that.

Every connection implementation has a method to add a tuwien.auto.calimero.KNXListener, and every link implementation has a method to add a tuwien.auto.calimero.link.LinkListener. Both will provide you with a notification if the connection/link got closed.

from calimero-core.

ViorelOnica avatar ViorelOnica commented on June 12, 2024

Hello, thank you for your answer !

It's working, but I tested it deactivating mobile data and the linkClosed event is triggered after 30-45 seconds after turning mobile data off.. ain't 30 seconds too much?

        DataHolder.knxLink.addLinkListener(new NetworkLinkListener() {
            @Override
            public void confirmation(FrameEvent e) {
            }

            @Override
            public void indication(FrameEvent e) {
            }

            @Override
            public void linkClosed(CloseEvent e) {
                     //what to do on losing connection
            }
        });

from calimero-core.

calimero-project avatar calimero-project commented on June 12, 2024

The notification will be sent when the link actually got closed; if the link is idle and does not do any communication (and the socket is not closed by the OS), then there can be a certain time delay.

On Android, if you want an immediate notification about changes to your connection, you probably should use android.net.ConnectivityManager. CONNECTIVITY_ACTION or something like that.

from calimero-core.

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.