title | nav |
---|---|
Prebuilt Quickstart |
5.3 |
This guide will walk you through the steps to create a video conferencing app using Prebuilt component of the room-kit
package.
If you get stuck at any point or need help in understanding a concept, you can put your query in our Discord Channel.
- Android: A basic familiarity with Android is required to follow this guide.
- 100ms account: You need to have a 100ms account to create a room and get a
room-code
. You can create a 100ms account here. - Room-code: Prebuilt components require a
room-code
to join a room. You can get aroom-code
for a room using the 100ms dashboard. Refer to this guide to learn more about room codes.
Here's how to create a new Android project.
The room-kit
library is available on Maven. Add it your app level build.gradle in the dependencies block.
Latest Version:
dependencies { ....
implementation "live.100ms:room-kit:$GET_VERSION_FROM_ABOVE_BADGE"
}
Look up how to get room code
in this guide.
import live.hms.roomkit.ui.HMSRoomKit
import live.hms.roomkit.ui.HMSPrebuiltOptions
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val roomCode = "<room-code>"
val userName = "<my-name>"
val options = HMSPrebuiltOptions(userName)
HMSRoomKit.launchPrebuilt(roomCode, this, options)
}
}
You will see a preview of your own video and can turn it on or off.
Here's what joining a room with another person looks like.
Additional properties that can be specified in HMSPrebuiltOptions
are userName
and userId
.
Username: The user's display name. UserId: An id that you may choose so that peers on 100ms can be associated with customers identifiers from your system.
class HMSPrebuiltOptions {
val userName : String?, //Peer user name
val userId: String?, // Optional Customer given User-id
}
The sample project for the library is at https://github.com/100mslive/AndroidPrebuiltDemo#readme you can download the app for it here.