SipApi not supported by some device - android

I am using native sip apis to implement sip calling in android app and it is working fine but in some devices like CANVAS 3 it was not working .After debugging I found this line of code was returning NULL
**manager = SipManager.newInstance(ctx);**
That measns that device does not support Sip Apis.But on the same device other application for sipcalling like SipDroid etc are working properly.How it is possible ?Are they do not use native sip Apis???

you can go with custom SipLibraries.
Third party open source sip stacks library for Android
Jain sip: http://jsip.java.net/
Pjsip: http://www.pjsip.org/
Mjsip: http://mjsip.org/mjua.html
Doubango: http://www.doubango.org/
There are different open source projects which have used these libraries in their projects.
Jain sip: Not used in a "famous" app.
Sipdroid uses MjSip
Csipsimple uses PjSip
Imsdroid uses doubango.
Open source SIP stacks: Android SDK's default implementation (API > 9)
Advantages : Documentation available. Easy to understand.
Disadvantages : Not all devices are supported due carriers restriction. Works on WiFi only. Can't change codecs.
Third party: JainSIP
Advantages : Oracle (Sun) project ==> Active development. Looks easier than MjSIP (more documentation).
Disadvantages : None
Android 2.3 using external JAIN-SIP(J-SIP) Stack | Classpath
Third party: MjSIP
Advantages : SipDroid is built on it. (source code available) (red5phone is another project)
Disadvantages : Not fully compliant with RFC?. Lack of tutorials (Javadocs available though).Development almost dead
Third party: Doubango framework
Advantages : IMSDroid is built on it. (source code available)
Disadvantages : Generated apk file size tend to be "heavy" (>15MB as mentioned here)
Followed from

Just to complement SilentKiller response I would forward my answer to this question but, please, keep in mind that choosing a stack is a quite complex task and depends of your goals and preferences.
Android SIP Stack relays on an old JAIN SIP version plus some extensions (IMS, supporting RTP, etc.). Main problem with this stack is that, in most devices, it only works via WiFi, no 3G or LTE (note that android.net.sip.SipManager contains method isSipWifiOnly to know if this limitation is enabled).
On the other hand, pjsip is quite complete, like they say, it's not a SIP stack but a full multimedia communications library. It's really versatile: you can use a huge number of configuration or just run it as a simple user agent. It works with any kind of data connection (not limited to WiFi).
Now the comparison: In my opinion, pjsip is more complete and versatile but more difficult to integrate with you project (with Android SIP Stack everything remains in the SDK environment while, with pjsip, you would need to use the NDK and a JNI library).
My opinion: If you plan to create a very simple SIP app and you don't mind the WiFi limitation, I think, the best would be using native SIP API but, if you plan to improve it and do something more "interesting", I would strongly recommend pjsip. I've used both JAIN SIP and pjsip and, again, my vote goes for psip. But this is just my opinion.
There's also another third party stack that worths checking: Linphone. It is also integrated into your project with a JNI (like pjsip) and is also quite complete but, maybe, a bit more complex and heavy.
Hope this helps.

Related

Android SIP with CSipSimple and pjsip

I am writing a custom Android application that allows the user to make VOIP calls using SIP. When the user presses a button, a voice call is initiated with another SIP user. That's it. The only other requirements are that it has to work on 2.3+ Android devices and must not be limited to wifi only.
Android already includes a SIP stack (as of 2.3) and I was able to modify the Walkie-Talkie sample project to work exactly how I wanted it to. Unfortunately I was not able to use this app with certain devices (Casio Commando being one of them), and worse, the application only works over wifi (as I mentioned, unacceptable for my project).
I started searching for another SIP stack with an easy to use API and came across CSimpleSip. I compiled it and ran their demo project (SipHome) and it worked perfectly on my unsupported phones (including the Commando) and it also worked over wifi, satisfying my requirements. I was so excited... until I looked at the source code for CSipSimple. I have no idea how to begin extracting out the actual calls to the underlying pjsip API, nor was I able to get the pjsip demo application working after 10+ hours.
Has anyone deconstructed CSipSimple and separated out the SIP parts from their incredibly complicated UI, or does anyone know of a simpler to use SIP library? With the native SIP API I was able to make a 200 line Android activity that made the call perfectly... how can I accomplish this with a third party SIP stack that supports non-wifi?
Thanks for any input, I know quite a few people have gotten stuck at this same stage.
Instead of going for the more complicated CSipSimple, you should maybe attack the most basic apjsua, which runs the same pjsip stack, so it should hopefully fit your requirements too: http://trac.pjsip.org/repos/wiki/Getting-Started/Android.
I totally agree with Balint, apjsua is the app which helps you for a better understanding, however it may be not obvious to start with it when you're not familiar with C (like I was) but it's much more efficient this way.
You can take a look to www.pjsip.org, take just care about the package you'll download because the tutorial isn't so clear: for instance they talk you a lot about apjsua (the android implementation of pjsua) and this app is not included in the download link they provide, you can see my question here about that:
where's apjsua?
And of course you'll have to watch the tutorial for android in the pjsip website.
Hope this helps.
Use csipsimple as a library project.There is a api in csipsimple project for using it as library.You can bind to csipsimple service and make calls.
Register broadcastrecievers and intent filters for get call back from csipsimple. Analyse Incall activity in csipsimple for more details.

