Giter VIP home page Giter VIP logo

Comments (4)

TatankaConCube avatar TatankaConCube commented on June 16, 2024

In Android SDK we have similar callbacks:

/**
 * Called in case when opponent has rejected your call
 */
override fun onCallRejectByUser(session: RTCSession, userId: Int, userInfo: MutableMap<String, String>?) {}

and

/**
 * Called in case when opponent hung up
 */
override fun onReceiveHangUpFromUser(session: RTCSession, userId: Int, userInfo: MutableMap<String, String>?) {}

More info you can found in our documentation.

from android-messenger-app.

sapkotamadhusudan avatar sapkotamadhusudan commented on June 16, 2024

@TatankaConCube thanks for the info, but i've tried using these events. It works for the call initiator i.e. deviceC. But in my case deviceA and deviceB and are opponents with same user logged in, and none of the following events are invoked to the deviceB after deviceA accepted or rejected the call.

I deviceA rejects the call, onCallRejectByUser event will be invoked in deviceC but in deviceB no events are invoked. I've tried this in the sample application.

I want to dismiss the incoming call screen when same user accepts the call from another device.

/**
 * Called in case when opponent has rejected your call
 */
override fun onCallRejectByUser(session: RTCSession, userId: Int, userInfo: MutableMap<String, String>?) {}

And

/**
 * Called in case when opponent hung up
 */
override fun onReceiveHangUpFromUser(session: RTCSession, userId: Int, userInfo: MutableMap<String, String>?) {}

And

/**
 * Called in case when opponent accept the call
 */
override fun onCallAcceptByUser(session: RTCSession, userId: Int, userInfo: MutableMap<String, String>?) {}

from android-messenger-app.

TatankaConCube avatar TatankaConCube commented on June 16, 2024

As a variant you can organise additional signalling via System messages feature. Oriented logic will be:

  • deviceA sends system message for himself (userX) with parameter self_action=accept (self_action=reject, self_action=hang_up for another actions) and type=self_signalling when does Accept call (or another) action;
  • deviceB receives this message and does needed actions (close call screen, etc.);

from android-messenger-app.

sapkotamadhusudan avatar sapkotamadhusudan commented on June 16, 2024

@TatankaConCube Thank you very much. I did implemented the purposed solution, it worked :)

from android-messenger-app.

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.