symeonmattes / pjsip

Cordova plugin for the PJSIP library version 2.5.5.
Apache License 2.0
9 stars 7 forks source link

PjsipDiagnostic class missing #1

Closed diegomichel closed 6 years ago

diegomichel commented 6 years ago

Hello,

This class is not present in the project, is it part of another plugin?

PJSIP.java:52: error: cannot find symbol
import gr.navarino.cordova.plugin.PjsipDiagnostic;

Bests, Diego.

symeonmattes commented 6 years ago

Hi Diego,

probably I have missed this...It is supposed to give a diagnostic test for the pjsip but I have missed it. I need to check it in the project I have used it. Currently I don't have it...I'll check it on Monday and I'll let you know.

Kind Regards Symeon

2017-12-08 21:34 GMT+02:00 Diego Michel Rubio Ramirez < notifications@github.com>:

Hello,

This class is not present in the project, is it part of another plugin?

PJSIP.java:52: error: cannot find symbol import gr.navarino.cordova.plugin.PjsipDiagnostic;

Bests, Diego.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/symeonmattes/pjsip/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ACyWKKMtXyB6xYXMHJimJuwbhc9RcdO9ks5s-Y83gaJpZM4Q7i64 .

symeonmattes commented 6 years ago

Hi Diego,

I have fixed it...Could you check it again? The dignostic test you saw was something that I have used in my project. There were a list of diagnostic tests I have been doing to check different aspects of the application such as audio,ipaddres etc. These are not necessary to make the plugin work.

Cheers Symeon

2017-12-09 0:25 GMT+02:00 Symeon Mattes symeon.mattes@gmail.com:

Hi Diego,

probably I have missed this...It is supposed to give a diagnostic test for the pjsip but I have missed it. I need to check it in the project I have used it. Currently I don't have it...I'll check it on Monday and I'll let you know.

Kind Regards Symeon

2017-12-08 21:34 GMT+02:00 Diego Michel Rubio Ramirez < notifications@github.com>:

Hello,

This class is not present in the project, is it part of another plugin?

PJSIP.java:52: error: cannot find symbol import gr.navarino.cordova.plugin.PjsipDiagnostic;

Bests, Diego.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/symeonmattes/pjsip/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ACyWKKMtXyB6xYXMHJimJuwbhc9RcdO9ks5s-Y83gaJpZM4Q7i64 .

diegomichel commented 6 years ago

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.

symeonmattes commented 6 years ago

Hi,

I uploaded another version. After you install the plugin you will get the error:

package android.support.v4.app/content does not exist

To fix it open Android Studio and open the android project. If you're using an ionic project open the android under platforms project. It will ask you to upgrade gradle....I haven't done it but I suppose if accept it, it will not make any difference.

Then go to Project->right click on android->open module settings->dependencies->Add->Library dependency->com.android.support:support-v4:26.0.0-alpha1 (or something similar)->OK

Now it should be ok.

If you find a better solution please be free to change the plugin as you wish.

Kind Regards Symeon

2017-12-11 20:05 GMT+02:00 Diego Michel Rubio Ramirez < notifications@github.com>:

Hello @symeonmattes https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/symeonmattes/pjsip/issues/1#issuecomment-350807135, or mute the thread https://github.com/notifications/unsubscribe-auth/ACyWKHUf1UM_fM6YzjsTt0wBwJVuApLgks5s_W7igaJpZM4Q7i64 .

diegomichel commented 6 years ago

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.

symeonmattes commented 6 years ago

Hi,

Thanks for the advice....I believe that on an emulator it doesn't work...I have tried it without any success. It works fine though in real mobile devices. If you find any corrections feel free to change it.

Kind Regards Symeon

2017-12-12 18:44 GMT+02:00 Diego Michel Rubio Ramirez < notifications@github.com>:

Hello @symeonmattes https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/symeonmattes/pjsip/issues/1#issuecomment-351110420, or mute the thread https://github.com/notifications/unsubscribe-auth/ACyWKC0HIVeU1R8VJYuK_aBqI3yxq5Fvks5s_q13gaJpZM4Q7i64 .

diegomichel commented 6 years ago

Hello @symeonmattes,

You are right just tested on a device and it does work. Thanks a lot!.