Code Monkey home page Code Monkey logo

opentok-android-sdk-samples's Introduction

Opentok Android SDK Samples

Tokbox is now known as Vonage

Check documentation to understand Video API basic concepts. See instructions below in order to open Android project and set up the credentials.

The Android projects in this directory demonstrate typical use cases and features available in the OpenTok Android SDK:

  • Basic-Video-Chat (Java, Kotlin) demonstrates how to publish and subscribe to streams in a session. Best place to start
  • Simple-Multiparty (Java) demonstrates how to enable/disable audio/video streams and how to swap camera
  • Multiparty-Constraint-Layout (Java, Kotlin) demonstrates how to use ConstraintLayout to position all the videos in a multiparty session
  • Signaling (Java) demonstrates how to send text messages
  • Archiving (Java, Kotlin) demonstrates how to utilize OpenTok server to start, stop, and playback session recordings
  • Frame-Metadata (Java) demonstrates how to send and receive additional metadata associated with each video frame
  • Basic-Video-Capturer (Java) demonstrates how to create a custom video capturer using Camera class
  • Basic-Video-Capturer-Camera-2 (Java) demonstrates how to create a custom video capturer using Camera2 class
  • Basic-Video-Renderer (Java) demonstrates how to create a custom video renderer
  • Basic-Audio-Driver (Java, Kotlin) demonstrates how to publish a random audio signal and save audio streams to the file.
  • Advanced-Audio-Driver (Java, Kotlin) demonstrates how to create a more advanced custom audio driver
  • Basic-Video-Driver (Java) demonstrates how to create a custom video driver
  • Live-Photo-Capture (Java, Kotlin) demonstrates how to capture an image from a subscribed video stream
  • Picture-In-Picture (Java) demonstrates how to use the Picture-in-Picture mode
  • Screen-Sharing (Java) demonstrates how to publish a screen-sharing video, using the WebView as the source
  • Phone-Call-Detection (Java, Kotlin) demonstrates how to detect incoming and outgoing phone calls
  • ARCore-Integration (Java) demonstrates how to use Google ARCore with Opentok
  • Basic-VoIP-Call (Java) demonstrates how to use Android Connection Service (https://developer.android.com/reference/android/telecom/ConnectionService) with the OpenTok Android SDK.
  • Video-Transformers Java demonstrates how to use pre-built transformers in the Vonage Media Processor library or create your own custom video transformer to apply to published video.

Open project

  1. Clone this repository [email protected]:opentok/opentok-android-sdk-samples.git
  2. Start Android Studio
  3. In the Quick Start panel, click Open an existing Android Studio Project
  4. Navigate to the repository folder, select the desired project subfolder, and click Choose

Set up credentials

You will need a valid TokBox account for most of the sample projects. OpenTok credentials (API_KEY, SESSION_ID, TOKEN) are stored inside OpenTokConfig class. For these sample applications, credentials can be retrieved from the Dashboard and hardcoded in the application, however for a production environment server should provide these credentials (check Basic-Video-Chat project).

Note: To facilitate testing connect to the same session using OpenTok Playground (web client).

Development and Contributing

Feel free to copy and modify the source code herein for your projects. Please consider sharing your modifications with us, especially if they might benefit other developers using the OpenTok Android SDK. See the License for more information.

Interested in contributing? You โค๏ธ pull requests! See the Contribution guidelines.

Testing

Projects consistancy is qurded by separate test project located in the .test directory. To run tests use these commands:

  1. cd .test
  2. ./gradlew clean test

Getting Help

You love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:

opentok-android-sdk-samples's People

Contributors

ardytokbox avatar chetanvangaditokbox avatar devwithzachary avatar goncalocostamendes avatar hbaqai avatar igitgotit avatar igorwojda avatar jaoo avatar jeffswartz avatar jintgeorge avatar jtiet avatar lucashuang0802 avatar marcioaffonso avatar marinaserranomontes avatar michaeljolley avatar msach22 avatar nitrillo avatar pvenum avatar raulkg avatar robjperez avatar rperezcubero avatar tnas32 avatar v-kpheng avatar vona-ben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentok-android-sdk-samples's Issues

Any way to stop user having simultaneous video chat calls with other app (e.g. Skype)?

Hi there,

Apologies if this is the wrong place to post this, but I'm having trouble finding any info on my problem.

One of our team was asking if we can stop two video calls happening at the same time. e.g. one using our app (OpenTok SDK) and the other being something like Skype. Either stopping the other call from being started, or stopping our call if Skype starts.

Thanks!

Crush with Release Apk

I use opentok with my project, work well with debug but release apk, it is always crush. How Do I build release apk?

SessionListener.onStreamReceived not called

I'm building my android application with com.opentok.android:opentok-android-sdk:2.11.0 .
below is my code in SubscriberActivity:

  @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_live_subscriber);

        initView();

        queryToken();
    }
    //success on server response
    private void onTokenReceived(String apiKey, String sessionId, String token) {
         liveSession = new Session.Builder(this, apiKey, sessionId).build();
        liveSession.setSessionListener(this);
        liveSession.connect(token);
    }
     @Override
        public void onStreamReceived(Session session, Stream stream) {
            if (liveSubscriber == null) {
                liveSubscriber = new Subscriber.Builder(this, stream).build();
                liveSubscriber.getRenderer().setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL);
                session.subscribe(liveSubscriber);
                showPlayingView();
                liveSubscriberView.addView(liveSubscriber.getView());
            } 
        }

I entered this screen and SessionListener.onConnected(Session) had been called, but onStreamReceived never called.

This problem is serious for me, please give me help, thanks.

Archiving stream in my device, not save it in server

I have the same case as the problem at this link: #131
I know there is a solution using CustomVideoCapturer. Currently, I am handling MediaRecorder inside the int function startCapture () of the CustomVideoCapturer class. I'm not sure how to handle it properly? If my handle is not correct, can you please help me.
Thanks!!!

