Skip to content

Android SDK sample doesn't display data channel messages from C SDK. How can I display them? #69

@agrexgh

Description

@agrexgh

Brief

I'd like to use both C SDK and Android SDK,
but this combination has a problem with data channel communication.
As the title says, Android sample doesn't display data channel messages from C SDK sample.
How can I display them?

The version of code

  • amazon-kinesis-video-streams-webrtc-sdk-android
    4d1b0ed8dac338c0a8dddfda923a0b176cc50fb8

  • amazon-kinesis-video-streams-webrtc-sdk-c
    08e4d294a7466f42033a7aaeacf2521f519749f7 applied the patch below.
    This patch makes C SDK sample to echo back the received data channel messages and show result of sending them.

diff --git a/samples/Common.c b/samples/Common.c
index f1c9f961a..368bd88cb 100644
--- a/samples/Common.c
+++ b/samples/Common.c
@@ -21,6 +21,9 @@ VOID onDataChannelMessage(UINT64 customData, PRtcDataChannel pDataChannel, BOOL
     } else {
         DLOGI("DataChannel String Message: %.*s\n", pMessageLen, pMessage);
     }
+
+    STATUS ret = dataChannelSend(pDataChannel, isBinary, pMessage, pMessageLen);
+    DLOGW("ret = %d", ret);
 }

 VOID onDataChannel(UINT64 customData, PRtcDataChannel pRtcDataChannel)

How to reproduce this issue

  1. Launch both sdk samples and connect them to same channel.
  2. From Android sample, send a data channel message.

Expected behavior

At 2, Android sample display the data channel message just like the one Android sample sent on the heads-up notification.

Actual behavior

At 2, Android app DOESNOT display them.

Supplement

  • I can't tell which SDK sample has the problem.
  • With Android SDK sample and JS SDK sample, there is no problem.
    Android sample shows the data channel messages from JS SDK sample on the heads-up notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions