Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
agrexgh opened this issue Aug 5, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@agrexgh
Copy link

agrexgh commented Aug 5, 2021

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.
@agrexgh agrexgh changed the title Android SDK sample doesn't display data channel messages from C SDK Android SDK sample doesn't display data channel messages from C SDK. How can I display them? Aug 5, 2021
@agrexgh
Copy link
Author

agrexgh commented Aug 17, 2021

I tried
C SDK sample (0be097904010bb53cca44fd6453c2da953ead4d9), which sends data channel message when the C sample receives data channel messages,
and Android SDK sample (4d1b0ed8dac338c0a8dddfda923a0b176cc50fb8) pairs,
but unfortunately Android SDK sample seems not to receive data from C SDK sample.

I'll try to investigate this issue,
but someone, could you give me some help?

@agrexgh
Copy link
Author

agrexgh commented Aug 19, 2021

Android SDK sample creates Data Channel only to send messages, but not this is not to receive messages
(I don't know why but onMessage() method is no op).

And C SDK sample sends and receives messages with this data channel,
but messages sent from C SDK sample is ignored by Android SDK sample.

By the way JS SDK sample is very similar to this.

@ghost
Copy link

ghost commented Nov 16, 2021

Do you have any progress on this issue?
And, does this issue occur on iOS SDK?

@sirknightj
Copy link
Contributor

I ran the sample just now. Using Android Master, and C viewer.

As you can see from the screenshot below, data channel messages are shown.

image.

However, with C Master and Android viewer, that's when the data channel messages are not displayed.

@sirknightj sirknightj added the bug Something isn't working label Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants