瀏覽代碼

[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.
master
Saúl Ibarra Corretgé 8 年之前
父節點
當前提交
ddea60efe9

+ 134
- 0
android/README.md 查看文件

@@ -0,0 +1,134 @@
1
+# Jitsi Meet for Android
2
+
3
+This directory contains the source code for Jitsi Meet for Android (the
4
+application) and the Jitsi Meet SDK for Android.
5
+
6
+## Jitsi Meet SDK
7
+
8
+Jitsi Meet SDK is an Android library which embodies the Jitsi Meet experience,
9
+gift-wrapped so other applications can use it. Example use:
10
+
11
+```java
12
+package org.jitsi.example;
13
+
14
+import android.support.v7.app.AppCompatActivity;
15
+import android.os.Bundle;
16
+
17
+import org.jitsi.meet.sdk.*;
18
+
19
+
20
+public class CustomActivity extends AppCompatActivity {
21
+    private JitsiMeetView jitsiMeetView;
22
+
23
+    @Override
24
+    public void onBackPressed() {
25
+        if (!JitsiMeetView.onBackPressed()) {
26
+            // Invoke the default handler if it wasn't handled by React.
27
+            super.onBackPressed();
28
+        }
29
+    }
30
+
31
+    @Override
32
+    protected void onCreate(Bundle savedInstanceState) {
33
+        super.onCreate(savedInstanceState);
34
+
35
+        jitsiMeetView = new JitsiMeetView(this);
36
+        jitsiMeetView.loadURL(null);
37
+
38
+        setContentView(jitsiMeetView);
39
+    }
40
+
41
+    @Override
42
+    public void onNewIntent(Intent intent) {
43
+        JitsiMeetView.onNewIntent(intent);
44
+    }
45
+
46
+    @Override
47
+    protected void onDestroy() {
48
+        super.onDestroy();
49
+        JitsiMeetView.onHostDestroy(this);
50
+    }
51
+
52
+    @Override
53
+    protected void onPause() {
54
+        super.onPause();
55
+        JitsiMeetView.onHostPause(this);
56
+    }
57
+
58
+    @Override
59
+    protected void onResume() {
60
+        super.onResume();
61
+        JitsiMeetView.onHostResume(this);
62
+    }
63
+
64
+}
65
+```
66
+
67
+Alternatively, you can use the `JitsiMeetBaseActivity` class, which already has
68
+all activity lifecycle methods hooked up:
69
+
70
+```java
71
+package org.jitsi.example;
72
+
73
+import org.jitsi.meet.sdk.*;
74
+
75
+
76
+public class MainActivity extends JitsiMeetBaseActivity {
77
+}
78
+
79
+```
80
+
81
+### JitsiMeetBaseActivity
82
+
83
+This class encapsulates a high level API in the form of an Android activity
84
+which displays a single `JitsiMeetView` views.
85
+
86
+#### loadURL(url)
87
+
88
+See JitsiMeetView.loadURL.
89
+
90
+
91
+### JitsiMeetView
92
+
93
+The `JitsiMeetView` class is the core of Jitsi Meet SDK. It's designed to
94
+display a Jitsi Meet conference view (or a welcome page).
95
+
96
+#### loadURL(url)
97
+
98
+Loads the given URL and joins the conference which is being pointed to. If null,
99
+it will load the welcome page.
100
+
101
+#### onBackPressed()
102
+
103
+Helper method which should be called from the activity's `onBackPressed` method.
104
+If this function returns `true` it means the action was handled and thus no
105
+extra processing is required, otherwise the application should call the parent's
106
+`onBackPressed` method.
107
+
108
+This is a static method.
109
+
110
+#### onHostDestroy(activity)
111
+
112
+Helper method which should be called from the activity's `onDestroy` method.
113
+
114
+This is a static method.
115
+
116
+#### onHostPause(activity)
117
+
118
+Helper method which should be called from the activity's `onPause` method.
119
+
120
+This is a static method.
121
+
122
+#### onHostResume(activity)
123
+
124
+Helper method which should be called from the activity's `onResume` method.
125
+
126
+This is a static method.
127
+
128
+#### onNewIntent(intent)
129
+
130
+Helper method for integrating the *deep linking* functionality. If your
131
+application's activity is launched in "singleTask" mode this method should
132
+be called from the activity's `onNewIntent` method.
133
+
134
+This is a static method.

+ 0
- 66
android/app/BUCK 查看文件

@@ -1,66 +0,0 @@
1
-import re
2
-
3
-# To learn about Buck see [Docs](https://buckbuild.com/).
4
-# To run your application with Buck:
5
-# - install Buck
6
-# - `npm start` - to start the packager
7
-# - `cd android`
8
-# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9
-# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10
-# - `buck install -r android/app` - compile, install and run application
11
-#
12
-
13
-lib_deps = []
14
-for jarfile in glob(['libs/*.jar']):
15
-  name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16
-  lib_deps.append(':' + name)
17
-  prebuilt_jar(
18
-    name = name,
19
-    binary_jar = jarfile,
20
-  )
21
-
22
-for aarfile in glob(['libs/*.aar']):
23
-  name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24
-  lib_deps.append(':' + name)
25
-  android_prebuilt_aar(
26
-    name = name,
27
-    aar = aarfile,
28
-  )
29
-
30
-android_library(
31
-  name = 'all-libs',
32
-  exported_deps = lib_deps
33
-)
34
-
35
-android_library(
36
-  name = 'app-code',
37
-  srcs = glob([
38
-    'src/main/java/**/*.java',
39
-  ]),
40
-  deps = [
41
-    ':all-libs',
42
-    ':build_config',
43
-    ':res',
44
-  ],
45
-)
46
-
47
-android_build_config(
48
-  name = 'build_config',
49
-  package = 'org.jitsi.meet',
50
-)
51
-
52
-android_resource(
53
-  name = 'res',
54
-  res = 'src/main/res',
55
-  package = 'org.jitsi.meet',
56
-)
57
-
58
-android_binary(
59
-  name = 'app',
60
-  package_type = 'debug',
61
-  manifest = 'src/main/AndroidManifest.xml',
62
-  keystore = '//android/keystores:debug',
63
-  deps = [
64
-    ':app-code',
65
-  ],
66
-)

+ 13
- 124
android/app/build.gradle 查看文件

@@ -1,136 +1,38 @@
1 1
 apply plugin: 'com.android.application'
2 2
 
3
-import com.android.build.OutputFile
4
-
5
-/**
6
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
- * and bundleReleaseJsAndAssets).
8
- * These basically call `react-native bundle` with the correct arguments during the Android build
9
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
- * bundle directly from the development server. Below you can see all the possible configurations
11
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
- *
14
- * project.ext.react = [
15
- *   // the name of the generated asset file containing your JS bundle
16
- *   bundleAssetName: "index.android.bundle",
17
- *
18
- *   // the entry file for bundle generation
19
- *   entryFile: "index.android.js",
20
- *
21
- *   // whether to bundle JS and assets in debug mode
22
- *   bundleInDebug: false,
23
- *
24
- *   // whether to bundle JS and assets in release mode
25
- *   bundleInRelease: true,
26
- *
27
- *   // whether to bundle JS and assets in another build variant (if configured).
28
- *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29
- *   // The configuration property can be in the following formats
30
- *   //         'bundleIn${productFlavor}${buildType}'
31
- *   //         'bundleIn${buildType}'
32
- *   // bundleInFreeDebug: true,
33
- *   // bundleInPaidRelease: true,
34
- *   // bundleInBeta: true,
35
- *
36
- *   // the root of your project, i.e. where "package.json" lives
37
- *   root: "../../",
38
- *
39
- *   // where to put the JS bundle asset in debug mode
40
- *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41
- *
42
- *   // where to put the JS bundle asset in release mode
43
- *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44
- *
45
- *   // where to put drawable resources / React Native assets, e.g. the ones you use via
46
- *   // require('./image.png')), in debug mode
47
- *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48
- *
49
- *   // where to put drawable resources / React Native assets, e.g. the ones you use via
50
- *   // require('./image.png')), in release mode
51
- *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52
- *
53
- *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54
- *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55
- *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
56
- *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57
- *   // for example, you might want to remove it from here.
58
- *   inputExcludes: ["android/**", "ios/**"],
59
- *
60
- *   // override which node gets called and with what additional arguments
61
- *   nodeExecutableAndArgs: ["node"]
62
- *
63
- *   // supply additional arguments to the packager
64
- *   extraPackagerArgs: []
65
- * ]
66
- */
67
-
68
-apply from: '../../node_modules/react-native/react.gradle'
69
-
70
-/**
71
- * Set this to true to create two separate APKs instead of one:
72
- *   - An APK that only works on ARM devices
73
- *   - An APK that only works on x86 devices
74
- * The advantage is the size of the APK is reduced by about 4MB.
75
- * Upload all the APKs to the Play Store and people will download
76
- * the correct one based on the CPU architecture of their device.
77
- */
78
-def enableSeparateBuildPerCPUArchitecture = false
79
-
80
-/**
81
- * Run Proguard to shrink the Java bytecode in release builds.
82
- */
83
-def enableProguardInReleaseBuilds = false
84 3
 
85 4
 android {
86
-    compileSdkVersion 23
87
-    buildToolsVersion '23.0.1'
5
+    compileSdkVersion rootProject.ext.compileSdkVersion
6
+    buildToolsVersion rootProject.ext.buildToolsVersion
88 7
 
89 8
     defaultConfig {
90 9
         applicationId 'org.jitsi.meet'
91
-        minSdkVersion 16
92
-        targetSdkVersion 22
93 10
         versionCode Integer.parseInt("${version}")
94 11
         versionName "1.4.${version}"
12
+
13
+        minSdkVersion rootProject.ext.minSdkVersion
14
+        targetSdkVersion rootProject.ext.targetSdkVersion
15
+
95 16
         ndk {
96 17
             abiFilters 'armeabi-v7a', 'x86'
97 18
         }
19
+
98 20
         packagingOptions {
99 21
             // The project react-native does not provide 64-bit binaries at the
100 22
             // time of this writing. Unfortunately, packaging any 64-bit
101 23
             // binaries into the .apk will crash the app at runtime on 64-bit
102 24
             // platforms.
103
-            exclude 'lib/x86_64/libjingle_peerconnection_so.so'
104
-            exclude 'lib/arm64-v8a/libjingle_peerconnection_so.so'
105
-        }
106
-    }
107
-    splits {
108
-        abi {
109
-            reset()
110
-            enable enableSeparateBuildPerCPUArchitecture
111
-            universalApk false  // If true, also generate a universal APK
112
-            include 'armeabi-v7a', 'x86'
25
+            exclude '/lib/mips64/**'
26
+            exclude '/lib/arm64-v8a/**'
27
+            exclude '/lib/x86_64/**'
113 28
         }
114 29
     }
115 30
     buildTypes {
116 31
         release {
117
-            minifyEnabled enableProguardInReleaseBuilds
32
+            minifyEnabled false
118 33
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
119 34
         }
120 35
     }
121
-    // applicationVariants are e.g. debug, release
122
-    applicationVariants.all { variant ->
123
-        variant.outputs.each { output ->
124
-            // For each separate APK per architecture, set a unique version code as described here:
125
-            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126
-            def versionCodes = ['armeabi-v7a':1, 'x86':2]
127
-            def abi = output.getFilter(OutputFile.ABI)
128
-            if (abi != null) {  // null for the universal-debug, universal-release variants
129
-                output.versionCodeOverride =
130
-                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
131
-            }
132
-        }
133
-    }
134 36
 }
135 37
 
136 38
 if (project.hasProperty('JITSI_SIGNING')
@@ -139,21 +41,8 @@ if (project.hasProperty('JITSI_SIGNING')
139 41
 }
140 42
 
141 43
 dependencies {
142
-    compile project(':react-native-background-timer')
143
-    compile project(':react-native-immersive')
144
-    compile project(':react-native-keep-awake')
145
-    compile project(':react-native-vector-icons')
146
-    compile project(':react-native-webrtc')
147 44
     compile fileTree(dir: 'libs', include: ['*.jar'])
148
-    compile 'com.android.support:appcompat-v7:23.0.1'
149
-    compile 'com.facebook.react:react-native:+'  // From node_modules
150
-}
151
-
152
-apply from: '../../node_modules/react-native-vector-icons/fonts.gradle'
153 45
 
154
-// Run this once to be able to run the application with BUCK
155
-// puts all compile dependencies into folder libs for BUCK to use
156
-task copyDownloadableDepsToLibs(type: Copy) {
157
-    from configurations.compile
158
-    into 'libs'
46
+    debugCompile project(path: ':sdk', configuration: 'debug')
47
+    releaseCompile project(path: ':sdk', configuration: 'release')
159 48
 }

+ 1
- 25
android/app/src/main/AndroidManifest.xml 查看文件

@@ -1,30 +1,8 @@
1
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="org.jitsi.meet"
3
-    android:versionCode="1"
4
-    android:versionName="1.0">
5
-
6
-    <!-- XXX: ACCESS_NETWORK_STATE is required by WebRTC. -->
7
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8
-    <uses-permission android:name="android.permission.BLUETOOTH" />
9
-    <uses-permission android:name="android.permission.CAMERA" />
10
-    <uses-permission android:name="android.permission.INTERNET" />
11
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
12
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
13
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
14
-    <uses-permission android:name="android.permission.WAKE_LOCK"/>
15
-
16
-    <uses-feature android:name="android.hardware.camera" />
17
-    <uses-feature android:name="android.hardware.camera.autofocus"/>
18
-
19
-    <uses-sdk
20
-        android:minSdkVersion="16"
21
-        android:targetSdkVersion="23" />
22
-
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.jitsi.meet">
23 2
     <application
24 3
       android:allowBackup="true"
25 4
       android:icon="@mipmap/ic_launcher"
26 5
       android:label="@string/app_name"
27
-      android:name=".MainApplication"
28 6
       android:theme="@style/AppTheme">
29 7
       <activity
30 8
         android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
@@ -54,7 +32,5 @@
54 32
             <data android:scheme="org.jitsi.meet" />
55 33
         </intent-filter>
56 34
       </activity>
57
-      <activity
58
-        android:name="com.facebook.react.devsupport.DevSettingsActivity" />
59 35
     </application>
60 36
 </manifest>

+ 28
- 41
android/app/src/main/java/org/jitsi/meet/MainActivity.java 查看文件

@@ -1,46 +1,33 @@
1
-package org.jitsi.meet;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
2 16
 
3
-import com.facebook.react.ReactActivity;
4
-import com.facebook.react.ReactActivityDelegate;
5
-import com.facebook.react.ReactRootView;
17
+package org.jitsi.meet;
6 18
 
7
-public class MainActivity extends ReactActivity {
8
-    /**
9
-     * {@inheritDoc}
10
-     *
11
-     * Overrides {@link ReactActivity#createRootActivityDelegate()} to customize
12
-     * the {@link ReactRootView} with a background color that is in accord with
13
-     * the JavaScript and iOS parts of the application and causes less perceived
14
-     * visual flicker than the default background color.
15
-     */
16
-    @Override
17
-    protected ReactActivityDelegate createReactActivityDelegate() {
18
-        return new ReactActivityDelegate(this, getMainComponentName()) {
19
-            /**
20
-             * {@inheritDoc}
21
-             *
22
-             * Overrides {@link ReactActivityDelegate#createRootView()} to
23
-             * customize the {@link ReactRootView} with a background color that
24
-             * is in accord with the JavaScript and iOS parts of the application
25
-             * and causes less perceived visual flicker than the default
26
-             * background color.
27
-             */
28
-            @Override
29
-            protected ReactRootView createRootView() {
30
-                ReactRootView rootView = super.createRootView();
19
+import org.jitsi.meet.sdk.JitsiMeetBaseActivity;
31 20
 
32
-                rootView.setBackgroundColor(0xFF111111);
33
-                return rootView;
34
-            }
35
-        };
36
-    }
37 21
 
38
-    /**
39
-     * Returns the name of the main component registered from JavaScript.
40
-     * This is used to schedule rendering of the component.
41
-     */
42
-    @Override
43
-    protected String getMainComponentName() {
44
-        return "App";
45
-    }
22
+/**
23
+ * The one and only Activity that Jitsi Meet (the app) needs. The activity is launched in
24
+ * "singleTask" mode, so it will be created upon application initialization and there will be
25
+ * a single instance of it. Further attempts at launching the application once it was already
26
+ * launched will result in <tt>onNewIntent</tt> being called.
27
+ *
28
+ * This Activity inherits from JitsiMeetBaseActivity without adding anything to it. It merely exists to
29
+ * keep the React Native CLI working, since it always tries to launch an activity called
30
+ * "MainActivity" when doing "react-native run-android".
31
+ */
32
+public class MainActivity extends JitsiMeetBaseActivity {
46 33
 }

+ 0
- 65
android/app/src/main/java/org/jitsi/meet/MainApplication.java 查看文件

@@ -1,65 +0,0 @@
1
-package org.jitsi.meet;
2
-
3
-import android.app.Application;
4
-
5
-import com.facebook.react.ReactApplication;
6
-import com.facebook.react.ReactNativeHost;
7
-import com.facebook.react.ReactPackage;
8
-import com.facebook.soloader.SoLoader;
9
-
10
-import java.util.Arrays;
11
-import java.util.List;
12
-
13
-public class MainApplication extends Application implements ReactApplication {
14
-    private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
15
-        /**
16
-         * {@inheritDoc}
17
-         */
18
-        @Override
19
-        public boolean getUseDeveloperSupport() {
20
-            return BuildConfig.DEBUG;
21
-        }
22
-
23
-        /**
24
-         * {@inheritDoc}
25
-         */
26
-        @Override
27
-        protected List<ReactPackage> getPackages() {
28
-            return Arrays.<ReactPackage>asList(
29
-                new com.corbt.keepawake.KCKeepAwakePackage(),
30
-                new com.facebook.react.shell.MainReactPackage(),
31
-                new com.oblador.vectoricons.VectorIconsPackage(),
32
-                new com.ocetnik.timer.BackgroundTimerPackage(),
33
-                new com.oney.WebRTCModule.WebRTCModulePackage(),
34
-                new com.rnimmersive.RNImmersivePackage(),
35
-                new org.jitsi.meet.audiomode.AudioModePackage(),
36
-                new org.jitsi.meet.proximity.ProximityPackage()
37
-            );
38
-        }
39
-    };
40
-
41
-    /**
42
-     * {@inheritDoc}
43
-     */
44
-    @Override
45
-    public ReactNativeHost getReactNativeHost() {
46
-        return mReactNativeHost;
47
-    }
48
-
49
-    /**
50
-     * {@inheritDoc}
51
-     */
52
-    @Override
53
-    public void onCreate() {
54
-        super.onCreate();
55
-
56
-        SoLoader.init(this, /* native exopackage */ false);
57
-
58
-        if (!getReactNativeHost()
59
-                .getReactInstanceManager()
60
-                    .getDevSupportManager()
61
-                        .getDevSupportEnabled()) {
62
-            // TODO Auto-generated method stub
63
-        }
64
-    }
65
-}

+ 0
- 2
android/app/src/main/res/values/styles.xml 查看文件

@@ -1,9 +1,7 @@
1 1
 <resources>
2
-
3 2
     <!-- Base application theme. -->
4 3
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5 4
         <!-- Customize your theme here. -->
6 5
         <item name="android:windowTranslucentStatus">true</item>
7 6
     </style>
8
-
9 7
 </resources>

+ 7
- 0
android/build.gradle 查看文件

@@ -22,3 +22,10 @@ allprojects {
22 22
         }
23 23
     }
24 24
 }
25
+
26
+ext {
27
+    compileSdkVersion = 23
28
+    buildToolsVersion = "23.0.1"
29
+    minSdkVersion    = 16
30
+    targetSdkVersion = 23
31
+}

+ 1
- 0
android/sdk/.gitignore 查看文件

@@ -0,0 +1 @@
1
+/build

+ 108
- 0
android/sdk/build.gradle 查看文件

@@ -0,0 +1,108 @@
1
+apply plugin: 'com.android.library'
2
+
3
+android {
4
+    compileSdkVersion rootProject.ext.compileSdkVersion
5
+    buildToolsVersion rootProject.ext.buildToolsVersion
6
+
7
+    defaultConfig {
8
+        minSdkVersion rootProject.ext.minSdkVersion
9
+        targetSdkVersion rootProject.ext.targetSdkVersion
10
+        publishNonDefault true
11
+    }
12
+
13
+    buildTypes {
14
+        debug {}
15
+        release {
16
+            minifyEnabled false
17
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18
+        }
19
+    }
20
+}
21
+
22
+dependencies {
23
+    compile fileTree(dir: 'libs', include: ['*.jar'])
24
+
25
+    compile 'com.android.support:appcompat-v7:23.0.1'
26
+    compile 'com.facebook.react:react-native:+'
27
+
28
+    compile project(':react-native-background-timer')
29
+    compile project(':react-native-immersive')
30
+    compile project(':react-native-keep-awake')
31
+    compile project(':react-native-vector-icons')
32
+    compile project(':react-native-webrtc')
33
+}
34
+
35
+// Build process helpers
36
+//
37
+
38
+void runBefore(String dependentTaskName, Task task) {
39
+    Task dependentTask = tasks.findByPath(dependentTaskName);
40
+    if (dependentTask != null) {
41
+        dependentTask.dependsOn task
42
+    }
43
+}
44
+
45
+gradle.projectsEvaluated {
46
+    android.buildTypes.all { buildType ->
47
+        def buildNameCapitalized = "${buildType.name.capitalize()}"
48
+        def bundlePath = "${buildDir}/intermediates/bundles/${buildType.name}"
49
+
50
+        // Bundle fonts in react-native-vector-icons
51
+        //
52
+
53
+        def currentFontTask = tasks.create(name: "${buildType.name}CopyFonts", type: Copy) {
54
+            from("${projectDir}/../../node_modules/react-native-vector-icons/Fonts/")
55
+            into("${bundlePath}/assets/fonts")
56
+        }
57
+
58
+        currentFontTask.dependsOn("merge${buildNameCapitalized}Resources")
59
+        currentFontTask.dependsOn("merge${buildNameCapitalized}Assets")
60
+
61
+        runBefore("processArmeabi-v7a${buildNameCapitalized}Resources", currentFontTask)
62
+        runBefore("processX86${buildNameCapitalized}Resources", currentFontTask)
63
+        runBefore("processUniversal${buildNameCapitalized}Resources", currentFontTask)
64
+        runBefore("process${buildNameCapitalized}Resources", currentFontTask)
65
+
66
+        // Bundle JavaScript and React resources
67
+        // (adapted from react-native/react.gradle)
68
+        //
69
+
70
+        // React js bundle directories
71
+        def jsBundleDir = file("${bundlePath}/assets")
72
+        def resourcesDir = file("${bundlePath}/res/merged")
73
+        def jsBundleFile = file("${jsBundleDir}/index.android.bundle")
74
+
75
+        // Bundle task name for variant
76
+        def bundleJsAndAssetsTaskName = "bundle${buildNameCapitalized}JsAndAssets"
77
+
78
+        def currentBundleTask = tasks.create(
79
+                name: bundleJsAndAssetsTaskName,
80
+                type: Exec) {
81
+
82
+            // Set up inputs and outputs so gradle can cache the result
83
+            def reactRoot = file("${projectDir}/../../")
84
+            inputs.files fileTree(dir: reactRoot, excludes: ["android/**", "ios/**"])
85
+            outputs.dir jsBundleDir
86
+            outputs.dir resourcesDir
87
+
88
+            // Set up the call to the react-native cli
89
+            workingDir reactRoot
90
+
91
+            // Create JS bundle
92
+            def devEnabled = !buildNameCapitalized.toLowerCase().contains("release")
93
+            commandLine("node", "node_modules/react-native/local-cli/cli.js", "bundle", "--platform", "android", "--dev", "${devEnabled}",
94
+                    "--reset-cache", "--entry-file", "index.android.js", "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir)
95
+
96
+            // TODO: disable task in Debug mode?
97
+        }
98
+
99
+        // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process
100
+        currentBundleTask.dependsOn("merge${buildNameCapitalized}Resources")
101
+        currentBundleTask.dependsOn("merge${buildNameCapitalized}Assets")
102
+
103
+        runBefore("processArmeabi-v7a${buildNameCapitalized}Resources", currentBundleTask)
104
+        runBefore("processX86${buildNameCapitalized}Resources", currentBundleTask)
105
+        runBefore("processUniversal${buildNameCapitalized}Resources", currentBundleTask)
106
+        runBefore("process${buildNameCapitalized}Resources", currentBundleTask)
107
+    }
108
+}

+ 25
- 0
android/sdk/proguard-rules.pro 查看文件

@@ -0,0 +1,25 @@
1
+# Add project specific ProGuard rules here.
2
+# By default, the flags in this file are appended to flags specified
3
+# in /Users/scorretge/Library/Android/sdk/tools/proguard/proguard-android.txt
4
+# You can edit the include path and order by changing the proguardFiles
5
+# directive in build.gradle.
6
+#
7
+# For more details, see
8
+#   http://developer.android.com/guide/developing/tools/proguard.html
9
+
10
+# Add any project specific keep options here:
11
+
12
+# If your project uses WebView with JS, uncomment the following
13
+# and specify the fully qualified class name to the JavaScript interface
14
+# class:
15
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
+#   public *;
17
+#}
18
+
19
+# Uncomment this to preserve the line number information for
20
+# debugging stack traces.
21
+#-keepattributes SourceFile,LineNumberTable
22
+
23
+# If you keep the line number information, uncomment this to
24
+# hide the original source file name.
25
+#-renamesourcefileattribute SourceFile

+ 21
- 0
android/sdk/src/main/AndroidManifest.xml 查看文件

@@ -0,0 +1,21 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.jitsi.meet.sdk">
2
+    <!-- XXX: ACCESS_NETWORK_STATE is required by WebRTC. -->
3
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
4
+    <uses-permission android:name="android.permission.BLUETOOTH" />
5
+    <uses-permission android:name="android.permission.CAMERA" />
6
+    <uses-permission android:name="android.permission.INTERNET" />
7
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
8
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
9
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
10
+    <uses-permission android:name="android.permission.WAKE_LOCK"/>
11
+
12
+    <uses-feature android:name="android.hardware.camera" />
13
+    <uses-feature android:name="android.hardware.camera.autofocus"/>
14
+
15
+    <application android:allowBackup="true"
16
+                 android:label="@string/app_name"
17
+                 android:supportsRtl="true">
18
+        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
19
+    </application>
20
+
21
+</manifest>

android/app/src/main/assets/fonts/jitsi.ttf → android/sdk/src/main/assets/fonts/jitsi.ttf 查看文件


+ 144
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetBaseActivity.java 查看文件

@@ -0,0 +1,144 @@
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk;
18
+
19
+import android.content.Intent;
20
+import android.net.Uri;
21
+import android.os.Build;
22
+import android.provider.Settings;
23
+import android.support.annotation.Nullable;
24
+import android.support.v7.app.AppCompatActivity;
25
+import android.os.Bundle;
26
+
27
+import java.net.URL;
28
+
29
+
30
+/**
31
+ * Base Activity for applications integrating Jitsi Meet at a higher level. It contains all the
32
+ * required wiring between the <tt>JKConferenceView</tt> and the Activity lifecycle methods already
33
+ * implemented.
34
+ *
35
+ * In this activity we use a single <tt>JKConferenceView</tt> instance. This instance gives us
36
+ * access to a view which displays the welcome page and the conference itself. All lifetime methods
37
+ * associated with this Activity are hooked to the React Native subsystem via proxy calls through
38
+ * the <tt>JKConferenceView</tt> static methods.
39
+ */
40
+public class JitsiMeetBaseActivity extends AppCompatActivity {
41
+    private JitsiMeetView jitsiMeetView;
42
+    public static final int OVERLAY_PERMISSION_REQ_CODE = 4242;
43
+
44
+    /**
45
+     * Loads the given URL and displays the conference. If the specified URL is null, the welcome
46
+     * page is displayed instead.
47
+     *
48
+     * @param url - The conference URL.
49
+     */
50
+    public void loadURL(@Nullable URL url) {
51
+        jitsiMeetView.loadURL(url);
52
+    }
53
+
54
+    /**
55
+     * {@inheritDoc}
56
+     */
57
+    @Override
58
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
59
+        if (requestCode == OVERLAY_PERMISSION_REQ_CODE) {
60
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
61
+                if (!Settings.canDrawOverlays(this)) {
62
+                    // Permission not granted...
63
+                    return;
64
+                }
65
+            }
66
+
67
+            setContentView(jitsiMeetView);
68
+        }
69
+    }
70
+
71
+    /**
72
+     * {@inheritDoc}
73
+     */
74
+    @Override
75
+    public void onBackPressed() {
76
+        if (!JitsiMeetView.onBackPressed()) {
77
+            // Invoke the default handler if it wasn't handled by React.
78
+            super.onBackPressed();
79
+        }
80
+    }
81
+
82
+    /**
83
+     * {@inheritDoc}
84
+     */
85
+    @Override
86
+    protected void onCreate(Bundle savedInstanceState) {
87
+        super.onCreate(savedInstanceState);
88
+
89
+        jitsiMeetView = new JitsiMeetView(this);
90
+        jitsiMeetView.loadURL(null);
91
+
92
+        /**
93
+         * In debug mode React needs permission to write over other apps in order to display the
94
+         * warning and error overlays.
95
+         */
96
+        if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
97
+            !Settings.canDrawOverlays(this)) {
98
+
99
+            Intent intent
100
+                = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
101
+                Uri.parse("package:" + getPackageName()));
102
+            startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
103
+            return;
104
+        }
105
+
106
+        setContentView(jitsiMeetView);
107
+    }
108
+
109
+    /**
110
+     * {@inheritDoc}
111
+     */
112
+    @Override
113
+    public void onNewIntent(Intent intent) {
114
+        JitsiMeetView.onNewIntent(intent);
115
+    }
116
+
117
+    /**
118
+     * {@inheritDoc}
119
+     */
120
+    @Override
121
+    protected void onDestroy() {
122
+        super.onDestroy();
123
+        JitsiMeetView.onHostDestroy(this);
124
+    }
125
+
126
+    /**
127
+     * {@inheritDoc}
128
+     */
129
+    @Override
130
+    protected void onPause() {
131
+        super.onPause();
132
+        JitsiMeetView.onHostPause(this);
133
+    }
134
+
135
+    /**
136
+     * {@inheritDoc}
137
+     */
138
+    @Override
139
+    protected void onResume() {
140
+        super.onResume();
141
+        JitsiMeetView.onHostResume(this);
142
+    }
143
+
144
+}

+ 176
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java 查看文件

@@ -0,0 +1,176 @@
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk;
18
+
19
+import android.app.Activity;
20
+import android.app.Application;
21
+import android.content.Context;
22
+import android.content.Intent;
23
+import android.os.Bundle;
24
+import android.support.annotation.NonNull;
25
+import android.support.annotation.Nullable;
26
+import android.widget.FrameLayout;
27
+
28
+import com.facebook.react.ReactInstanceManager;
29
+import com.facebook.react.ReactRootView;
30
+import com.facebook.react.common.LifecycleState;
31
+
32
+import java.net.URL;
33
+
34
+
35
+public class JitsiMeetView extends FrameLayout {
36
+    /**
37
+     * React Native root view.
38
+     */
39
+    private ReactRootView mReactRootView;
40
+
41
+    /**
42
+     * React Native bridge. The instance manager allows embedding applications to create multiple
43
+     * root views off the same JavaScript bundle.
44
+     */
45
+    private static ReactInstanceManager mReactInstanceManager;
46
+
47
+    /**
48
+     * Background color used by this view and the React Native root view.
49
+     */
50
+    private static final int BACKGROUND_COLOR = 0xFF111111;
51
+
52
+    public JitsiMeetView(@NonNull Context context) {
53
+        super(context);
54
+
55
+        setBackgroundColor(BACKGROUND_COLOR);
56
+
57
+        if (mReactInstanceManager == null) {
58
+            initReactInstanceManager(((Activity)context).getApplication());
59
+        }
60
+    }
61
+
62
+    /**
63
+     * Loads the given URL and displays the conference. If the specified URL is null, the welcome
64
+     * page is displayed instead.
65
+     *
66
+     * @param url - The conference URL.
67
+     */
68
+    public void loadURL(@Nullable URL url) {
69
+        Bundle props = new Bundle();
70
+
71
+        if (url != null) {
72
+            props.putString("url", url.toString());
73
+        }
74
+
75
+        if (mReactRootView == null) {
76
+            mReactRootView = new ReactRootView(getContext());
77
+            mReactRootView.startReactApplication(mReactInstanceManager, "App", props);
78
+            mReactRootView.setBackgroundColor(BACKGROUND_COLOR);
79
+            addView(mReactRootView);
80
+        } else {
81
+            // TODO: ReactRootView#setAppProperties is only available on React Native 0.45.
82
+            throw new RuntimeException("Not yet supported");
83
+        }
84
+    }
85
+
86
+    /**
87
+     * Internal method to initialize the React Native instance manager. We create a single instance
88
+     * in order to load the JavaScript bundle a single time. All <tt>ReactRootView</tt> instances
89
+     * will be tied to the one and only <tt>ReactInstanceManager</tt>.
90
+     *
91
+     * @param application - <tt>Application</tt> instance which is running.
92
+     */
93
+    private static void initReactInstanceManager(Application application) {
94
+        mReactInstanceManager = ReactInstanceManager.builder()
95
+            .setApplication(application)
96
+            .setBundleAssetName("index.android.bundle")
97
+            .setJSMainModuleName("index.android")
98
+            .addPackage(new com.corbt.keepawake.KCKeepAwakePackage())
99
+            .addPackage(new com.facebook.react.shell.MainReactPackage())
100
+            .addPackage(new com.oblador.vectoricons.VectorIconsPackage())
101
+            .addPackage(new com.ocetnik.timer.BackgroundTimerPackage())
102
+            .addPackage(new com.oney.WebRTCModule.WebRTCModulePackage())
103
+            .addPackage(new com.rnimmersive.RNImmersivePackage())
104
+            .addPackage(new org.jitsi.meet.sdk.audiomode.AudioModePackage())
105
+            .addPackage(new org.jitsi.meet.sdk.proximity.ProximityPackage())
106
+            .setUseDeveloperSupport(BuildConfig.DEBUG)
107
+            .setInitialLifecycleState(LifecycleState.RESUMED)
108
+            .build();
109
+    }
110
+
111
+    /**
112
+     * Activity lifecycle method which should be called from <tt>Activity.onBackPressed</tt> so
113
+     * we can do the required internal processing.
114
+     *
115
+     * @return - true if the back-press was processed, false otherwise. In case false is returned
116
+     * the application should call the parent's implementation.
117
+     */
118
+    public static boolean onBackPressed() {
119
+        if (mReactInstanceManager != null) {
120
+            mReactInstanceManager.onBackPressed();
121
+            return true;
122
+        } else {
123
+            return false;
124
+        }
125
+    }
126
+
127
+    /**
128
+     * Activity lifecycle method which should be called from <tt>Activity.onDestroy</tt> so
129
+     * we can do the required internal processing.
130
+     *
131
+     * @param activity - <tt>Activity</tt> being destroyed.
132
+     */
133
+    public static void onHostDestroy(Activity activity) {
134
+        if (mReactInstanceManager != null) {
135
+            mReactInstanceManager.onHostDestroy(activity);
136
+        }
137
+    }
138
+
139
+    /**
140
+     * Activity lifecycle method which should be called from <tt>Activity.onPause</tt> so
141
+     * we can do the required internal processing.
142
+     *
143
+     * @param activity - <tt>Activity</tt> being paused.
144
+     */
145
+    public static void onHostPause(Activity activity) {
146
+        if (mReactInstanceManager != null) {
147
+            mReactInstanceManager.onHostPause(activity);
148
+        }
149
+    }
150
+
151
+    /**
152
+     * Activity lifecycle method which should be called from <tt>Activity.onResume</tt> so
153
+     * we can do the required internal processing.
154
+     *
155
+     * @param activity - <tt>Activity</tt> being resumed.
156
+     */
157
+    public static void onHostResume(Activity activity) {
158
+        if (mReactInstanceManager != null) {
159
+            mReactInstanceManager.onHostResume(activity, null);
160
+        }
161
+    }
162
+
163
+    /**
164
+     * Activity lifecycle method which should be called from <tt>Activity.onNewIntent</tt> so
165
+     * we can do the required internal processing. Note that this is only needed if the activity's
166
+     * "launchMode" was set to "singleTask". This is required for deep linking to work once the
167
+     * application is already running.
168
+     *
169
+     * @param intent - <tt>Intent</tt> instance which was received.
170
+     */
171
+    public static void onNewIntent(Intent intent) {
172
+        if (mReactInstanceManager != null) {
173
+            mReactInstanceManager.onNewIntent(intent);
174
+        }
175
+    }
176
+}

