jitsi / jitsi-meet-sdk-samples

Jitsi Meet mobile SDK examples (Android, iOS and React Native)
Apache License 2.0
277 stars 240 forks source link

Listen for ConferenceTerminated #59

Closed Dewsworld closed 3 years ago

Dewsworld commented 4 years ago

How to listen for ConferenceTerminated with this code?

` package com.example.jitsisdkasmodule

import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import org.jitsi.meet.sdk.* import java.net.MalformedURLException import java.net.URL

class T2: AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState)

    // Initialize default options for Jitsi Meet conferences.
    val serverURL: URL
    serverURL = try {
        URL("https://meet.jit.si")
    } catch (e: MalformedURLException) {
        e.printStackTrace()
        throw RuntimeException("Invalid server URL!")
    }
    val defaultOptions = JitsiMeetConferenceOptions.Builder()
        .setServerURL(serverURL)
        .setWelcomePageEnabled(false)
        .build()
    JitsiMeet.setDefaultConferenceOptions(defaultOptions)

    // Build options object for joining the conference. The SDK will merge the default
    // one we set earlier and this one when joining.
    val options = JitsiMeetConferenceOptions.Builder()
        .setRoom("33")
        .build()
    // Launch the new activity with the given options. The launch() method takes care
    // of creating the required Intent and passing the options.
    JitsiMeetActivity.launch(this, options)

}

} `

jishnurajt94 commented 4 years ago

I have same Issue

waqarul commented 4 years ago

Did you find the solution?

saghul commented 3 years ago

The listener is called on the activity itself. You can subclass JitsiMeetActivity and add your own code in the onConferenceTerminated handler.