<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saiful Bahri</title>
    <description>The latest articles on DEV Community by Saiful Bahri (@codewithbahri).</description>
    <link>https://dev.to/codewithbahri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1026527%2F37eb4f9c-bb11-4417-bcab-32838d189d87.png</url>
      <title>DEV Community: Saiful Bahri</title>
      <link>https://dev.to/codewithbahri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codewithbahri"/>
    <language>en</language>
    <item>
      <title>How To Faster Build Live Audio Room App Using Flutter and ZEGOCLOUD SDK</title>
      <dc:creator>Saiful Bahri</dc:creator>
      <pubDate>Mon, 04 Mar 2024 02:47:02 +0000</pubDate>
      <link>https://dev.to/codewithbahri/how-to-faster-build-live-audio-room-app-using-flutter-and-zegocloud-sdk-34e7</link>
      <guid>https://dev.to/codewithbahri/how-to-faster-build-live-audio-room-app-using-flutter-and-zegocloud-sdk-34e7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Who here hasn't heard of ZegoCloud yet? ZegoCloud is an SDK &amp;amp; API service for building applications such as chatting, live streaming, live audio, and more. I've provided more detailed explanations in my other content on Medium. This time, I want to assist friends in how to create an account and start a project on ZegoCloud. Let's dive in together, shall we?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Product ZegoCloud information:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Product: &lt;a href="https://www.zegocloud.com/uikits"&gt;https://www.zegocloud.com/uikits&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Help resource: &lt;a href="https://docs.zegocloud.com/article/15073"&gt;https://docs.zegocloud.com/article/15073&lt;/a&gt; (flutter)&lt;/li&gt;
&lt;li&gt;Get ZEGOCLOUD UIKits for 10,000 free mins: &lt;a href="https://bit.ly/42f7qnC"&gt;https://bit.ly/42f7qnC&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Take advantage of ZEGOCLOUD: &lt;a href="https://bit.ly/48KnwbD"&gt;https://bit.ly/48KnwbD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;How to build a live audio room: &lt;a href="https://bit.ly/3vLANSG"&gt;https://bit.ly/3vLANSG&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuh5wmrl1y2fyapdserm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuh5wmrl1y2fyapdserm.png" alt="Logo Zegocloud" width="630" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is ZegoCloud?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.zegocloud.com"&gt;ZegoCloud&lt;/a&gt; is a platform/service provider of SDKs and APIs for building applications such as Chat, Live Streaming, Video Call, Live Audio Room, Voice Call, and more. You can find it at the link provided above.&lt;/p&gt;

&lt;p&gt;ZegoCloud also provides &lt;a href="https://www.zegocloud.com/uikits"&gt;UIKits&lt;/a&gt; to utilize its offered features more easily, making implementation quicker, typically within minutes. It's user-friendly and offers many features to maximize its services.&lt;/p&gt;

&lt;p&gt;Additionally, you are given the opportunity to try it out for free. By registering an account with ZegoCloud, you will receive 10,000 minutes to experiment with your application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyz1cl8lcxyxvue144b9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyz1cl8lcxyxvue144b9k.png" alt="Product from Zegocloud" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, how to register for a ZegoCloud account?&lt;/p&gt;

&lt;p&gt;Open the following link: UI Kits for Mobile and Web apps - ZEGOCLOUD&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lrr1ip8ly3p3rww45op.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lrr1ip8ly3p3rww45op.png" alt="UIKit" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, click the Start Building button. Then you will be directed to the &lt;a href="https://console.zegocloud.com/account/signup"&gt;SignUp&lt;/a&gt; page as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8p4r5ilnlqf6kzzbnhmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8p4r5ilnlqf6kzzbnhmy.png" alt="register page" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, fill in all the required data. Then, click the Start your free trial button. You will be redirected to the ZegoCloud console page.&lt;/p&gt;

&lt;p&gt;Complete the requested information, as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6e3ij50lsk11euo6xm5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6e3ij50lsk11euo6xm5f.png" alt="completed register" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv3u9appernddur25zll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv3u9appernddur25zll.png" alt="benefit" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press the Go to dashboard button, and you will receive 10,000 free minutes.&lt;/p&gt;

&lt;p&gt;Below is the initial view of your dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0un8tkh6345mh2ts9cf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0un8tkh6345mh2ts9cf3.png" alt="dashboard" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, you have a ZegoCloud account and have 10,000 minutes for the trial.&lt;/p&gt;

&lt;p&gt;Next, let's create a ZegoCloud project. For example, this time I will create a Live Audio Room project, one of the exciting features of ZegoCloud.&lt;/p&gt;

&lt;p&gt;First, you can click the add button at the top left corner to create your project. Alternatively, you can navigate to the ZegoCloud sidebar by selecting the Project tab -&amp;gt; Project Management.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ubg4x61n9nzzbwc1d3c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ubg4x61n9nzzbwc1d3c.png" alt="Project" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you navigate to the create page, a page like the following will appear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe39p5mp8tecd4ya51yqo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe39p5mp8tecd4ya51yqo.png" alt="choose project" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many features are offered, and you can create all projects here. For this time, I will choose Live Audio Room. After selecting it, press the Next button. You will be directed to the next page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73vchjvsy3t705rds3e7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73vchjvsy3t705rds3e7.png" alt="create project" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fill in the project name, then choose one to get started.&lt;br&gt;
You can select UI kits for easier use of Zego because Zego has prepared UI kits to make it even easier to use.&lt;br&gt;
You can also choose SDKs if you want to customize.&lt;/p&gt;

&lt;p&gt;For this time, I will choose Start with UI Kits.&lt;/p&gt;

&lt;p&gt;Next, the ZegoCloud system will start creating the project. Please wait until it's finished.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63zn24xjcikopwjelqg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63zn24xjcikopwjelqg.png" alt="proccesing project" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After it's done, the following page will appear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwuh6mvdbpszwtcxmxwd7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwuh6mvdbpszwtcxmxwd7.png" alt="build app" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose one to integrate Live Audio Room into your application project. This time, I will use this feature for Flutter, so I choose Flutter.&lt;/p&gt;

&lt;p&gt;Next, you will be directed to the UI Configuration page as follows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3d0lghkf7t6xlqayi8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3d0lghkf7t6xlqayi8f.png" alt="Ui Configuration" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, simply press the Save &amp;amp; Start to Integrate button.&lt;/p&gt;

&lt;p&gt;Then, you will be directed to the Obtain Configuration page. You will receive an AppID and AppSign that will be used in building your Flutter application later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64ad2jj0r07n9769q445.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64ad2jj0r07n9769q445.png" alt="Secret key" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to navigate to the console, you can press the Go to Admin Console button.&lt;/p&gt;

&lt;p&gt;Finally, creating a ZegoCloud account and creating a live audio room project in ZegoCloud is completed and successful.&lt;/p&gt;

&lt;p&gt;How to build a ZegoCloud Live Audio Room application with Flutter. You can read about it below.&lt;/p&gt;