android/app/src/main/java/org/jitsi/meet/audiomode/AudioModeModule.java → android/sdk/src/main/java/org/jitsi/meet/sdk/audiomode/AudioModeModule.java 查看文件

@@ -1,4 +1,20 @@
1
-package org.jitsi.meet.audiomode;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.audiomode;
2 18
 
3 19
 import android.annotation.TargetApi;
4 20
 import android.content.BroadcastReceiver;

android/app/src/main/java/org/jitsi/meet/audiomode/AudioModePackage.java → android/sdk/src/main/java/org/jitsi/meet/sdk/audiomode/AudioModePackage.java 查看文件

@@ -1,4 +1,20 @@
1
-package org.jitsi.meet.audiomode;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.audiomode;
2 18
 
3 19
 import com.facebook.react.ReactPackage;
4 20
 import com.facebook.react.bridge.JavaScriptModule;

android/app/src/main/java/org/jitsi/meet/audiomode/BluetoothHeadsetMonitor.java → android/sdk/src/main/java/org/jitsi/meet/sdk/audiomode/BluetoothHeadsetMonitor.java 查看文件

@@ -1,7 +1,22 @@
1
-package org.jitsi.meet.audiomode;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.audiomode;
2 18
 
3 19
 import android.bluetooth.BluetoothAdapter;