how can we implement CAN Application Layer(CAL) protocol in iphone/android

I need to interface a device which is supporting CANBus ,So for communication with that I need to follow CAL,So can any one help that ho can I implement
CAN Application Layer(CAL) protocol in iphone/android .
Please help i am not getting any way to solve it
"I need to interface a device which is supporting CANBus ,So for
communication with that I need to follow CAL"
The second part of that statement doesn't follow necessarily from the first. There are plenty of devices and systems that communicate via a CAN bus that don't use a formal higher level application framework.
First, you need to be able to communicate with the can bus from your application. Your mentioning iphones suggests you'll be targeting consumer handsets, none of which will have a CAN interface. So you need to incorporate some adapter hardware (there are usb adapters, and android at least has usb hardware access baked into the SDK).
If you do then also need to communicate with components that implement a higher level application framework like CANopen on top of the CAN layer, your options are:
Get your hands on the specification from whatever group maintains
it, and implement it in your language and framework of choice. This is likely a substantial effort.
Purchase or find an open source implementation. If you purchase the source code for a C implementation, you can compile it into a shared library for your target architecture, and, using android as an example, write a native wrapper for that shared library using the Android NDK to expose it to your java code. If you could purchase the source code for a java implementation, you might be able to port it so that it works natively on android.
Then you need to glue the data layer together with the application layer, and this will likely be custom development no matter what.
You need the hardware to support it. I've found Gwentech's GT1026 to work well for can bus to android, but it only works on Android using USB.

SipManager.isApiSupported() and SipManager.isVoipSupported() returning false

Is there any configuration to enable VOIP on device? Or these methods really show that my device does not support VOIP?
I think this is a little late to answer, but after a lot of searching, I reached the fact that you are supposed to use any SipStack, because as explained here:
Fusion SIP source code is specifically designed for use in embedded
devices, has a small footprint and is completely ROMable and
re-entrant. The Fusion SIP stack provides a simplified API for easy
integration with the application and transport stack (TCP/IP/UDP).
and when talking about android specifically, as explained in the answer of this question:
All Android devices, which can connect to the Internet, support SIP.
After all SIP is just a protocol which requires connection to the
Internet, and it's very similar to HTTP.
In order to work with SIP, you need SIPStack implementation - doesn't
matter if it's 3rd party or it comes from Android API.
and about examples of SipStacks that can be used, you will find a punch of them like PJSIP and Doubango, and all exists in this question.

Where can I find some documentation for BlueZ?

I am developing an android application for an embedded device that uses android 2.1. The bluetooth protocol stack is bluez. I cannot find any documentation related to bluez, and the source code is quite hard to read as it is not commented at all! There seems to have been a bluez wiki, but that site has been down for some time now...
Any help regarding where I might be able to find any help/documentation regarding how the bluez stack functions will be appreciated.
Thanks!
Actually not all Android devices use BlueZ stack as the underline bluetooth stack. It would be a good idea to stick with Android SDK bluetooth API if you want portability.
This being said, http://people.csail.mit.edu/albert/bluez-intro/ is a nice bluez tutorial.
Aniruddha, you may want to try using DBus Interface to invoke BlueZ APIs.
For the official BlueZ documentation you can obtain it from their git site:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
For additional information you can visit BlueZ site: http://www.bluez.org/
Depending on the platform you're using you may need to use D-Bus. There are a lot of different D-Bus libraries depending on which language you're using. I will warn that using BlueZ directly has a high learning curve and requires some knowledge of the Bluetooth specification.
For Android I would recommend using the Bluetooth classes that are packaged with the Android Platform API if possible.
For Android application you should refer to the Android APIs.
http://developer.android.com/reference/android/bluetooth/package-summary.html
Application need not know the underlying BlueZ libraries and its functionalities

Implemenation of SIP on android platform 2.1

I want to work on SIP and Android. I am supposed to make it possible for two users to call eachother using iptel.org. One way to do this, I can use the demo provided with 2.3 but it needs a real device. As I don't have a real device, I wan't to work at 2.1 platform. I am a beginner, so I need a good step to start so that it would be easy for me to complete it.
PJSIP ( http://www.pjsip.org/) is a good and portable SIP framework. It doesn't still have support for android (even if it is just a matter of time) but you could check out this : http://code.google.com/p/csipsimple/ that is android SIP support built on PJSIP.
Android 2.1 doesn't have built-in support for SIP so you have to find a third party library.
JAIN-SIP http://jsip.java.net/ is also a very good SIP-Stack including a reference implementation of the SIP API.
It works on great on Android <= 2.2.
Here's (http://groups.google.com/group/mobicents-public/browse_thread/thread/e38fbdd874083d49/4fdb4123419e7a74) a nice discussion with further information.

Categories

Resources