Introducing a video calling feature to your application adds a powerful way for your users to communicate and interact with each other.
If you want to include video call in your application but don’t want to go through all the heavy lifting of reading the documentations and debugging the APIs, or if you just want to build a proof-of-concept (POC) application within a limited timeline, please continue reading this blog. In this blog, I will demonstrate how to add a video call feature in your application using only 2 lines of code.
In this blog post, I’m going to use the Agora Android UIKit to achieve the video call functionality. The Agora Android UIKit is a wrapper of the Agora Video SDK with a pre-designed UI layer. Using that, you don’t need to spend hours of work on the UI design for the video call and the implementation on video call logic. They are all handled in the SDK.
Implement the SDK
Then, add permissions in your AndroidManifest file.
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Start Video Call
AgoraRTC.instance().bootstrap(this, "appID", "channel");
Build and Test on Device
Now let’s run our application!
In Android Studio, make sure your Android device is plugged in, and click Run.
Want to build Real-Time Engagement apps?
If you have questions, please call us at 408-879-5885. We’d be happy to help you add voice or video chat, streaming, and messaging into your apps.
Stay inspired by accessing all RTE2020 session recordings. Gain access to innovative Real-Time-Engagement content and start innovating today.