PublisherView disappear after resume

Publisher view is showing initially when creating and publishing stream. But after activity resume from sleep mode, it is disappeared.

Please tell me how to set order for each view to keep publisher view show always

PublisherView disappear after resume

Hi. I'm using com.opentok.android:opentok-android-sdk:2.14.2.
After activity is resumed (back to activity from another one), publisher and subscribers streams are disappeared, sound not.
Steps to reproduce:
1 - Copy code from Multiparty-ConstraintLayout sample.
2 - Add 1 button, by click open a new activity with just an empty layout. Go back. Publisher view and subscriber view disappeared.
Tested on Xiaomi Mi 3W (6.0 android) and Meizu M1 Note (5.1 android).

A very similar issue exists.
But on my device publisher.getView() returns an instance of a TextureView (not a GLSurfaceView) where setZOrderOnTop method is not present.

Is there any way to resume video stream?

P.S. From the other side of the video call video stream is resuming after onResume is called, so it disappear only on the source side.

#EDIT1
Getting this only with a TextureView and publisher.onPause(), publisher.onResume().

sessionOptions(new Session.SessionOptions() {
                    @Override
                    public boolean useTextureViews() {
                        return true;
                    }
                })

Playing sound problem when the video call has started

Hi, I am trying to play a sound before the session has been connected but when it is connected and when I do session.subscribe(subscriber); inside of onStreamReceivedmethod, the sound stops unexpectedly. I am initializing the subscriber like this:

Subscriber subscriber = new Subscriber.Builder(context, stream).build(); subscriber.getRenderer().setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL); subscriber.setSubscribeToAudio(false); session.subscribe(subscriber);

Even disabling the audio from the subscriber setSubscribeToAudio(false) still the sounds stops.
When the session has been finished, the sound starts playing again.

For some reasons, we need to play the sound even when the session is connected but I don't know why this problem is happening, do you have any idea? Thanks a lot.

Record local video

How can I save the local video only in my device SD-Card. I don't want to use the web end-points to save it in server. Any help is highly appreciable. Thanks in advance.

Subscriber view in front of Publisher view

I'm trying to achieve that the Subscriber view is in a small layout in front of Publisher view. Basically like in the Basic-Video-Chat sample but only vice-versa.

It works perfectly on my Nexus 6P but when using a Nexus 5 the small subscriber view gets transparent as soon as the chat partner connects - leaving only the white corner around the FrameLayout.

Reproduce:

  1. check out the Basic-Video-Chat sample project
  2. open the MainActivity layout file ("activity-main.xml")
  3. switch the ids of the containers (@+id/publisher_container & @+id/subscriber_container)
  4. run on older?/weaker? device (can confirm for Nexus 5 and Moto G3)

[Crash] Fatal signal 11 (SIGSEGV),

When sending a signal from server using the opentok sdk :
doc : https://www.npmjs.com/package/opentok#sending-signals
for example :
opentok.signal("SESSION_ID",undefined, { 'type': 'chat', 'data': 'Hello!' }, function(error) { if (error) return console.log("error:", error); });
; Android Client app (OpenTok v2.14.1) crashes resulting this error :
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 10089

iOS Client receives these signals without any problem.

This crash is easily reproduced, just make sure to send signal event using opentok Node SDK or using directly REST API : https://api.opentok.com/v2/project/(API_KEY)/session/(SESSION_ID)/signal

Video is getting stretched when the number of stream is odd

Hi. I'm using com.opentok.android:opentok-android-sdk:2.12.0.
Copied some code from Multiparty-ConstraintLayout sample.
1 - my preview playing full screen, right
2 - when another stream received (2 pictures on the screen), my preview getting stretched, subscriber preview looks okay.
I thought it was my bad.... but not.

Multiparty-ConstraintLayout sample without any line changed has the same bug.
Same issue has been closed without any fix.
Screens has provided.

default
2018-05-22 18 34 37

OpenTok Archiving Single Stream

My use case is i'm using opentok video calling feature for broadcasting live stream where multiple user subscribe to a stream but only one can publish it .and i want to only archive only the publisher stream not other subscribers is it possible .

Keep the same aspect ratio whenever the screen is landscape or portrait

My app use the com.opentok.android.Publisher to create a publisher view, and have two subscriber views on the left side:
image
When the screen is protrait, the publisher preview looks having the different aspect ratio, but get the same when the screen is landscape. How should I make the aspect ratio to match other video views?

MainActivity has leaked IntentReceiver

Activity com.tokbox.android.tutorials.basic_video_chat.MainActivity has leaked IntentReceiver com.opentok.android.DefaultAudioDevice$5@13e0f8a that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity com.tokbox.android.tutorials.basic_video_chat.MainActivity has leaked IntentReceiver

How to create session programmatically

Hi

 public static final String API_KEY = "xxxxxx";
 public static final String API_SECRET = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

How to generate Session ID and TOKEN by programmatically in Android

Problem with GLSurfaceView Z order

If I remove publisher view from screen and add it again this view will show subscriber's video.
It happens because subscriber and publisher by default use GLSurfaceView and set ZOrder in media overlay this.view.setZOrderMediaOverlay(true);
But Android can't simultaneously show 2 surface views at the same Z order (depth).
https://stackoverflow.com/questions/5647824/android-multiple-surfaceviews/22746240#22746240

It happens also when I remove view container for all these views and add it again in view hierarchy, for example replace 2 controllers in one activity.

I created diff for Basic-Video-Chat which you can use to test this issue but github doesn't accept it so I renamed diff to txt.
z_order_issue.txt

Unable to take screenshot of videos on Surface-view (Videos are from OpenTok).

Hi All,
I am developing an application in Android Studio, where in am doing video calls (Publisher and Subscriber) , taking Screenshots and saving.
The problem is that when I try to take a screenshot (From a image button) of videos which are playing from 'OpenToK' will be in black , Not getting the real image.

I am using 'Surface-view' to achieve it , Plz help me to find solution.

Use of sample BasicCustomVideoRenderer class

The verbatim use of the BasicCustomVideoRenderer set onto the publisher (in order to use the saveScreenshot method:

mPublisher.setRenderer(new BasicCustomVideoRenderer(mContext));

leads to the publisher thumbnail bottom right not being displayed on top of the subscriber view.

Commenting out the setRenderer line above (thereby making the Publisher use the internal DefaultVideoRenderer) makes the publisher thumbnail render on top of the subscriber.

Error when use MediaRecorder when session is connecting

I'm trying to use MediaRecorder when i publish my video, i'm actually using "capturer" in the publisher options and " TextureViews" as an option in the Session of Opentok. But it gaves me error in the media recorder:
Error on start Media Recorder -19
I hope answers
Thnks

onPause or onStop ?

https://tokbox.com/developer/sdks/android/reference/com/opentok/android/Session.html#onPause-- sates that "Call this method when the app's activity pauses. This pauses the video renderer and capturer of any publishers to the session. It also pauses the video renderers of all subscribers.
Cameras used by OpenTok publishers are now released when you call this method. Publishers reacquire cameras when you call the onResume() method."
However the activity is still visible after onPause (think about a picture in picture mode, split screen, or just a dialog). I would like to call this method on onStopbut I wanted to ask if there is any reasoning behind calling onPause and not onStop ?
Thanks

When using CustomVideoCapturer camera preview is getting disorted (Some red, green color flares are showing)

Steps to reproduce this issue
When using CustomVideoCapturer with publisher, The camera preview is getting disorted. Below is the code for the.

mPublisher = new Publisher.Builder(context).name(String.valueOf(new Me(context).getId()))
                .capturer(new CustomVideoCapturer(this, Publisher.CameraCaptureResolution.HIGH, 
                 Publisher.CameraCaptureFrameRate.FPS_30))
                .build();
        mPublisher.setPublisherListener(this);
        mPublisher.setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL);
        mPublisherViewContainer.addView(mPublisher.getView());

What do you see instead?
Showing Flares and dis-sorted camera preview when using with CustomVideoCapturer
device-2018-05-22-191802

After sometime, Some red and green color started visible.
device-2018-05-22-191901

Expected Output
device-2018-05-22-193329

Test on OS
Android 7.0, 8.1 OpenTok SDK is the current one (2.14.0)

Test Devices
Yes, Moto C Plus and Nexus 6P, Samsung Galaxy Note 2

Other Detail
This is only happening when using CustomVideoCapturer with Publisher. Without it is working good.
I have a requirement for handle camera focusability so need to use camera parameters. And for that CustomVideoCapturer is required.

Though, I have just copied the CustomVideoCapturer class from your sample project and nothing has been changed yet.

Thank you for your help in Advance.

Could not find com.opentok.android:opentok-android-sdk:2.10.1-REL-2782.

I have a module(sdk) in my android project that uses opentok internally. Lately my builds are failing on CircleCi with the following error :

> Could not find com.opentok.android:opentok-android-sdk:2.10.1-REL-2782.
           Required by:
               project :identity

Works okay locally, but when the build gets generated on CircleCi, i'm getting the above error. It used to work earlier though. Didn't know where to go, appreciate any sort of help.
Thanks in advance.

an Android system-level crash: finalize() timed out

Hi, I get the crash below on Fabric:

Fatal Exception: java.util.concurrent.TimeoutException: com.opentok.android.Publisher.finalize() timed out after 10 seconds
       at com.opentok.android.PublisherKit.finalizeNative(PublisherKit.java)
       at com.opentok.android.PublisherKit.finalize(PublisherKit.java:512)
       at com.opentok.android.Publisher.finalize(Publisher.java:460)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
       at java.lang.Thread.run(Thread.java:761)

The version that I'm using is opentok-android-sdk:2.11.0, can anyone tell me why it occurred and how to fix it.
Thanks!

Publisher video is not visible,when subscriber stream available in Oreo devices

Hi,we are using opentok 2.13 sdk,We got an issue in the oreo devices.Publisher video is not displaying whenever subcriber video stream available.Even I checked with the opentok playstore app.In that also same issue is appearing.Can you please help us in solving this issue.Need your assistance in as early as possible(urgent).

Here are the some of the logs(warnings) captured from logcat:

VideoCapabilities: Unrecognized profile 65536 for video/avc
org.webrtc.Logging: MediaCodecVideoEncoder: Found target encoder OMX.qcom.video.encoder.avc. Color: 0x15. Bitrate adjustment: NO_ADJUSTMENT
libc: Access denied finding property "camera.hal1.packagelist"
Camera-JNI: copyAndPost: off=0, size=64 msg=100000
Camera: mCameraStateCallback is null
Camera-JNI: copyAndPost: off=0, size=460800 msg=10

screenshot_20180215-212436

Issue of unregister receiver on calling session.disconnect method

I have successfully integrated the opentok sdk for basic video chat and I m facing the below issue when I disconnect the session after the chat has been over between the two persons. Please find the stacktrace of the same.

07-22 17:41:21.649 9369-9369/E/ActivityThread: Service .services.FloatingChatService has leaked IntentReceiver com.opentok.android.Session$19@2f58ab5 that was originally registered here. Are you missing a call to unregisterReceiver()? android.app.IntentReceiverLeaked: Service .services.FloatingChatService has leaked IntentReceiver com.opentok.android.Session$19@2f58ab5 that was originally registered here. Are you missing a call to unregisterReceiver()? at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1159) at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:946) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1302) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1282) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1276) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:586) at com.opentok.android.Session.registerLoggingEventsReceiver(Session.java:1963) at com.opentok.android.Session.enableLoggingEventsReceiver(Session.java:1952) at com.opentok.android.Session.onConnected(Session.java:1296) at com.opentok.android.Session$2.run(Session.java:1283) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

