Jitsimeet Android App Integration


Jitsimeet Mobile App

Today we are going to learn how you can enjoy video conferencing by integrating Jitsimeet into your own mobile application.

If you can get more information about jitsi meet by clicking on the documentation link given below. 
https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk

So let's learn how to integrate Jitsimeet in your own Android application step by step


  1. Create a new Android project using Android Studiocreate android project
  2. Select  a Project Templateselect your project template
  3. Configure your Projectconfigure your project
  4. Add the below code in
  5.        
    
               allprojects {
        repositories {
            google()
            jcenter()
            maven {
                url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
            }
        }
    }
    
           
     
  6. Add dependency into build.gradle app file
  7.        
    dependencies {
        // (other dependencies)
        implementation ('org.jitsi.react:jitsi-meet-sdk:2.+') { transitive = true }
    }
    
           
      
  8. Open MainActivity.java file and write the below code

       

package com.example.jitsimeetdummy;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import org.jitsi.meet.sdk.JitsiMeet;
import org.jitsi.meet.sdk.JitsiMeetActivity;
import org.jitsi.meet.sdk.JitsiMeetConferenceOptions;
import org.jitsi.meet.sdk.JitsiMeetUserInfo;

import java.net.MalformedURLException;
import java.net.URL;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        URL serverURL;
        try {
         //   serverURL = new URL(server url);
            serverURL = new URL(url);
        } catch (MalformedURLException e) {
            e.printStackTrace();
            throw new RuntimeException("Invalid server URL!");
        }
        JitsiMeetUserInfo userInfo = new JitsiMeetUserInfo();
        userInfo.setDisplayName("Dummy");
        userInfo.setEmail("info@dummy.com");

        try {
            userInfo.setAvatar(new URL("https://randomuser.me/api/portraits/lego/5.jpg"));
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        JitsiMeetConferenceOptions defaultOptions
                = new JitsiMeetConferenceOptions.Builder()
                .setServerURL(serverURL)
                .setUserInfo(userInfo)
                .setWelcomePageEnabled(false)
                .build();
        JitsiMeet.setDefaultConferenceOptions(defaultOptions);


        JitsiMeetConferenceOptions options
                = new JitsiMeetConferenceOptions.Builder()
                .setRoom("Enter")
                .build();

        JitsiMeetActivity.launch(this, options);
    }
}

       
 

Comments