Android App crashing

Discussion in 'Web Call Server 5' started by Mohammad Adil, May 15, 2019.

  1. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    I am using android aar in a seperate project and have compiled the project successfully. I am successfully able to connect to the server. I am successfully joining in the room. But when i press publish the app crashing. In the log cat i am getting the following error.

    Process: smartgen.digital.flashphonertest, PID: 25659
    java.lang.BootstrapMethodError: Exception from call site #6 bootstrap method
    at org.webrtc.EglRenderer.init(EglRenderer.java:217)
    at org.webrtc.EglRenderer.init(EglRenderer.java:244)
    at org.webrtc.SurfaceEglRenderer.init(SurfaceEglRenderer.java:61)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:87)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:71)
    at com.flashphoner.fpwcsapi.util.Utils.initRenderer(Utils.java:133)
    at com.flashphoner.fpwcsapi.session.Stream.publish(Stream.java:92)
    at com.flashphoner.fpwcsapi.room.Room.publishInternal(Room.java:117)
    at com.flashphoner.fpwcsapi.room.Room.publish(Room.java:93)
    at smartgen.digital.flashphonertest.MainActivity.onRequestPermissionsResult(MainActivity.java:631)
    at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7941)
    at android.app.Activity.dispatchActivityResult(Activity.java:7763)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4598)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4647)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7045)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
    Caused by: java.lang.ClassCastException: Bootstrap method returned null
    at org.webrtc.EglRenderer.init(EglRenderer.java:217)
    at org.webrtc.EglRenderer.init(EglRenderer.java:244)
    at org.webrtc.SurfaceEglRenderer.init(SurfaceEglRenderer.java:61)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:87)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:71)
    at com.flashphoner.fpwcsapi.util.Utils.initRenderer(Utils.java:133)
    at com.flashphoner.fpwcsapi.session.Stream.publish(Stream.java:92)
    at com.flashphoner.fpwcsapi.room.Room.publishInternal(Room.java:117)
    at com.flashphoner.fpwcsapi.room.Room.publish(Room.java:93)
    at smartgen.digital.flashphonertest.MainActivity.onRequestPermissionsResult(MainActivity.java:631)
    at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7941)
    at android.app.Activity.dispatchActivityResult(Activity.java:7763)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4598)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4647)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7045)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)


    Kindly assist.

    Thanks
    Mohammad Adil
  2. Max

    Max Administrator Staff Member

    Good day.
    Please check if the problem still persists with latest Android SDK build and latest server build. Note that there are two versions, 1.0 for Android 8 and older and 1.1 for Android 9 and newer.
    Also check if the problem still persists with Conference and Streamin-min applications build from GitHub sources.
    If yes please clarify your test phone details: model, firmware, Android version, if some shell used (MIUI, EMUI, so on).
  3. Mohammad Adil

    Mohammad Adil New Member

    Hi,
    I have downloaded the latest aar file and linked it to my project. The same error is occurring on publish button click. Here are the specs of my device on which i am debugging the code.
    Mobile: Samsung galaxy S8
    Model no: SM-G950FD
    Android version: 9

    Android studio version is 3.4.

    The sdk downloaded is from the following link
    http://flashphoner.com/downloads/builds/flashphoner_client/wcs-android-sdk/aar

    Version of the sdk used is wcs-android-sdk-1.1.0.7.aar.

    You can download my project from the following link.
    https://www.dropbox.com/s/x6rks5156lzsxyr/FlashPhonerTest.rar?dl=0


    Your assistance will be highly appreciated.

    Thanks
    Mohammad Adil
    Last edited: May 16, 2019
  4. Max

    Max Administrator Staff Member

    Good day.
    Please build example application Conference from source using this instructions and check if the problem with stream publishing from these applications reproduced on your device. If not please check your application code using example application.
  5. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    I have tried all the steps and successfully opened the code. When i am making the project i am getting this error.

    Cause: compileSdkVersion is not specified.

    Below is the log cat logs.

    Caused by: java.lang.IllegalStateException: compileSdkVersion is not specified.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:456)
    at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:690)
    at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:650)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:646)
    at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1$1.run(DefaultListenerBuildOperationDecorator.java:150)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:58)
    at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:147)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
    at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction.execute(DefaultListenerBuildOperationDecorator.java:144)
    at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
    at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
    at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
    at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
    at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
    at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy29.afterEvaluate(Unknown Source)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:190)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:187)
    at org.gradle.api.internal.project.DefaultProject.stepEvaluationListener(DefaultProject.java:1419)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:196)
    ... 108 more

    Kindly assist.

    Thanks
    Mohammad Adil
  6. Max

    Max Administrator Staff Member

    You probably missed point 3 on Preparing examples for building step. You should run export.sh script to prepare environment for examples building:
    Code:
    ./export.sh wcs-android-sdk-1.1.0.x.aar
  7. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    I have ran the command as instructed. But in the output folder only one folder is present named as webview example. This is the output in the console after executing the command.

    Administrator@Shahan MINGW64 /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export (master)
    $ ./export.sh wcs-android-sdk-1.1.0.7.aar
    export_samples
    Detected sdk v1.1
    Export sample: streaming-min
    export_sample SAMPLE_DIR_NAME: streaming-min
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/streaming-min'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/streaming-min
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/streaming-min
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: streamer
    export_sample SAMPLE_DIR_NAME: streamer
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/streamer'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/streamer
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/streamer
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: player
    export_sample SAMPLE_DIR_NAME: player
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/player'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/player
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/player
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: 2players
    export_sample SAMPLE_DIR_NAME: 2players
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/2players'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/2players
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/2players
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: media-devices
    export_sample SAMPLE_DIR_NAME: media-devices
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/media-devices'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/media-devices
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/media-devices
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: stream-recording
    export_sample SAMPLE_DIR_NAME: stream-recording
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/stream-recording'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/stream-recording
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/stream-recording
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: conference
    export_sample SAMPLE_DIR_NAME: conference
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/conference'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/conference
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/conference
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: phone-min
    export_sample SAMPLE_DIR_NAME: phone-min
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/phone-min'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/phone-min
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/phone-min
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: phone-min-video
    export_sample SAMPLE_DIR_NAME: phone-min-video
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/phone-min-video'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/phone-min-video
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/phone-min-video
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: click-to-call
    export_sample SAMPLE_DIR_NAME: click-to-call
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/click-to-call'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/click-to-call
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/click-to-call
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: video-chat
    export_sample SAMPLE_DIR_NAME: video-chat
    cp: cannot stat '/d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/video-chat'$'\r': No such file or directory
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/video-chat
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStu/build.gradleid-sdk-samples/export/output/video-chat
    sed: can't read /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/expor/build.gradle: No such file or directory
    Export sample: webview-example
    export_sample SAMPLE_DIR_NAME: webview-example
    DEST_DIR: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/webview-example
    remove_dependency_from_build_file SAMPLE_GRADLE: /d/Developer/ProjectsAndroidStudio/wcs-android-sdk-samples/export/output/webview-example/build.gradle
    export_sdk_lib
    export_build_configs


    Attached is the screenshot of the output folder and behind is the git console.
    Kindly assist.

    Thanks
    Mohammad Adil

    Attached Files:

  8. Max

    Max Administrator Staff Member

    Good day.
    Please check if the folders listed in export/export_list file exist in folder wcs-android-sdk-samples. If not, please download examples again:
    Code:
    git clone -b 1.1 git@github.com:flashphoner/wcs-android-sdk-samples.git
  9. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    Yes the folders do exist. Screenshot attached for reference.

    Thanks
    Mohammad Adil

    Attached Files:

  10. Max

    Max Administrator Staff Member

    It seems like line endings in export_list file was converted to CRLF while cloning project from GitHub. Please check your Git settings, it should be
    Code:
    git config --global core.autocrlf false
    then download examples again or save export_list file with Unix-style line endings (LF). Far Manager internal editor can do it, for example.
  11. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    Thank you for your assistance. We were successfully able to compile the projects. However when we are running the conference demo on our android device, The voice of other publishers are coming in the ear speaker, not in the main speaker of the mobile phone.

    Device information:
    Mobile: Samsung galaxy S8
    Model no: SM-G950FD
    Android version: 9

    Kindly assist.

    Thanks
    Mohammad Adil
  12. Max

    Max Administrator Staff Member

    Good day.
    We've reproduced the issue with Samsung phone (Android 9, OneUI 1.0). We will check if output device can be switched (internal ticket WCS-2093).
    Note that output device can be switched in web applications in Chrome browser as described here.
  13. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    Thank you for all your assistance.

    I have taken a new fresh project and successfully implemented the aar in it. I have put three buttons. Connect, Disconnect, Join and publish.

    OnCreate of the activity i am initializing the FlashPhoner lib.

    On connect button i have written.
    RoomManagerOptions roomManagerOptions = new RoomManagerOptions("wss://wcs5-eu.flashphoner.com:8443","testUser");
    roomManager = Flashphoner.createRoomManager(roomManagerOptions);

    This is executing perfectly fine. I am successfully connected to the room. Receiving the events of Connected and disconnected.

    When i am pressing join it is done successfully. When i am asking for the permission of the camera and granting it then i call the following code.

    StreamOptions streamOptions = new StreamOptions();
    streamOptions.setRecord(false);
    stream = room.publish(localRenderer, streamOptions);

    The application is crashing on room.publish line giving the below error in the logcat.

    2019-06-17 22:56:07.131 10106-10106/? E/Zygote: isWhitelistProcess - Process is Whitelisted
    2019-06-17 22:56:07.134 10106-10106/? E/Zygote: accessInfo : 1
    2019-06-17 22:56:14.245 10106-10106/SmartGen.Digital.flashphonertest E/AndroidRuntime: FATAL EXCEPTION: main
    Process: SmartGen.Digital.flashphonertest, PID: 10106
    java.lang.BootstrapMethodError: Exception from call site #6 bootstrap method
    at org.webrtc.EglRenderer.init(EglRenderer.java:217)
    at org.webrtc.EglRenderer.init(EglRenderer.java:244)
    at org.webrtc.SurfaceEglRenderer.init(SurfaceEglRenderer.java:61)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:87)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:71)
    at com.flashphoner.fpwcsapi.util.Utils.initRenderer(Utils.java:133)
    at com.flashphoner.fpwcsapi.session.Stream.publish(Stream.java:92)
    at com.flashphoner.fpwcsapi.room.Room.publishInternal(Room.java:117)
    at com.flashphoner.fpwcsapi.room.Room.publish(Room.java:93)
    at SmartGen.Digital.flashphonertest.MainActivity$4.run(MainActivity.java:169)
    at android.app.Activity.runOnUiThread(Activity.java:6404)
    at SmartGen.Digital.flashphonertest.MainActivity.onRequestPermissionsResult(MainActivity.java:164)
    at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7941)
    at android.app.Activity.dispatchActivityResult(Activity.java:7763)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4598)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4647)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7045)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
    Caused by: java.lang.ClassCastException: Bootstrap method returned null
    at org.webrtc.EglRenderer.init(EglRenderer.java:217)
    at org.webrtc.EglRenderer.init(EglRenderer.java:244)
    at org.webrtc.SurfaceEglRenderer.init(SurfaceEglRenderer.java:61)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:87)
    at org.webrtc.SurfaceViewRenderer.init(SurfaceViewRenderer.java:71)
    at com.flashphoner.fpwcsapi.util.Utils.initRenderer(Utils.java:133)
    at com.flashphoner.fpwcsapi.session.Stream.publish(Stream.java:92)
    at com.flashphoner.fpwcsapi.room.Room.publishInternal(Room.java:117)
    at com.flashphoner.fpwcsapi.room.Room.publish(Room.java:93)
    at SmartGen.Digital.flashphonertest.MainActivity$4.run(MainActivity.java:169)
    at android.app.Activity.runOnUiThread(Activity.java:6404)
    at SmartGen.Digital.flashphonertest.MainActivity.onRequestPermissionsResult(MainActivity.java:164)
    at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7941)
    at android.app.Activity.dispatchActivityResult(Activity.java:7763)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4598)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4647)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7045)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)


    Your assistance will be highly appreciated.

    Thanks
    Mohammad Adil
  14. Max

    Max Administrator Staff Member

    Good day.
    Please check if localRenderer is initialized correctly at the moment you call
    Code:
    stream = room.publish(localRenderer, streamOptions);
    See this code for example.
    Also,
    Code:
    streamOptions.setRecord(false);
    is not necessary because false is the default state for this option.
  15. Mohammad Adil

    Mohammad Adil New Member

    Hi there,

    Here is the code i am running on the OnState event of the room class.

    localRenderer = (SurfaceViewRenderer) findViewById(R.id.local_video_view);
    PercentFrameLayout localRenderLayout = (PercentFrameLayout) findViewById(R.id.local_video_layout);
    localRenderLayout.setPosition(0, 0, 100, 100);
    localRenderer.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);
    localRenderer.setMirror(true);
    localRenderer.requestLayout();

    StreamOptions streamOptions = new StreamOptions();
    stream = room.publish(localRenderer, streamOptions);


    The error is the same as pasted in the previous post. and it is occurring on the room.publish command.

    Kindly assist.

    THanks
    Mohammad Adil
  16. Max

    Max Administrator Staff Member

    Please provide us source code based on Conference example with minimal modifications to reproduce a crash.
  17. Mohammad Adil

    Mohammad Adil New Member

  18. Max

    Max Administrator Staff Member

    Please clarify:
    1) Where is a permission request in your code like this? We see onRequestPermissionsResult handler only.
    2) You are using AndroidSDK 1.1, which supports only Android 9 and newer. What Android version you are using to test?
    We also recommend you to check if Conference example app crashes on room.publish() call on the same Android version. If not, please modify Conference example source code until it crashes. Then, you will see what is wrong.
  19. Mohammad Adil

    Mohammad Adil New Member

    Hi,
    1) Permission i used was only once then i removed the code for more debugging. (It does not ask for permission again once granted)
    2) I am using Android 9 and Galaxy s8 which i have mentioned in my earlier post.

    I am unable to reproduce the crash on the conference app after modifying also.

    Waiting to hear from you.

    Thanks
    Mohammad Adil
  20. Max

    Max Administrator Staff Member

    So, try to develop your test application based on Conference example code. Note that we explicitly set all event handlers rather then just describe them in layout.xml.

Share This Page