SubscriberViewContaine Is Gone when PublisherViewContainer is match_parent (FullScreen)

<FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <FrameLayout
        android:id="@+id/publisherview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    </FrameLayout>

    <FrameLayout
        android:id="@+id/subscriberview"
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:layout_gravity="bottom|end"
        android:layout_marginBottom="16dp"
        android:layout_marginEnd="16dp"
        android:background="@color/grey_3"
        android:padding="16dp"/>
</FrameLayout>

corewebrtc support in sample app

I am trying to extend the android sample app and add core webrtc support such that my app can failover to a secondary managed coturn server in case tokbox services fail. Is there a way I can either use core webrtc or use tokbox sdk to talk to custom coturn servers as having both libs in the same project leads to conflicts.

SDK crashes when setting Android camera to 0

I wrote a full report on the Forums, but a similar bug has been reported there and left to die since April and this is a pretty bad bug. Reporting here:

What steps will reproduce this problem?

  1. Create a publisher.
  2. call publisher.setCameraId(CameraInfo.CAMERA_FACING_BACK);. Alternatively call 'publisher.swapCamera()' on a phone with two cameras.
  3. Watch it crash!

What is the expected output?

It not to crash!

What do you see instead?

It crashes!

What OS and version are you seeing this problem with?

Android 4.4.3. OpenTok SDK is the current one (2.2.1)

Have you tested this on other computers and browsers? If so, list them:

Tested on two phones - Nexus 4 and Moto X

Please give any additional info that can help solve this.