4
-import android.bluetooth.BluetoothDevice;
5 20
 import android.bluetooth.BluetoothHeadset;
6 21
 import android.bluetooth.BluetoothProfile;
7 22
 import android.content.BroadcastReceiver;

android/app/src/main/java/org/jitsi/meet/proximity/ProximityModule.java → android/sdk/src/main/java/org/jitsi/meet/sdk/proximity/ProximityModule.java 查看文件

@@ -1,4 +1,20 @@
1
-package org.jitsi.meet.proximity;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.proximity;
2 18
 
3 19
 import android.content.Context;
4 20
 import android.os.PowerManager;

android/app/src/main/java/org/jitsi/meet/proximity/ProximityPackage.java → android/sdk/src/main/java/org/jitsi/meet/sdk/proximity/ProximityPackage.java 查看文件

@@ -1,4 +1,20 @@
1
-package org.jitsi.meet.proximity;
1
+/*
2
+ * Copyright @ 2017-present Atlassian Pty Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *     http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+package org.jitsi.meet.sdk.proximity;
2 18
 
3 19
 import com.facebook.react.ReactPackage;
4 20
 import com.facebook.react.bridge.JavaScriptModule;

+ 3
- 0
android/sdk/src/main/res/values/strings.xml 查看文件

@@ -0,0 +1,3 @@
1
+<resources>
2
+    <string name="app_name">Jitsi Meet SDK</string>
3
+</resources>

+ 1
- 1
android/settings.gradle 查看文件

@@ -1,6 +1,6 @@
1 1
 rootProject.name = 'jitsi-meet'
2 2
 
3
-include ':app'
3
+include ':app', ':sdk'
4 4
 include ':react-native-background-timer'
5 5
 project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
6 6
 include ':react-native-immersive'

Loading…
取消
儲存