1

The Agora.io doc is specifing for the joinChannel method :

The user ID. A 32-bit unsigned integer with a value ranging from 1 to (2^32 -1). This parameter must be unique. If uid is not assigned (or set as 0), the SDK assigns a uid and reports it in the joinChannelSuccess callback. The app must maintain this user ID.

I have 2 use cases :

  1. For the users registered to my app : i want the app to assign an uid
  2. For the users not registered to my app : I want to let agora.io decide of the uid

The issue is that doing so, I may get into collisions between userIds assigned by the app and usersIds assigned by agora lib.

But if you are assigning uids within a range of values (other than 1 -> 2^32) then i could rely on that.

Is it the case ?

thx.

1 Answer 1

2

in this case, i think you can use the string user name to join the channel. You can take a look at this doc: https://docs.agora.io/en/faq/string

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.