Looks similar to this, which nobody answered: https://forums.tokbox.com/discussion-and-questions/android-crash-when-setting-camera-to-0-t41869
There appears to be a workaround (which I'll probably end up using), but it's gross and you should fix this bug.

Here's the stack trace, gets right down into NDK code:

     opentok-publisher I  Setting cameraId to 0
                       I  Publisher has changed the camera position to: 0
       opentok-session I  Starting a Publisher streaming to the session
            CameraBase W  An error occurred while connecting to camera: 0
              dalvikvm E  Class lookup Landroid/hardware/Camera$Parameters; attempted with exception pending
                       W  Pending exception is:
                       I  java.lang.RuntimeException: Fail to connect to camera service
                       I      at android.hardware.Camera.native_setup(Native Method)
                       I      at android.hardware.Camera.<init>(Camera.java:364)
                       I      at android.hardware.Camera.open(Camera.java:319)
                       I      at com.opentok.android.DefaultVideoCapturer.init(DefaultVideoCapturer.java:59)
                       I      at dalvik.system.NativeStart.run(Native Method)
                       I  DALVIK THREADS:
                       I  (mutexes: tll=0 tsl=0 tscl=0 ghl=0)
                       I  "main" prio=5 tid=1 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x4167be40 self=0x4159e520
                       I    | sysTid=25537 nice=0 sched=0/0 cgrp=apps handle=1074114900
                       I    | state=S schedstat=( 0 0 0 ) utm=168 stm=47 core=0
                       I    #00  pc 00021ad4  /system/lib/libc.so (__futex_syscall3+8)
                       I    #01  pc 0000f08c  /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
                       I    #02  pc 0000f0f4  /system/lib/libc.so (__pthread_cond_timedwait+64)
                       I    #03  pc 00493611  /data/app-lib/com.example.pablo-2/libopentok.so (ot_ev_send_interthread_data+140)
                       I    #04  pc 00488ac5  /data/app-lib/com.example.pablo-2/libopentok.so (ot_publisher_create+552)
                       I    #05  pc 000704f0  /data/app-lib/com.example.pablo-2/libopentok.so (Java_com_opentok_android_Session_publishNative+496)
                       I    #06  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
                       I    #07  pc 00050e6b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
                       I    #08  pc 00052855  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+184)
                       I    #09  pc 000297e0  /system/lib/libdvm.so
                       I    #10  pc 00030ae8  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
                       I    #11  pc 0002e180  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
                       I    #12  pc 0006374d  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+392)
                       I    #13  pc 0006b62b  /system/lib/libdvm.so
                       I    #14  pc 000297e0  /system/lib/libdvm.so
                       I    #15  pc 00030ae8  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
                       I    #16  pc 0002e180  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
                       I    #17  pc 00063469  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
                       I    #18  pc 0004ca37  /system/lib/libdvm.so
                       I    #19  pc 0004d5c3  /system/lib/libandroid_runtime.so
                       I    #20  pc 0004e2e7  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+354)
                       I    #21  pc 0000105b  /system/bin/app_process
                       I    #22  pc 0000e513  /system/lib/libc.so (__libc_init+50)
                       I    #23  pc 00000d7c  /system/bin/app_process
                       I    at com.opentok.android.Session.publishNative(Native Method)
                       I    at com.opentok.android.Session.publish(Session.java:679)
                       I    at com.example.pablo.ui.video.PublisherActivity.startPublishing(PublisherActivity.java:142)
                       I    at com.example.pablo.ui.video.PublisherActivity.onSignalReceived(PublisherActivity.java:79)
                       I    at com.opentok.android.Session.onSignalReceived(Session.java:1078)
                       I    at com.opentok.android.Session$7.run(Session.java:1056)
                       I    at android.os.Handler.handleCallback(Handler.java:733)
                       I    at android.os.Handler.dispatchMessage(Handler.java:95)
                       I    at android.os.Looper.loop(Looper.java:136)
                       I    at android.app.ActivityThread.main(ActivityThread.java:5086)
                       I    at java.lang.reflect.Method.invokeNative(Native Method)
                       I    at java.lang.reflect.Method.invoke(Method.java:515)
                       I    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                       I    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                       I    at dalvik.system.NativeStart.main(Native Method)
                       I  "Thread-597" prio=5 tid=25 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x42001290 self=0x62ed44d0
                       I    | sysTid=25788 nice=0 sched=0/0 cgrp=apps handle=1658190192
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    #00  pc 00021ad8  /system/lib/libc.so (__futex_syscall3+12)
                       I    #01  pc 0000f08c  /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
                       I    #02  pc 0000f0f4  /system/lib/libc.so (__pthread_cond_timedwait+64)
                       I    #03  pc 0041ffbb  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #04  pc 00268a35  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #05  pc 00423277  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #06  pc 004232ad  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #07  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #08  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "com.example.pablo- 25779" prio=5 tid=23 RUNNABLE
                       I    | group="main" sCount=0 dsCount=0 obj=0x41f6be10 self=0x62ed3b98
                       I    | sysTid=25779 nice=0 sched=0/0 cgrp=apps handle=1658078704
                       I    | state=R schedstat=( 0 0 0 ) utm=0 stm=2 core=1
                       I    at android.hardware.Camera.getParameters(Camera.java:~1705)
                       I    at com.opentok.android.DefaultVideoCapturer.configureCaptureSize(DefaultVideoCapturer.java:267)
                       I    at com.opentok.android.DefaultVideoCapturer.getCaptureSettings(DefaultVideoCapturer.java:152)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "Thread-594" prio=5 tid=24 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x41f5abc0 self=0x62d532b0
                       I    | sysTid=25785 nice=0 sched=0/0 cgrp=apps handle=1658191880
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    #00  pc 00021ad8  /system/lib/libc.so (__futex_syscall3+12)
                       I    #01  pc 0000f08c  /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
                       I    #02  pc 0000f0f4  /system/lib/libc.so (__pthread_cond_timedwait+64)
                       I    #03  pc 0041ffbb  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #04  pc 00269733  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #05  pc 00423277  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #06  pc 004232ad  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #07  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #08  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "GLThread 588" prio=5 tid=22 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x423c8498 self=0x62ececf8
                       I    | sysTid=25617 nice=0 sched=0/0 cgrp=apps handle=1658098240
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x42336940> (a com.opentok.jni.MyGLSurfaceView$GLThreadManager)
                       I    at java.lang.Object.wait(Object.java:364)
                       I    at com.opentok.jni.MyGLSurfaceView$GLThread.guardedRun(MyGLSurfaceView.java:1449)
                       I    at com.opentok.jni.MyGLSurfaceView$GLThread.run(MyGLSurfaceView.java:1231)
                       I  "com.example.pablo - 25605" prio=5 tid=21 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x42266cc0 self=0x62bbd850
                       I    | sysTid=25605 nice=0 sched=0/0 cgrp=apps handle=1656471368
                       I    | state=S schedstat=( 0 0 0 ) utm=14 stm=2 core=1
                       I    #00  pc 000208a8  /system/lib/libc.so (select+20)
                       I    #01  pc 002a2857  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #02  pc 002a8241  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #03  pc 0031a709  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    #04  pc 0049fd3b  /data/app-lib/com.example.pablo-2/libopentok.so
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "Picasso-Idle" prio=5 tid=20 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x4225f6c8 self=0x61942008
                       I    | sysTid=25564 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1637098592
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=1 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x4225f7e8> (a java.lang.VMThread) held by tid=20 (Picasso-Idle)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
                       I    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017)
                       I    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I    at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:394)
                       I  "Picasso-Idle" prio=5 tid=19 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x422543f0 self=0x6173ca28
                       I    | sysTid=25563 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1636044808
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=1 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x42254588> (a java.lang.VMThread) held by tid=19 (Picasso-Idle)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
                       I    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017)
                       I    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I    at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:394)
                       I  "Picasso-Idle" prio=5 tid=18 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x4224c990 self=0x61737af0
                       I    | sysTid=25562 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1634975752
                       I    | state=S schedstat=( 0 0 0 ) utm=3 stm=0 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x4224cc78> (a java.lang.VMThread) held by tid=18 (Picasso-Idle)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
                       I    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017)
                       I    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I    at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:394)
                       I  "Picasso-refQueue" daemon prio=5 tid=17 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x42223360 self=0x613e31a0
                       I    | sysTid=25561 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1631467000
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x42222fb0> (a java.lang.ref.ReferenceQueue)
                       I    at java.lang.Object.wait(Object.java:401)
                       I    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
                       I    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
                       I    at com.squareup.picasso.Picasso$CleanupThread.run(Picasso.java:433)
                       I  "Picasso-Dispatcher" prio=5 tid=16 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x422213b8 self=0x6083b870
                       I    | sysTid=25560 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1619246280
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    #00  pc 0002190c  /system/lib/libc.so (epoll_wait+12)
                       I    #01  pc 0001064f  /system/lib/libutils.so (android::Looper::pollInner(int)+98)
                       I    #02  pc 00010879  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
                       I    #03  pc 0006af25  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
                       I    #04  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
                       I    #05  pc 00050e6b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
                       I    #06  pc 000297e0  /system/lib/libdvm.so
                       I    #07  pc 00030ae8  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
                       I    #08  pc 0002e180  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
                       I    #09  pc 00063469  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
                       I    #10  pc 0006348d  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
                       I    #11  pc 0005815b  /system/lib/libdvm.so
                       I    #12  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #13  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at android.os.MessageQueue.nativePollOnce(Native Method)
                       I    at android.os.MessageQueue.next(MessageQueue.java:138)
                       I    at android.os.Looper.loop(Looper.java:123)
                       I    at android.os.HandlerThread.run(HandlerThread.java:61)
                       I  "Picasso-Stats" prio=5 tid=15 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x422204c8 self=0x608365c8
                       I    | sysTid=25559 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1619225120
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    #00  pc 0002190c  /system/lib/libc.so (epoll_wait+12)
                       I    #01  pc 0001064f  /system/lib/libutils.so (android::Looper::pollInner(int)+98)
                       I    #02  pc 00010879  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
                       I    #03  pc 0006af25  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
                       I    #04  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
                       I    #05  pc 00050e6b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
                       I    #06  pc 000297e0  /system/lib/libdvm.so
                       I    #07  pc 00030ae8  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
                       I    #08  pc 0002e180  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
                       I    #09  pc 00063469  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
                       I    #10  pc 0006348d  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
                       I    #11  pc 0005815b  /system/lib/libdvm.so
                       I    #12  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #13  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at android.os.MessageQueue.nativePollOnce(Native Method)
                       I    at android.os.MessageQueue.next(MessageQueue.java:138)
                       I    at android.os.Looper.loop(Looper.java:123)
                       I    at android.os.HandlerThread.run(HandlerThread.java:61)
                       I  "OkHttp ConnectionPool" daemon prio=5 tid=14 TIMED_WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x4204e2b8 self=0x60a81720
                       I    | sysTid=25556 nice=0 sched=0/0 cgrp=apps handle=1621627288
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x4204e390> (a java.lang.VMThread) held by tid=14 (OkHttp ConnectionPool)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
                       I    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2056)
                       I    at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:435)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "PPTask" prio=5 tid=13 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x41fd8b30 self=0x5f3ccf30
                       I    | sysTid=25554 nice=0 sched=0/0 cgrp=apps handle=1597821832
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    #00  pc 0002190c  /system/lib/libc.so (epoll_wait+12)
                       I    #01  pc 0001064f  /system/lib/libutils.so (android::Looper::pollInner(int)+98)
                       I    #02  pc 00010879  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
                       I    #03  pc 0006af25  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
                       I    #04  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
                       I    #05  pc 00050e6b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
                       I    #06  pc 000297e0  /system/lib/libdvm.so
                       I    #07  pc 00030ae8  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
                       I    #08  pc 0002e180  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
                       I    #09  pc 00063469  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
                       I    #10  pc 0006348d  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
                       I    #11  pc 0005815b  /system/lib/libdvm.so
                       I    #12  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #13  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at android.os.MessageQueue.nativePollOnce(Native Method)
                       I    at android.os.MessageQueue.next(MessageQueue.java:138)
                       I    at android.os.Looper.loop(Looper.java:123)
                       I    at android.os.HandlerThread.run(HandlerThread.java:61)
                       I  "AsyncTask #1" prio=5 tid=12 WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x41fc1958 self=0x5ed764f8
                       I    | sysTid=25553 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1581661448
                       I    | state=S schedstat=( 0 0 0 ) utm=9 stm=4 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x41fc1af0> (a java.lang.VMThread) held by tid=12 (AsyncTask #1)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
                       I    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2017)
                       I    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "Retrofit-Idle" prio=5 tid=11 TIMED_WAIT
                       I    | group="main" sCount=0 dsCount=0 obj=0x41fbd6b8 self=0x5e463460
                       I    | sysTid=25551 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1581660344
                       I    | state=S schedstat=( 0 0 0 ) utm=11 stm=3 core=1
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x41fbdab8> (a java.lang.VMThread) held by tid=11 (Retrofit-Idle)
                       I    at java.lang.Thread.parkFor(Thread.java:1205)
                       I    at sun.misc.Unsafe.park(Unsafe.java:325)
                       I    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
                       I    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:429)
                       I    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:331)
                       I    at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:910)
                       I    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
                       I    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
                       I    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                       I    at retrofit.Platform$Android$2$1.run(Platform.java:142)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "Binder_2" prio=5 tid=10 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x41f3bbc8 self=0x5b6054f0
                       I    | sysTid=25549 nice=0 sched=0/0 cgrp=apps handle=1533039272
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    #00  pc 00020758  /system/lib/libc.so (__ioctl+8)
                       I    #01  pc 0002cfbf  /system/lib/libc.so (ioctl+14)
                       I    #02  pc 0001d3ed  /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
                       I    #03  pc 0001daf7  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
                       I    #04  pc 0001db8d  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
                       I    #05  pc 00021a0d  /system/lib/libbinder.so
                       I    #06  pc 0000ea75  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
                       I    #07  pc 0004d55d  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
                       I    #08  pc 0000e59d  /system/lib/libutils.so
                       I    #09  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #10  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "Binder_1" prio=5 tid=9 NATIVE
                       I    | group="main" sCount=0 dsCount=0 obj=0x41f3b3c0 self=0x5e4536e0
                       I    | sysTid=25548 nice=0 sched=0/0 cgrp=apps handle=1581591600
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    #00  pc 00020758  /system/lib/libc.so (__ioctl+8)
                       I    #01  pc 0002cfbf  /system/lib/libc.so (ioctl+14)
                       I    #02  pc 0001d3ed  /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+140)
                       I    #03  pc 0001daf7  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+6)
                       I    #04  pc 0001db8d  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+48)
                       I    #05  pc 00021a0d  /system/lib/libbinder.so
                       I    #06  pc 0000ea75  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+216)
                       I    #07  pc 0004d55d  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68)
                       I    #08  pc 0000e59d  /system/lib/libutils.so
                       I    #09  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #10  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "FinalizerWatchdogDaemon" daemon prio=5 tid=8 TIMED_WAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f36dc0 self=0x5e464668
                       I    | sysTid=25547 nice=0 sched=0/0 cgrp=apps handle=1581664960
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    at java.lang.VMThread.sleep(Native Method)
                       I    at java.lang.Thread.sleep(Thread.java:1013)
                       I    at java.lang.Thread.sleep(Thread.java:995)
                       I    at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:248)
                       I    at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:258)
                       I    at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:212)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "FinalizerDaemon" daemon prio=5 tid=7 WAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f33560 self=0x5e464008
                       I    | sysTid=25546 nice=0 sched=0/0 cgrp=apps handle=1581599680
                       I    | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=0
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x416707d8> (a java.lang.ref.ReferenceQueue)
                       I    at java.lang.Object.wait(Object.java:401)
                       I    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
                       I    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
                       I    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "ReferenceQueueDaemon" daemon prio=5 tid=6 WAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f333f8 self=0x5e454290
                       I    | sysTid=25545 nice=0 sched=0/0 cgrp=apps handle=1581598440
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    at java.lang.Object.wait(Native Method)
                       I    - waiting on <0x41670700>
                       I    at java.lang.Object.wait(Object.java:364)
                       I    at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:130)
                       I    at java.lang.Thread.run(Thread.java:841)
                       I  "Compiler" daemon prio=5 tid=5 VMWAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f33308 self=0x4166a270
                       I    | sysTid=25544 nice=0 sched=0/0 cgrp=apps handle=1097244712
                       I    | state=S schedstat=( 0 0 0 ) utm=3 stm=10 core=0
                       I    #00  pc 00021ad4  /system/lib/libc.so (__futex_syscall3+8)
                       I    #01  pc 0000f08c  /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
                       I    #02  pc 0000f0f4  /system/lib/libc.so (__pthread_cond_timedwait+64)
                       I    #03  pc 00076d8b  /system/lib/libdvm.so
                       I    #04  pc 0005783d  /system/lib/libdvm.so
                       I    #05  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #06  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "JDWP" daemon prio=5 tid=4 VMWAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f33220 self=0x585d4a58
                       I    | sysTid=25543 nice=0 sched=0/0 cgrp=apps handle=1482508304
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    #00  pc 000208a8  /system/lib/libc.so (select+20)
                       I    #01  pc 00064377  /system/lib/libdvm.so
                       I    #02  pc 00066edd  /system/lib/libdvm.so
                       I    #03  pc 0005783d  /system/lib/libdvm.so
                       I    #04  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #05  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "Signal Catcher" daemon prio=5 tid=3 VMWAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f41808 self=0x59adb998
                       I    | sysTid=25542 nice=0 sched=0/0 cgrp=apps handle=1534279360
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I    #00  pc 00021340  /system/lib/libc.so (__rt_sigtimedwait+12)
                       I    #01  pc 0001351d  /system/lib/libc.so (sigwait+24)
                       I    #02  pc 00054ca3  /system/lib/libdvm.so
                       I    #03  pc 0005783d  /system/lib/libdvm.so
                       I    #04  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #05  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  "GC" daemon prio=5 tid=2 VMWAIT
                       I    | group="system" sCount=0 dsCount=0 obj=0x41f37368 self=0x5e4525d0
                       I    | sysTid=25541 nice=0 sched=0/0 cgrp=apps handle=1504559616
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I    #00  pc 00021ad4  /system/lib/libc.so (__futex_syscall3+8)
                       I    #01  pc 0000f08c  /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
                       I    #02  pc 0000f0f4  /system/lib/libc.so (__pthread_cond_timedwait+64)
                       I    #03  pc 0007574f  /system/lib/libdvm.so
                       I    #04  pc 0005783d  /system/lib/libdvm.so
                       I    #05  pc 0000d298  /system/lib/libc.so (__thread_entry+72)
                       I    #06  pc 0000d430  /system/lib/libc.so (pthread_create+240)
                       I    at dalvik.system.NativeStart.run(Native Method)
                       I  NATIVE THREADS:
                       I  "Trace" sysTid=25603 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I  "GL updater" sysTid=25608 nice=-10 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I  "com.example.pablo" sysTid=25778 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=0
                       I  "ProcessThread" sysTid=25780 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I  "com.example.pablo" sysTid=25781 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       I  "com.example.pablo" sysTid=25782 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0
                       I  "ProcessThread" sysTid=25783 nice=0 sched=0/0 cgrp=apps
                       I    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1
                       E  VM aborting
                       libc F Fatal signal 6 (SIGABRT) at 0x000063c1 (code=-6), thread 25779 (com.example.pablo)

                                       Process 25537 ended


                                       Process created for activity com.example.pablo/.ui.ContactsActivity
                                       PID: 25802   UID: 10118   GIDs: {50118, 3003, 1028, 1015}

