Linear android crash "Can't start linphone"
I am working on an android application using Linphone to make calls through this library.
I downloaded this: http://www.linphone.org/technical-corner/liblinphone/downloads (Liblinphone Android version 2.4.0)
I added it to the libs folder of my android project, it is present in the build path of the java project.
But when I run the app on my device I have 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 occurs? I must be missing something, but I cannot find it ...
Thank!
EDIT: I didn't say I was using this linphone.jar in the Cordova plugin.
source to share
I found the solution myself, I'm going to explain what I did. Maybe this can help someone in the future :)
First, I haven't added all the .so files required by liblinphone in the libs directory of the android project. After adding these files it was better, android app found lib.
Then I tried using LinphoneService and LinphoneManager (from lib), but these classes require some resources that I didn't have. It wasn't a good way to use liblinphone anyway. I am reusing the core LinphoneCore functions (used in LinphoneService / LinphoneManager) in my own android service: registration, listeners ... as described in this page: Liblinphone java interface
It builds correctly now and all my functions work like a charm!
source to share