Linphone android crash "Cannot start linphone"

1.4k views Asked by At

I'm working on an android application using Linphone in order to make calls through this library.

I've downloaded this : http://www.linphone.org/technical-corner/liblinphone/downloads (Liblinphone Android version 2.4.0)

I've added it to the libs folder of my android project, it is present in the project java build path.

But when I launch the app on my device, I've got this error log :

Cannot start linphone
android.content.res.Resources$NotFoundException: Resource ID #0x7f060002
at android.content.res.Resources.getValue(Resources.java:1125)
at android.content.res.Resources.openRawResource(Resources.java:1040)
at android.content.res.Resources.openRawResource(Resources.java:1017)
at org.linphone.LinphoneManager.copyFromPackage(LinphoneManager.java:569)
at org.linphone.LinphoneManager.copyAssetsFromPackage(LinphoneManager.java:555)
at org.linphone.LinphoneManager.startLibLinphone(LinphoneManager.java:443)
at org.linphone.LinphoneManager.createAndStart(LinphoneManager.java:208)

Any idea why this error is raised ? I should miss something but I can't find it ...

Thanks !

EDIT : I've not said that I'm using this linphone.jar in a Cordova plugin.

2

There are 2 answers

2
Bastien On BEST ANSWER

I've found the solution by myself, I'm gonna explain what I've done. Maybe it could be help someone in the future :)

First, I've had not added all .so files needed for the liblinphone in the libs directory of the android project.After adding these files, it was better, the android app found the lib.

Then, I tried to use LinphoneService and LinphoneManager (of the lib), but these classes require some resources that I didn't have. Anyway, this was not a good way to use the liblinphone. I've reuse the basic features of LinphoneCore (used in LinphoneService / LinphoneManager) in my own android service : registration, listeners ... as described on this page : Liblinphone java interface

Now it builds correctly, and all my features work like a charm !

5
Ashish Nijai On

@bastien, Please install linphone from playstore.

I had installed on many android devices. It works nicely!!!