GithubHelp home page GithubHelp logo

Comments (5)

TatankaConCube avatar TatankaConCube commented on June 24, 2024 1

it will cantains data which you send in callSession.reject({"reason": "BUSY"}); when busy user does reject

from connectycube-flutter-samples.

wrteam-priyansh avatar wrteam-priyansh commented on June 24, 2024

@ShyamKrishna122 you can store call details in database when call is in process and when call finish delete the call related data.so before making call you check for call details for other user and if you find call details in database that means user is busy in call..
hope i am making sense

from connectycube-flutter-samples.

TatankaConCube avatar TatankaConCube commented on June 24, 2024

additionally to @wrteam-priyansh solution you can use additional parameters when you reject the call, it can looks like callSession.reject({"reason": "BUSY"}); and on the caller side in the callback onCallRejectedByUser you can check this parameter like:

_callSession.onCallRejectedByUser = _onCallRejectedByUser;

void _onCallRejectedByUser(P2PSession session, int userId, Map<String, String> userInfo) {
    if (userInfo.isNotEmpty && userInfo.containsKey("reason")) {
        String reason = userInfo["reason"];

        if (reason == "BUSY") {
            // user is busy, do needed actions
        }
    }
}

from connectycube-flutter-samples.

ShyamKrishna122 avatar ShyamKrishna122 commented on June 24, 2024

Thank you guys but what will userInfo contains?

from connectycube-flutter-samples.

ShyamKrishna122 avatar ShyamKrishna122 commented on June 24, 2024

Thank you I will try implementing it

from connectycube-flutter-samples.

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.