Crash when using an other JNI libs + OpenTok

If I want to add another library (like card.io), OpenTok won't work anymore.
The cause of the crash is a JNI UnsatisfiedLinkError. Because another library like Card.io provide a .so for each architecture but OpenTok only for armeabi, the Android platform won't look into the armeabi folder.

Architecture OpenTok + Card.Io (into the APK compiled):

lib
  arm64-v8a
    libcardioDecider.so
    libcardioRecognizer_tegra2.so
    libcardioRecognizer.so
    libopencv_core.so
    libopencv_imgproc.so
  armeabi
    libcardioDecider.so
    libopentok.so
  armeabi-v7a
    libcardioDecider.so
    libcardioRecognizer_tegra2.so
    libcardioRecognizer.so
    libopencv_core.so
    libopencv_imgproc.so
  mips
    libcardioDecider.so
  x86
    libcardioDecider.so
    libcardioRecognizer_tegra2.so
    libcardioRecognizer.so
    libopencv_core.so
    libopencv_imgproc.so
    libopentok.so
  x86_64
    libcardioDecider.so
    libcardioRecognizer_tegra2.so
    libcardioRecognizer.so
    libopencv_core.so
    libopencv_imgproc.so

With only OpenTok:

lib
  armeabi
    libopentok.so
  x86
    libopentok.so

