How to close a conference room in android?

i have a global variable:
JitsiMeetActivity session;

when i want to join the room i call:
session = new JitsiMeetActivity();

    session.launch(this, options);

which works fine.
but how can i close it programmatically?
if i try to call:
catch (Exception e)
Log.e(“session”, "Failed to properly leave " + e);
i get:
session: Failed to properly leave java.lang.NullPointerException: Attempt to invoke virtual method ‘’ on a null object reference
even though session is not null.

the same happens if i call:
or session.finish();

though session.onBackPressed() works fine…

what am i missing?