I have to implement chat messaging using Android SIP client but unable to find any related classes or listener. I have already implemented calling feature using SIP.
Android provides an API that supports the Session Initiation Protocol (SIP). This lets you add SIP-based internet telephony features to your applications.
This lets you add SIP-based internet telephony features to your applications. Android includes a full SIP protocol stack and integrated call management services that let applications easily set up outgoing and incoming voice calls, without having to manage sessions, transport-level communication, or audio record or playback directly.
To receive calls, a SIP application must include a subclass of BroadcastReceiver that has the ability to respond to an intent indicating that there is an incoming call. Thus, you must do the following in your application:
If you’re ready to make the switch because it’s cheaper, easier, or more efficient, then we’ve got a list of the best apps for VoIP and SIP calls for you. Discord. Facebook Messenger. Google Duo. Grandstream Wave. magicApp. MizuDroid. Skype. Signal Private Messenger.
Use pjsip or Linphone opensource project.Both libraries are written using c code and well documented to build for android with sample application.
If you want pure java implementation of sip IM ,go for jainsip stack based implementation.Actually android default sip client is based on jainsip but it not support Im and only works in wifi.
Telestax implementation of jainsip helps to create apps for android.You can read this documentation for more details.Also a sample android implementation you can find here.
It seems like SIP IM is not implemented in the Android SIP client.
However you should be able to easily implement this yourself.
All you need to check is RFC 3428. Just check the example (search for "MESSAGE sip") and it should be obvious from here.
Another solution would be to use some other open-source SIP stack with SIP MESSAGE support.
To implement both call and messaging facility in Android app, you can implement through PJSIP.It has several set of libraries to implement new features. It has all VOIP functionalities to implement in android app.
The documentation to implement PJSIP in Android,
https://trac.pjsip.org/repos/wiki/Getting-Started/Android
The above link specifies, how to implement PJSIP in android platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With