&lt;p&gt;Okay, I will assist you in creating a Live Audio Room application in Flutter by utilizing the features provided by ZegoCloud.&lt;br&gt;
I assume that you have already created an account and set up a ZegoCloud project by following the tutorial above.&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating a Flutter Project for Live Audio Room with ZegoCloud
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feji79jcpct02hq4onbqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feji79jcpct02hq4onbqz.png" alt="Create flutter app" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, create a Flutter project either through the terminal or VSCode. I hope you are already familiar with and proficient in creating Flutter projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78nnrgqrhaew6qupyhag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78nnrgqrhaew6qupyhag.png" alt="Starter Flutter" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, you open the ZegoCloud documentation to implement the live audio room in Flutter. You can visit it through the following link: Flutter Dart Live Audio Room Kit SDK Quick start | ZEGOCLOUD Documentation.&lt;br&gt;
Follow the steps inside.&lt;br&gt;
On the sidebar, select Quick Start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm72pssoegs710uchcoev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm72pssoegs710uchcoev.png" alt="prerequisites" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first requirement is to go to the ZegoCloud admin console to obtain the AppId and AppSign. I hope you already know where it is. As I mentioned in the previous content, I have provided the link earlier.&lt;br&gt;
After that, integrate the SDK from ZegoCloud's live audio room by adding the following dependency.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;flutter pub add zego_uikit_prebuilt_live_audio_room&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can add the above command through the terminal console or using the Pubspec Assist library in VS Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqseklgjtxtc0ldr9k4nf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqseklgjtxtc0ldr9k4nf.png" alt="add packages" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If successfully added, it will appear in the pubspec.yaml.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtd5h6hh3ehzahm6cmtm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtd5h6hh3ehzahm6cmtm.png" alt="pubspec.yaml" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, create a Dart file to store the AppId and AppSign from ZegoCloud.&lt;br&gt;
Create it with the name constant_zego.dart and fill in the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ConstantZegoCloud {
  static int appId = AppId_anda;
  static String appSign ='AppSign_anda';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0zjls440wssn5fsjejb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0zjls440wssn5fsjejb.png" alt="constant code" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The AppId and AppSign can be seen as in the following image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6vtr7r9im58aj1fen03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6vtr7r9im58aj1fen03.png" alt="get app id" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgz1g1743o7ol6a7grkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgz1g1743o7ol6a7grkt.png" alt="get app sign" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, create live_page.dart to display the live page. Insert the following code into it.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';
import 'package:zego_uikit_prebuilt_live_audio_room/zego_uikit_prebuilt_live_audio_room.dart';

import 'package:flutter_live_audio_room_zego_cloud/constant_zego.dart';

class LivePage extends StatelessWidget {
  final String roomID;
  final bool isHost;
  final String userName;
  final String userId;

  const LivePage({
    Key? key,
    required this.roomID,
    required this.isHost,
    required this.userName,
    required this.userId,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: ZegoUIKitPrebuiltLiveAudioRoom(
          appID: ConstantZegoCloud
              .appId, // Fill in the appID that you get from ZEGOCLOUD Admin Console.
          appSign: ConstantZegoCloud
              .appSign, // Fill in the appSign that you get from ZEGOCLOUD Admin Console.
          userID: userId,
          userName: userName,
          roomID: roomID,
          config: (isHost
              ? ZegoUIKitPrebuiltLiveAudioRoomConfig.host()
              : ZegoUIKitPrebuiltLiveAudioRoomConfig.audience())
            ..background = background()
            ..userAvatarUrl = 'https://robohash.org/$userId.png'),
    );
  }

  Widget background() {
    /// For background live page
    return Stack(
      children: [
        Container(
          decoration: BoxDecoration(
            image: DecorationImage(
              fit: BoxFit.fill,
              image: Image.asset('assets/images/bg.jpeg').image,
            ),
          ),
        ),
        const Positioned(
            top: 10,
            left: 10,
            child: Text(
              'Live Audio Room',
              overflow: TextOverflow.ellipsis,
              style: TextStyle(
                color: Color(0xff1B1B1B),
                fontSize: 20,
                fontWeight: FontWeight.w800,
              ),
            )),
        Positioned(
          top: 10 + 20,
          left: 10,
          child: Text(
            'ID: $roomID',
            overflow: TextOverflow.ellipsis,
            style: const TextStyle(
              color: Color(0xff606060),
              fontSize: 16,
              fontWeight: FontWeight.w500,
            ),
          ),
        )
      ],
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F026yf06s10gdjdfnp3p5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F026yf06s10gdjdfnp3p5.png" alt="Live Page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above code, the ZegoUIKitPrebuiltLiveAudioRoom widget is a UI kit widget from ZegoCloud used to display the Live Audio Room.&lt;br&gt;
Then, the background() widget function is used to change the background of the live page. Meanwhile, userAvatarUrl is used to change the user's avatar when logged in and entering the live room.&lt;br&gt;
The next step is to create login_page.dart because we will log in first before conducting live audio. Insert the following code into login_page.dart.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';
import 'package:flutter_live_audio_room_zego_cloud/live_page.dart';

class LoginPage extends StatefulWidget {
  const LoginPage({super.key});

  @override
  State&amp;lt;LoginPage&amp;gt; createState() =&amp;gt; _LoginPageState();
}

class _LoginPageState extends State&amp;lt;LoginPage&amp;gt; {
  final usernameController = TextEditingController();
  final roomIdController = TextEditingController();
  bool isHost = false;

  @override
  void dispose() {
    usernameController.dispose();
    roomIdController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Join Live Audio Room',
          style: TextStyle(
            color: Colors.white,
          ),
        ),
        centerTitle: true,
      ),
      body: Padding(
        padding: const EdgeInsets.all(20.0),
        child: SingleChildScrollView(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Image.asset(
                'assets/images/live.png',
                width: 150,
                height: 150,
              ),
              const SizedBox(
                height: 15,
              ),
              const Center(
                child: Text(
                  'Podcast With Friends',
                  style: TextStyle(
                    color: Colors.black,
                    fontWeight: FontWeight.bold,
                    fontSize: 20,
                  ),
                ),
              ),
              const SizedBox(
                height: 30,
              ),
              TextField(
                controller: usernameController,
                decoration: const InputDecoration(labelText: 'Username'),
              ),
              const SizedBox(
                height: 8,
              ),
              TextField(
                controller: roomIdController,
                decoration: const InputDecoration(labelText: 'RoomID'),
              ),
              const SizedBox(
                height: 8,
              ),
              Row(
                children: [
                  const Text('Host ?'),
                  const SizedBox(
                    width: 4,
                  ),
                  Switch(
                      value: isHost,
                      onChanged: (val) {
                        setState(() {
                          isHost = val;
                        });
                      }),
                ],
              ),
              const SizedBox(
                height: 16,
              ),
              ElevatedButton(
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
                    return LivePage(
                        roomID: roomIdController.text,
                        isHost: isHost,
                        userName: usernameController.text,
                        userId:
                            usernameController.text.replaceAll(' ', '').trim());
                  }));
                },
                style: ElevatedButton.styleFrom(
                  backgroundColor: Colors.green.shade300,
                  foregroundColor: Colors.green.shade300,
                  fixedSize: const Size(400, 50),
                ),
                child: const Text(
                  'Join Room',
                  style: TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.bold,
                    fontSize: 16,
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8377g69mxl5r4anpf88.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8377g69mxl5r4anpf88.png" alt="login Page" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, go to the main.dart file and insert the code exactly as follows.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';
import 'package:flutter_live_audio_room_zego_cloud/login_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.green.shade400),
        useMaterial3: true,
        appBarTheme: AppBarTheme(
          color: Colors.green.shade400,
          elevation: 0,
          titleTextStyle: const TextStyle(
            color: Colors.white,
            fontSize: 16.0,
            fontWeight: FontWeight.w500,
          ),
          iconTheme: IconThemeData(
            color: Colors.green.shade400,
          ),
        ),
      ),
      home: const LoginPage(),
      debugShowCheckedModeBanner: false,
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk83wwvneqq67q1xn22fz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk83wwvneqq67q1xn22fz.png" alt="main.dart" width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you have created all the necessary pages and files. Next, we need to configure for Android and iOS. For this tutorial, I will demonstrate the configuration on Android. For iOS configuration, you can refer to the ZegoCloud documentation for Live Audio Room.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Android Configuration&lt;/strong&gt;&lt;br&gt;
Modify the &lt;em&gt;compileSdkVersion&lt;/em&gt; to 33 and &lt;em&gt;minSdkVersion&lt;/em&gt; to 21 in the &lt;em&gt;build.gradle&lt;/em&gt; file in Android. You can find it at your_project/android/app/build.gradle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqriu9qqyh0epicjnkqr3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqriu9qqyh0epicjnkqr3.png" alt="build gradle" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, add permissions to the AndroidManifest.xml file, located here: your_project/app/src/main/AndroidManifest.xml. Copy the following permissions into it.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.INTERNET" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.CAMERA" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.BLUETOOTH" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&amp;gt;
&amp;lt;uses-permission android:name="android.permission.WAKE_LOCK" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzbe51u4vjkywa6jk0m1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzbe51u4vjkywa6jk0m1.png" alt="Android manifest" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To prevent obfuscation of the SDK's public class names, do the following:&lt;/p&gt;

&lt;p&gt;In the folder your_project &amp;gt; android &amp;gt; app, create a file named proguard-rules.pro with the following code as shown below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-keep class **.zego.** { *; }&lt;br&gt;
-keep class **.**.zego_zpns.** { *; }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the following configuration code to the release section of your_project/android/app/build.gradle file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00f4hphun4lu2u7ac2gs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00f4hphun4lu2u7ac2gs.png" alt="proguard" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Android configuration has been completed. Next, you can proceed with running to try out the results of your coding.&lt;/p&gt;

&lt;p&gt;The result will be like the following video.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/watch?si=JZ7kUrFrLE99eObU&amp;amp;v=JKYNlg7fM7s&amp;amp;feature=youtu.be" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--PjH0keZ_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.ytimg.com/vi/JKYNlg7fM7s/maxresdefault.jpg" height="450" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/watch?si=JZ7kUrFrLE99eObU&amp;amp;v=JKYNlg7fM7s&amp;amp;feature=youtu.be" rel="noopener noreferrer" class="c-link"&gt;
          How To Faster Build Live Audio Room App Using Flutter and ZEGOCLOUD SDK - YouTube
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          * Get ZEGOCLOUD UIKits for 10,000 free mins: https://bit.ly/42f7qnC* Take advantage of ZEGOCLOUD: https://bit.ly/48KnwbD* How to build a live audio room: htt...
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--bYlstK9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.youtube.com/s/desktop/77953cee/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Finally, you have successfully created a real-time Live Audio Room and Chatting Room application using ZEGOCLOUD.&lt;/p&gt;

&lt;p&gt;That's all from me, hopefully, it's useful and can help you find solutions.&lt;/p&gt;

&lt;p&gt;Github sample project: &lt;a href="https://github.com/bahrie127/flutter_live_audio_room_zegocloudsdk_sample_app"&gt;Sourcecode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

</description>
      <category>zegocloud</category>
      <category>liveaudio</category>
      <category>streamingservice</category>
      <category>flutter</category>
    </item>
  </channel>
</rss>
