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

[QUESTION]Android SDK sample doesn't display data channel messages from C SDK. How can I display them? #1221

Closed
agrexgh opened this issue Aug 8, 2021 · 8 comments
Labels
question Further information is requested

Comments

@agrexgh
Copy link

agrexgh commented Aug 8, 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 added the question Further information is requested label Aug 8, 2021
@agrexgh
Copy link
Author

agrexgh commented Aug 8, 2021

@hassanctech
Copy link
Contributor

We're currently working on enhancing the existing sample to send data channel messages, as you noted currently it does not send them. We have verified on our setup that it in fact does work on the JS side, we should have this out in the near term, I don't have an exact date though.

@disa6302
Copy link
Contributor

Closing since this issue is on the Android SDK side. As mentioned by @hassanctech , the C SDK sample now has a data channel creation integrated. We do not have a sample on the Android SDK side to demonstrate data channel message reception and reaction to it either. We will add it at some point, but no ETA yet.

@agrexgh
Copy link
Author

agrexgh commented Aug 17, 2021

@hassanctech @disa6302
Thank you very much for replying.
Which branch or commit you're working on about this issue?
I'd like to get a little of hint about this.

@disa6302
Copy link
Contributor

The C SDK master already has the data channel piece: #1203 which has been merged. We do not have anything for Android at the moment.

@agrexgh
Copy link
Author

agrexgh commented Aug 17, 2021

Thanks a lot!
I'll try it soon!

@agrexgh
Copy link
Author

agrexgh commented Aug 17, 2021

I couldn't try it because of an compile error (#1187 (comment)).

@agrexgh
Copy link
Author

agrexgh commented Aug 17, 2021

I tried again C SDK sample (0be097904010bb53cca44fd6453c2da953ead4d9)
and Android SDK sample (4d1b0ed8dac338c0a8dddfda923a0b176cc50fb8),
but unfortunately Android SDK sample seems not to receive data from C SDK sample.

I stop discussing this problem,
and I'll keep on investigating this at awslabs/amazon-kinesis-video-streams-webrtc-sdk-android#69.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants