2017-06-07 20:15:36 +00:00
|
|
|
# Jitsi Meet SDK for Android
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
This directory contains the source code of the Jitsi Meet app and the Jitsi Meet
|
|
|
|
SDK for Android.
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
## Jitsi Meet SDK
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
Jitsi Meet SDK is an Android library which embodies the whole Jitsi Meet
|
|
|
|
experience and makes it reusable by third-party apps.
|
|
|
|
|
|
|
|
To get started, extends your `android.app.Activity` from
|
|
|
|
`org.jitsi.meet.sdk.JitsiMeetActivity`:
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
```java
|
|
|
|
package org.jitsi.example;
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
import org.jitsi.meet.sdk.JitsiMeetActivity;
|
|
|
|
|
|
|
|
public class MainActivity extends JitsiMeetActivity {
|
|
|
|
}
|
|
|
|
```
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
Alternatively, you can use the `org.jitsi.meet.sdk.JitsiMeetView` class which
|
|
|
|
extends `android.view.View`:
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
```java
|
|
|
|
package org.jitsi.example;
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
|
|
|
|
|
import org.jitsi.meet.sdk.JitsiMeetView;
|
|
|
|
|
|
|
|
public class MainActivity extends AppCompatActivity {
|
|
|
|
private JitsiMeetView view;
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onBackPressed() {
|
|
|
|
if (!JitsiMeetView.onBackPressed()) {
|
|
|
|
// Invoke the default handler if it wasn't handled by React.
|
|
|
|
super.onBackPressed();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
view = new JitsiMeetView(this);
|
|
|
|
view.loadURL(null);
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
setContentView(view);
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onDestroy() {
|
|
|
|
super.onDestroy();
|
2017-06-07 20:15:36 +00:00
|
|
|
|
2017-07-26 14:41:27 +00:00
|
|
|
view.dispose();
|
|
|
|
view = null;
|
|
|
|
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
JitsiMeetView.onHostDestroy(this);
|
|
|
|
}
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
@Override
|
|
|
|
public void onNewIntent(Intent intent) {
|
|
|
|
JitsiMeetView.onNewIntent(intent);
|
|
|
|
}
|
|
|
|
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
@Override
|
|
|
|
protected void onPause() {
|
|
|
|
super.onPause();
|
2017-06-07 20:15:36 +00:00
|
|
|
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
JitsiMeetView.onHostPause(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onResume() {
|
|
|
|
super.onResume();
|
2017-06-07 20:15:36 +00:00
|
|
|
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
JitsiMeetView.onHostResume(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
### JitsiMeetActivity
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
This class encapsulates a high level API in the form of an Android `Activity`
|
|
|
|
which displays a single `JitsiMeetView`.
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### getWelcomePageEnabled()
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
See JitsiMeetView.getWelcomePageEnabled.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### loadURL(URL)
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
See JitsiMeetView.loadURL.
|
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### setWelcomePageEnabled(boolean)
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
See JitsiMeetView.setWelcomePageEnabled.
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
### JitsiMeetView
|
|
|
|
|
|
|
|
The `JitsiMeetView` class is the core of Jitsi Meet SDK. It's designed to
|
2017-06-07 20:15:36 +00:00
|
|
|
display a Jitsi Meet conference (or a welcome page).
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-07-26 14:41:27 +00:00
|
|
|
#### dispose()
|
|
|
|
|
|
|
|
Releases all resources associated with this view. This method MUST be called
|
|
|
|
when the Activity holding this view is going to be destroyed, usually in the
|
|
|
|
`onDestroy()` method.
|
|
|
|
|
2017-06-07 15:50:30 +00:00
|
|
|
#### getListener()
|
|
|
|
|
2017-06-09 15:51:33 +00:00
|
|
|
Returns the `JitsiMeetViewListener` instance attached to the view.
|
2017-06-07 15:50:30 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### getWelcomePageEnabled()
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
Returns true if the Welcome page is enabled; otherwise, false. If false, a black
|
|
|
|
empty view will be rendered when not in a conference. Defaults to false.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### loadURL(URL)
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-07-26 00:06:03 +00:00
|
|
|
Loads a specific URL which may identify a conference to join. If the specified
|
2017-07-26 19:27:29 +00:00
|
|
|
URL is null and the Welcome page is enabled, the Welcome page is displayed
|
|
|
|
instead.
|
2017-07-26 00:06:03 +00:00
|
|
|
|
|
|
|
#### loadURLString(String)
|
|
|
|
|
|
|
|
Loads a specific URL which may identify a conference to join. If the specified
|
2017-07-26 19:27:29 +00:00
|
|
|
URL is null and the Welcome page is enabled, the Welcome page is displayed
|
|
|
|
instead.
|
|
|
|
|
|
|
|
#### loadURLObject(Bundle)
|
|
|
|
|
|
|
|
Loads a specific URL which may identify a conference to join. The URL is
|
|
|
|
specified in the form of a Bundle of properties which (1) internally are
|
|
|
|
sufficient to construct a URL (string) while (2) abstracting the specifics of
|
|
|
|
constructing the URL away from API clients/consumers. If the specified URL is
|
|
|
|
null and the Welcome page is enabled, the Welcome page is displayed instead.
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
2017-07-28 12:35:19 +00:00
|
|
|
Example:
|
|
|
|
|
|
|
|
```java
|
|
|
|
Bundle configOverwrite = new Bundle();
|
|
|
|
configOverwrite.putBoolean("startWithAudioMuted", true);
|
|
|
|
configOverwrite.putBoolean("startWithVideoMuted", false);
|
|
|
|
Bundle urlBundle = new Bundle();
|
|
|
|
urlBundle.putBundle("configOverwrite", configOverwrite);
|
|
|
|
urlBundle.putString("url", "https://meet.jit.si/Test123");
|
|
|
|
view.loadURLObject(urlBundle);
|
|
|
|
```
|
|
|
|
|
2017-06-07 15:50:30 +00:00
|
|
|
#### setListener(listener)
|
|
|
|
|
2017-06-09 15:51:33 +00:00
|
|
|
Sets the given listener (class implementing the `JitsiMeetViewListener`
|
2017-06-07 15:50:30 +00:00
|
|
|
interface) on the view.
|
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### setWelcomePageEnabled(boolean)
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
Sets whether the Welcome page is enabled. See `getWelcomePageEnabled` for more
|
|
|
|
information.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-07-26 00:06:03 +00:00
|
|
|
NOTE: Must be called before `loadURL`/`loadURLString` for it to take effect.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
#### onBackPressed()
|
|
|
|
|
|
|
|
Helper method which should be called from the activity's `onBackPressed` method.
|
2017-06-07 20:15:36 +00:00
|
|
|
If this function returns `true`, it means the action was handled and thus no
|
|
|
|
extra processing is required; otherwise the app should call the parent's
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
`onBackPressed` method.
|
|
|
|
|
|
|
|
This is a static method.
|
|
|
|
|
|
|
|
#### onHostDestroy(activity)
|
|
|
|
|
|
|
|
Helper method which should be called from the activity's `onDestroy` method.
|
|
|
|
|
|
|
|
This is a static method.
|
|
|
|
|
|
|
|
#### onHostPause(activity)
|
|
|
|
|
|
|
|
Helper method which should be called from the activity's `onPause` method.
|
|
|
|
|
|
|
|
This is a static method.
|
|
|
|
|
|
|
|
#### onHostResume(activity)
|
|
|
|
|
|
|
|
Helper method which should be called from the activity's `onResume` method.
|
|
|
|
|
|
|
|
This is a static method.
|
|
|
|
|
|
|
|
#### onNewIntent(intent)
|
|
|
|
|
2017-06-07 20:15:36 +00:00
|
|
|
Helper method for integrating the *deep linking* functionality. If your app's
|
|
|
|
activity is launched in "singleTask" mode this method should be called from the
|
|
|
|
activity's `onNewIntent` method.
|
[RN] Add initial Jitsi Meet SDK for Android
Dames en heren, welcome to Jitsi Meet SDK for Android, the Jitsi Meet library
for Android.
The Jitsi Meet SDK encapsulates React Native and all the dependencies Jitsi
Meet has so other aopplications can integrate it easily.
Unlike iOS, creating "fat" libraries is not allways (if at all) possible on
Android, however, effort was put into making the integration as easy as
possible.
While React Native can be embedded in native applications, I don't think it was
designed to be embedded as part of an Android library, hidden away from the
application using it. This surfaced as a number of issues which had to be
addressed specifically due to our use-case:
- Activity lifecycle methods must be linked with the React Native engine, so the
library provides wrapper methods.
- Custom fonts have to be manually added as assets, since the provided gradle
script doesn't work properly in a library target.
- The RN packager has to be manually triggered since the gradle script will no
longer do it for us.
At this stage, the Jitsi Meet application is just a small single activity
application which uses the Jitsi Meet SDK to create a single activity which
represents the entire application. Events and external conference handling are
forthcoming.
PS: Yours truly would like to add that it was a lot more fun to work on the iOS
side of things.
2017-05-22 13:33:42 +00:00
|
|
|
|
|
|
|
This is a static method.
|
2017-06-07 15:50:30 +00:00
|
|
|
|
2017-06-09 15:51:33 +00:00
|
|
|
#### JitsiMeetViewListener
|
2017-06-07 15:50:30 +00:00
|
|
|
|
2017-06-09 15:51:33 +00:00
|
|
|
`JitsiMeetViewListener` provides an interface apps can implement to listen to
|
|
|
|
the state of the Jitsi Meet conference displayed in a `JitsiMeetView`.
|
|
|
|
|
|
|
|
### JitsiMeetViewAdapter
|
|
|
|
|
|
|
|
A default implementation of the `JitsiMeetViewListener` interface. Apps may
|
|
|
|
extend the class instead of implementing the interface in order to minimize
|
|
|
|
boilerplate.
|
2017-06-07 15:50:30 +00:00
|
|
|
|
|
|
|
##### onConferenceFailed
|
|
|
|
|
|
|
|
Called when a joining a conference was unsuccessful or when there was an error
|
|
|
|
while in a conference.
|
|
|
|
|
|
|
|
The `data` HashMap contains an "error" key describing the error and a "url"
|
|
|
|
key with the conference URL.
|
|
|
|
|
|
|
|
#### onConferenceJoined
|
|
|
|
|
|
|
|
Called when a conference was joined.
|
|
|
|
|
|
|
|
The `data` HashMap contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### onConferenceLeft
|
|
|
|
|
|
|
|
Called when a conference was left.
|
|
|
|
|
|
|
|
The `data` HashMap contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### onConferenceWillJoin
|
|
|
|
|
|
|
|
Called before a conference is joined.
|
|
|
|
|
|
|
|
The `data` HashMap contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### onConferenceWillLeave
|
|
|
|
|
|
|
|
Called before a conference is left.
|
|
|
|
|
|
|
|
The `data` HashMap contains a "url" key with the conference URL.
|