1

I am trying to integrate sinch sdk in my app, I was using it before for audio calls as jar files with no problem

no I am trying to implement video chat and trying to integrate .aar file

I am getting this crash when the app start

    Failed to register native method org.webrtc.sinch.voiceengine.WebRtcAudioManager.nativeCacheAudioParameters(IIZZZZIIJ)V in /data/app/com.forsale.forsale-1/split_lib_dependencies_apk.apk:classes80.dex
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art: ----- class 'Lorg/webrtc/sinch/voiceengine/WebRtcAudioManager;' cl=0x12cf3c80 -----
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      0: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isLowLatencyInputSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      0: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.<clinit>()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      1: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.<init>(android.content.Context, long)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      2: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.assertTrue(boolean)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      3: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.dispose()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      4: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getLowLatencyInputFramesPerBuffer()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      5: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getLowLatencyOutputFramesPerBuffer()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      6: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getMinInputFrameSize(int, int)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      7: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getMinOutputFrameSize(int, int)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      8: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getNativeOutputSampleRate()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      9: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.getSampleRateOnJellyBeanMR10OrHigher()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     10: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.hasEarpiece()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     11: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.init()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     12: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isAcousticEchoCancelerSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     13: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isAutomaticGainControlSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     14: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isCommunicationModeEnabled()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     15: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isDeviceBlacklistedForOpenSLESUsage()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     16: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isLowLatencyOutputSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     17: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isNoiseSuppressorSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     18: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isOpenSLESSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     19: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.isProAudioSupported()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     20: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.nativeCacheAudioParameters(int, int, boolean, boolean, boolean, boolean, boolean, int, int, long)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     21: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(boolean)
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     22: void org.webrtc.sinch.voiceengine.WebRtcAudioManager.storeAudioParameters()
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      0: java.lang.String[] org.webrtc.sinch.voiceengine.WebRtcAudioManager.AUDIO_MODES
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      1: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.BITS_PER_SAMPLE
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      2: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.CHANNELS
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      3: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.DEBUG
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      4: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.DEFAULT_FRAME_PER_BUFFER
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      5: java.lang.String org.webrtc.sinch.voiceengine.WebRtcAudioManager.TAG
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      6: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.blacklistDeviceForOpenSLESUsage
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      7: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.blacklistDeviceForOpenSLESUsageIsOverridden
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      0: android.media.AudioManager org.webrtc.sinch.voiceengine.WebRtcAudioManager.audioManager
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      1: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.channels
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      2: android.content.Context org.webrtc.sinch.voiceengine.WebRtcAudioManager.context
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      3: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.hardwareAEC
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      4: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.hardwareAGC
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      5: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.hardwareNS
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      6: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.initialized
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      7: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.inputBufferSize
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      8: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.lowLatencyOutput
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:      9: long org.webrtc.sinch.voiceengine.WebRtcAudioManager.nativeAudioManager
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     10: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.nativeChannels
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     11: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.nativeSampleRate
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     12: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.outputBufferSize
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     13: boolean org.webrtc.sinch.voiceengine.WebRtcAudioManager.proAudio
03-27 18:23:57.461 3461-3839/com.forsale.forsale E/art:     14: int org.webrtc.sinch.voiceengine.WebRtcAudioManager.sampleRate
03-27 18:23:57.461 3461-3839/com.forsale.forsale W/System.err: java.lang.NoSuchMethodError: no static or non-static method "Lorg/webrtc/sinch/voiceengine/WebRtcAudioManager;.nativeCacheAudioParameters(IIZZZZIIJ)V"
03-27 18:23:57.571 3840-3840/? A/google-breakpad: M CBB00000 00000000 004DE000 039413E9B0F86DA6F9188EB6CE78A4F30 libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #05 pc 0026034b  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #06 pc 002fc21b  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #07 pc 0014a15f  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #08 pc 00149b29  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #09 pc 000d12a4  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #10 pc 00052ba4  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #11 pc 000d51a4  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #12 pc 0025e247  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #13 pc 00252583  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #14 pc 0025e359  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so
03-27 18:23:57.711 3137-3137/? A/DEBUG:     #15 pc 0025e13d  /data/app/com.forsale.forsale-1/lib/arm/libsinch-android-rtc.so

can anyone help me please?

Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175
  • aar doesn't include dependencies .. its looks like its searching for classes he cant find maybe an SO file. – Itzik Samara Mar 27 '17 at 16:33
  • I have tried to follow sinch documentation in the following link : https://www.sinch.com/docs/video/android/ – Amira Elsayed Ismail Mar 27 '17 at 16:34
  • Any warnings from Gradle? – cjensen Mar 27 '17 at 16:48
  • no, I follow the documentation, method1: add aar file and then copy and paste instruction to my gradle file it produce same crash, method2: import aar file as new module also produce same crash – Amira Elsayed Ismail Mar 28 '17 at 10:55
  • @AmiraElsayedIsmail what architecture are you using when running the app. I know sinch currently has a issue where the x86 architecture's .so file isn't included in their aar file. If you are using a x86 emulator try switching to a x86_64 one. That fixed is for me. – BW Müller May 02 '17 at 09:13

1 Answers1

0

sinchClient.setSupportActiveConnectionInBackground(true); sinchClient.startListeningOnActiveConnection();

  • 3
    Hi and welcome to SO! Please elaborate what this does and how it helps to solve the problem. – quinz Aug 23 '19 at 11:44