Jitsi Android App, how to launch from an intent with arguments to go to a specific room?

73 views Asked by At

If you launch an Android browser with a Jitsi url into a specific room, the Jitsi page has a link to launch the Jitsi app. If you press that link then the browser will launch the Jitsi app into that specific room. So there must be a way to launch the Jitsi app with intent arguments to start in the same room. Does anyone know how to set up a launch intent with arguments?

I tried creating an intent with add string that match the URL arguments.

1

There are 1 answers

0
dcarl661 On
 String cli  = SharedPref.teslaVehicleId + seeLocation;
    cli         = cli.replaceAll("\\s+", "");
    String url  = "https://meet.jit.si/"
                + cli
                + "#config.prejoinConfig.enabled=false"
                + "&config.prejoinpageenabled=false"
                + "&config.startAudioOnly=true"
                + "&config.disableAudioLevels=true"
                + "&config.deeplinking.disabled=true"
                + "&userInfo.displayName=" + seeLocation
                ;
    if(launchurl)    //browser but if the app is installed try the app first
    {
        Uri uri           = Uri.parse(url);
        Intent intent     = new Intent(Intent.ACTION_VIEW,uri);
        intent.setPackage   ("org.jitsi.meet");
        intent.setData      (Uri.parse(url));
        intent.putExtra     (Browser.EXTRA_APPLICATION_ID,"com.safeenv.seeLifeline");
        intent.setFlags     (Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
        // Start the Jitsi Meet Android app or fall back to a web browser
        try
        {
            startActivity(intent);
        }
        catch (ActivityNotFoundException e)
        {
            e.printStackTrace();
            // Handle the case where the app is not installed, e.g., open a web browser gpt original
            Intent urlIntent   = new Intent(Intent.ACTION_VIEW, Uri.parse( url));
            urlIntent.setFlags   (Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity        (urlIntent);
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        //moved to the try the app first try
        //Intent urlIntent   = new Intent(Intent.ACTION_VIEW, Uri.parse( url));
        //urlIntent.setFlags   (Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
        //startActivity        (urlIntent);
    }