App architecture
Instead of building an application from scratch, we will provide you with a running, although empty, application. During this tutorial you will fill the gaps and add, one by one, the new features to have a functional videoconferencing app.
In this section we will check the application structure and what each file does. First of all, you will need to download the starter_code.
Packages description
In this project you will find three packages under the screen
folder:
form
: This package will be the entry-point of our app. It will display to the user a form where he can introduce the Conferencing Node, Virtual Meeting room name and the user display name . It only contains a fragment.conference
: This will be the main package for our project. It contains the following files:ConferenceFragment.kt
: This is the UI controller for the conference.ConferenceViewModel.kt
: The ViewModel will contain the logic and the state of our app.ConferenceViewModelFactory.kt
: This factory class is used to create the ViewModel. The only reason to have it is because we will need to pass theapplication
object to our ViewModel.ConferenceBindingAdapter.kt
: This file will contain some functions that are used for changing the layout depending on the application state. For example, it will display different icons whether the user is on mute or not.ScreenSharingService.kt
: We will use it in the Send presentation tutorial. This service will display to the user a notification indicating that the screen is being shared.
pin
: This package will be used to introduce a PIN when needed. It only contains a fragment.
Resources files
In order to have a better experience we have added some more files and configuration:
anim
: Here you will find some animations that are used for the transitions when the app changes from a fragment to another.drawable
: This folder contains all images that will be used along the app, such as icons and buttons.layout
: You can find here the XML files for the layout of each fragment.navigation.xml
: Here is defined the logic needed to go from one fragment to another.colors.xml
: Some colors that will be used in the app.strings.xml
: File that contains a collections of strings that you will use along the app.style.xml
: Some styles that are applied to the interface.themes
: This folder contains a custom theme that is applied to the app.
Run the app
Now that you understand a bit the app architecture, is time to use it. Compile the application and run it in you favorite device. After installing it, you should see something like this: