Comments (7)
from pjsip.
from pjsip.
Hello @symeonmattes,
Thanks, that error is fixed but still getting others:
src/gr/navarino/cordova/plugin/PJSIP/PjsipActions.java:62: error: cannot find symbol return pjsipActivity.isConnected();
symbol: method isConnected()
location: variable pjsipActivity of type PjsipActivity
/Users/diego/testpjsipcordova/voiptest/platforms/android/src/gr/navarino/cordova/plugin/PJSIP/P
jsipActions.java:89: error: incompatible types: Boolean cannot be converted to String
return pjsipActivity.connect(user,pass,domain,proxy, callbackContext);
^
/Users/diego/testpjsipcordova/voiptest/platforms/android/src/gr/navarino/cordova/plugin/PJSIP/P
jsipActions.java:94: error: incompatible types: void cannot be converted to String
return pjsipActivity.disconnect(callbackContext);
Bests,
Diego.
from pjsip.
from pjsip.
Hello @symeonmattes,
To solve the v4 issue I just add this plugin:
cordova plugin add cordova-plugin-android-support-v4-jar
Also, the plugin doesn't work out of the box because of the sounds of ionic framework.
Everything seems to work now until I try to run it on the emulator, it just crashes here is an extract from adb logcat:
D/PluginManager( 3088): init()
E/art ( 3088): dlopen("/data/app/io.ionic.starter-1/lib/x86/libpjsua2.so", RTLD_LAZY) faile
d: dlopen failed: could not load library "libopenh264.so" needed by "libpjsua2.so"; caused by l
ibrary "libopenh264.so" not found
E/PjSip ( 3088): UnsatisfiedLinkError: dlopen failed: could not load library "libopenh264.so"
needed by "libpjsua2.so"; caused by library "libopenh264.so" not found
D/PJSIP ( 3088): constructor
D/PJSIP ( 3088): initialize
E/art ( 3088): dlopen("/data/app/io.ionic.starter-1/lib/x86/libpjsua2.so", RTLD_LAZY) faile
d: dlopen failed: could not load library "libopenh264.so" needed by "libpjsua2.so"; caused by l
ibrary "libopenh264.so" not found
D/AndroidRuntime( 3088): Shutting down VM
--------- beginning of crash
E/AndroidRuntime( 3088): FATAL EXCEPTION: main
E/AndroidRuntime( 3088): Process: io.ionic.starter, PID: 3088
E/AndroidRuntime( 3088): java.lang.UnsatisfiedLinkError: dlopen failed: could not load library
"libopenh264.so" needed by "libpjsua2.so"; caused by library "libopenh264.so" not found
E/AndroidRuntime( 3088): at java.lang.Runtime.loadLibrary(Runtime.java:371)
E/AndroidRuntime( 3088): at java.lang.System.loadLibrary(System.java:989)
E/AndroidRuntime( 3088): at gr.navarino.cordova.plugin.MyApp.(MyApp.java:76)
E/AndroidRuntime( 3088): at gr.navarino.cordova.plugin.PjsipActivity.initialise(PjsipAct
ivity.java:98)
E/AndroidRuntime( 3088): at gr.navarino.cordova.plugin.PjsipActions.initialise(PjsipActi
ons.java:75)
E/AndroidRuntime( 3088): at gr.navarino.cordova.plugin.PJSIP.initialize(PJSIP.java:122)
E/AndroidRuntime( 3088): at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPl
ugin.java:57)
E/AndroidRuntime( 3088): at org.apache.cordova.PluginManager.getPlugin(PluginManager.jav
a:171)
E/AndroidRuntime( 3088): at org.apache.cordova.PluginManager.startupPlugins(PluginManage
r.java:97)
E/AndroidRuntime( 3088): at org.apache.cordova.PluginManager.init(PluginManager.java:86)
E/AndroidRuntime( 3088): at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImp
l.java:115)
E/AndroidRuntime( 3088): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java
:149)
E/AndroidRuntime( 3088): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.j
ava:224)
E/AndroidRuntime( 3088): at io.ionic.starter.MainActivity.onCreate(MainActivity.java:39)
E/AndroidRuntime( 3088): at android.app.Activity.performCreate(Activity.java:5937)
E/AndroidRuntime( 3088): at android.app.Instrumentation.callActivityOnCreate(Instrumenta
tion.java:1105)
E/AndroidRuntime( 3088): at android.app.ActivityThread.performLaunchActivity(ActivityThr
ead.java:2251)
E/AndroidRuntime( 3088): at android.app.ActivityThread.handleLaunchActivity(ActivityThre
ad.java:2360)
E/AndroidRuntime( 3088): at android.app.ActivityThread.access$800(ActivityThread.java:14
4)
E/AndroidRuntime( 3088): at android.app.ActivityThread$H.handleMessage(ActivityThread.ja
va:1278)
E/AndroidRuntime( 3088): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 3088): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 3088): at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime( 3088): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3088): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 3088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Z
ygoteInit.java:899)
E/AndroidRuntime( 3088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
W/ActivityManager( 1523): Force finishing activity io.ionic.starter/.MainActivity
If I try to find the library on the project this comes up:
find . -name "libopenh264.so"
./node_modules/cordova.plugins.PJSIP/src/android/jniLibs/x86/libopenh264.so
./plugins/gr.navarino.PJSIP/src/android/jniLibs/x86/libopenh264.so
Looks like Cordova is not copying the libraries over to the platform/android tree :). Not all of them anyways.
➜ ionicapp git:(master) ✗ cd platforms/android/libs
➜ libs git:(master) ✗ tree
.
├── android-support-v4.jar
├── armeabi
│ └── libpjsua2.so
└── x86
└── libpjsua2.so
Bests,
Diego.
from pjsip.
from pjsip.
Hello @symeonmattes,
You are right just tested on a device and it does work. Thanks a lot!.
from pjsip.
Related Issues (8)
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 pjsip.