My question is: is it possible to provide the .so for each architecture? Or is there another way to have both library working together?

Thanks

SIP demo?

We are looking for SIP sample project? I don't see any project that is related to SIP in the list. If we have one please share.

Change AudioDeviceManager output issue

SDK version - 2.14.+
Steps to reproduce:
1 - copy Multiparty-ConstraintLayout project
2 - add code to play some ringtone from handset

Uri path = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.busy);
            Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), path);
            r.setStreamType(AudioManager.STREAM_VOICE_CALL);
            AudioManager m = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
            if (m != null) {
                m.setMode(AudioManager.MODE_IN_CALL);
                m.setSpeakerphoneOn(false);
            }
            r.play();

After step 2 ringtone is playing from handset.
3 - wait for onStreamCreated callback - sound becomes playing from SpeakerPhone

Setting AudioDeviceManager.getAudioDevice() .setOutputMode(BaseAudioDevice.OutputMode.Handset) is not helping. Trying to set after session.connect(), after onConnected() callback, helps only after onStreamCreated, but sound plays for a second from SpeakerPhone.

What i expect - if i set output mode BaseAudioDevice.OutputMode.Handset, i expect sound to play always from Handset until BaseAudioDevice.OutputMode.Handset is set.

Publisher.cycleCamera() crashes

