Comments (7)
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.
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.
@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
- https://download.linphone.org/releases/docs/liblinphone/latest/java/org/linphone/core/CoreListener.html#onMessageReceived(org.linphone.core.Core,org.linphone.core.ChatRoom,org.linphone.core.ChatMessage)
- https://download.linphone.org/releases/docs/liblinphone/latest/java/org/linphone/core/ChatMessage.html#getContents()
- https://download.linphone.org/releases/docs/liblinphone/latest/java/org/linphone/core/Content.html#getType()
etc...
from linphone-android.
@Viish
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.
from linphone-android.
Did you add the CoreListener to the Core?
from linphone-android.
Hi
@Viish
I have set up core listening, as shown in the image below
from linphone-android.
Related Issues (20)
- change speakers and microphones HOT 2
- change Speaker and Blue tooth HOT 1
- I have a question about Offline HOT 1
- setDisplayName does not appear to work HOT 1
- CVE-2023-5217 - update libvpx to 1.13.1 HOT 2
- linphone on android, stops connect automatically at startup after few days HOT 3
- Call is terminated If no RTP packet is received within 30 seconds HOT 1
- Inquiry on Adding Codec Attributes to SIP INVITE in Linphone Android SDK HOT 1
- How to turn on the sound when dialing a number? HOT 8
- Configure SMS in Linphone-Android HOT 3
- Conflicts with whether linphone will run exosip? HOT 3
- Questions about the IM receiving interface HOT 4
- Linphone Android Issue Report - Sound Progress Indicator and Playback Speed Control HOT 3
- linphone implements background video surveillance HOT 6
- Enhancement: Show the DID / phone number an incoming call is calling in on - for users who are using Linphone with multiple lines HOT 2
- Problem with transferring photos over 10 mb. HOT 8
- Crash during attaching photo when file size >10MB HOT 1
- How do I set up two controls to display the front and rear cameras separately HOT 3
- Call terminate without Ring continue. HOT 8
- The standards for strong insertion and disassembly of SIP? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linphone-android.