Giter Club home page Giter Club logo

Comments (7)

Viish avatar Viish commented on June 9, 2024

Hi @LoyaiHai,

If this is a chat message, simply iterate over it's contents and call content.getText() to retrieve your payload.

Cheers,

from linphone-android.

LoyaiHai avatar LoyaiHai commented on June 9, 2024

Hi
@Viish
This can not be regarded as a chat information, should be said to be sent instructions, such as developed registration, login and exit in the entire message Body, the body attached to the parameters

704/5000
This can not be regarded as a chat information, should be said to be sent instructions, such as developed registration, login and exit in the entire message Body, the body attached to the parameters

I can get this information from pjsip as follows:
@OverRide
public void onInstantMessage(OnInstantMessageParam prm) {
super.onInstantMessage(prm);
DebugLogJava.e("onInstantMessage=======>prm: ");

if (prm ! = null) {
String contentType = prm.getContentType();
String contactUri = prm.getContactUri();
String msgBody = prm.getMsgBody();
DebugLogJava.e(" Here is the returned message ===>contentType:" + contentType);
DebugLogJava.e(" Here is the returned message ===>contactUri:" + contactUri);
DebugLogJava.e(" Here is the returned message ===>msgBody:" + msgBody);

sendBuddyMsg(contentType, contactUri, msgBody);
}
}
Thank you
@Viish

from linphone-android.

Viish avatar Viish commented on June 9, 2024

@LoyaiHai Sorry but I don't understand.
On one side you say this isn't a chat message, but using PJSIP you are relying on onInstantMesssage so it is a chat message.

That being said, you can do exactly the same as PJSIP using

from linphone-android.

LoyaiHai avatar LoyaiHai commented on June 9, 2024

@Viish
image
When I send a message to the terminal on the PC side, I find that I do not see the corresponding message return in the callback interface, may I ask this case, which step is wrong, does it mean that I want to receive a message from someone, must subscribe first?
Thank you

from linphone-android.

LoyaiHai avatar LoyaiHai commented on June 9, 2024

image

from linphone-android.

Viish avatar Viish commented on June 9, 2024

Did you add the CoreListener to the Core?

from linphone-android.

LoyaiHai avatar LoyaiHai commented on June 9, 2024

Hi
@Viish
I have set up core listening, as shown in the image below
image
image
image

from linphone-android.

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.