Hi, I have a problem of camera toggle.
I provide a button to toggle camera. When user was publishing and clicked the toggle camera button, app crashes.

below is my code:

toggleButton.setOnClickListener(v -> mPublisher.cycleCamera());

and the crash logs:

Fatal Exception: java.lang.RuntimeException: Fail to connect to camera service
       at android.hardware.Camera.native_setup(Camera.java)
       at android.hardware.Camera.<init>(Camera.java:374)
       at android.hardware.Camera.open(Camera.java:329)
       at com.opentok.android.DefaultVideoCapturer.swapCamera(DefaultVideoCapturer.java:298)
       at com.opentok.android.DefaultVideoCapturer.cycleCamera(DefaultVideoCapturer.java:278)
       at com.opentok.android.Publisher.cycleCamera(Publisher.java:518)
       at com.fancred.android.live.LivePublisherActivity.toggleCamera(LivePublisherActivity.java:299)
       at com.fancred.android.live.LivePublisherActivity.onClick(LivePublisherActivity.java:307)
       at android.view.View.performClick(View.java:4438)
       at android.view.View$PerformClick.run(View.java:18441)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5111)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
       at dalvik.system.NativeStart.main(NativeStart.java)

sdk version is 2.11.0, my phone has two cameras

hope someone help me, thanks

Auto focus and log statements

Based on partner's request:

Custom Video Driver
I only found one issue that I think you need to resolve. Auto focus is not enabled for the custom video capturer. I suggest adding:

if (parameters.getSupportedFocusModes().contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)){
parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
}

Before setting the camera parameters in startCapture()
I also see a lot of warning log statements e.g. "init() entered" + more similar. (link (https://github.com/opentok/opentok-android-sdk-samples/blob/master/Custom-Video-Driver/app/src/main/java/com/tokbox/android/tutorials/custom_video_driver/CustomVideoCapturer.java#L104) ). Better practice to keep them as verbose log statements instead of warnings.

How to mute or no-picture ?

I have two issues:

  • how to mute the publisher or subscriber ?
  • how to disable the picture of publisher or subscriber ?

MVP, Dagger, Butterknife ๐ŸŽ‰

Hi all,

I'm wondering if you have plan to create a sample with MVP or MVVM or clean architecture with maybe RxJava/Dagger2/Butterknife?

Why not a Kotlin sample?

Best,

Subscribe screen not working

When I try to subscribe screen after subscribing from camera then instead of subscribing a screen it subscribes a camera.
Here is the code which I have tried. Both these condition is working, I have shown toast message to confirm.
if(stream.getStreamVideoType().toString().equals("StreamVideoTypeScreen")){
toast("SUBSCRIBE SCREEN");
subscriber2.addView(mSubscriber.getView());
} else if(stream.getStreamVideoType().toString().equals("StreamVideoTypeCamera")){
toast("SUBSCRIBE CAMERA");
subscriber.addView(mSubscriber.getView());
}

When I comment the second condition i.e. StreamVideoTypeCamera then I'm able to subscribe Screen but not Camera as I have commented that.

And it also work if I add subscriber.removeAllViews(); on StreamVideoTypeScreen condition but as it removes the camera so it has no use.

So, how can I make it work.

Thanks in Advance

SDK crashes with Subscriber type token

For purpose of test I made 3 flavors of app with appropriate tokens
Publisher 1
Publisher 2
Subscriber

Connecting Publiser2Publisher works, but when i launch app with subscriber type if token it crashes all the time

java.lang.IllegalArgumentException: unknown type code 1500 at com.opentok.android.OpentokError$ErrorCode.fromTypeCode(OpentokError.java:143) at com.opentok.android.OpentokError.<init>(OpentokError.java:174) at com.opentok.android.PublisherKit.error(PublisherKit.java:684) at dalvik.system.NativeStart.run(Native Method) Fatal signal 6 (SIGABRT) at 0x000076a4 (code=-6), thread 32412

I created all tokens to last for 30 days so it is not expired one. Even so it should not crash right?

How can i on flash in this library

Hi , In the publisher your not giving camera object. How can i on my flash.

Please help on this to solve my requirement.

ThankYou
Shankar

Archive video could not be full screen

HI, I face some problems of playing archive video.
After I publishing the stream, I get the archive url from server. But, in chrome or by android VideoView , the archive video could not toggle full screen, video content just kept the origin size.
full screen mode in chrome
but in safari, the video can fill the window:
normal mode in safari
full screen mode in safari
is there anyone could help me, thanks.

Codes Doesn't Work On Eclipse

I'm a student searching for a way how to screen share pc screen to phone like screen sharing. It would be nice if someone would guide me how to. Thank You!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.