瀏覽代碼

doc: move mobile docs to the handbook

master
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
d55b49b2c3
共有 2 個文件被更改,包括 2 次插入582 次删除
  1. 1
    378
      android/README.md
  2. 1
    204
      ios/README.md

+ 1
- 378
android/README.md 查看文件

@@ -1,380 +1,3 @@
1 1
 # Jitsi Meet SDK for Android
2 2
 
3
-## Sample applications using the SDK
4
-
5
-If you want to see how easy integrating the Jitsi Meet SDK into a native application is, take a look at the
6
-[sample applications repository](https://github.com/jitsi/jitsi-meet-sdk-samples).
7
-
8
-## Build your own, or use a pre-build SDK artifacts/binaries
9
-
10
-Jitsi conveniently provides a pre-build SDK artifacts/binaries in its Maven repository. When you do not require any
11
-modification to the SDK itself or any of its dependencies, it's suggested to use the pre-build SDK. This avoids the
12
-complexity of building and installing your own SDK artifacts/binaries.
13
-
14
-### Use pre-build SDK artifacts/binaries
15
-
16
-In your project, add the Maven repository
17
-`https://github.com/jitsi/jitsi-maven-repository/raw/master/releases` and the
18
-dependency `org.jitsi.react:jitsi-meet-sdk` into your `build.gradle` files.
19
-
20
-The repository typically goes into the `build.gradle` file in the root of your project:
21
-
22
-```gradle
23
-allprojects {
24
-    repositories {
25
-        google()
26
-        jcenter()
27
-        maven {
28
-            url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
29
-        }
30
-    }
31
-}
32
-```
33
-
34
-Dependency definitions belong in the individual module `build.gradle` files:
35
-
36
-```gradle
37
-dependencies {
38
-    // (other dependencies)
39
-    implementation ('org.jitsi.react:jitsi-meet-sdk:2.+') { transitive = true }
40
-}
41
-```
42
-
43
-### Build and use your own SDK artifacts/binaries
44
-
45
-<details>
46
-<summary>Show building instructions</summary>
47
-
48
-Start by making sure that your development environment [is set up correctly](https://github.com/jitsi/jitsi-meet/blob/master/doc/mobile.md).
49
-
50
-A note on dependencies: Apart from the SDK, Jitsi also publishes a binary Maven artifact for some of the SDK dependencies (that are not otherwise publicly available) to the Jitsi Maven repository. When you're planning to use a SDK that is built from source, you'll likely use a version of the source code that is newer (or at least _different_) than the version of the source that was used to create the binary SDK artifact. As a consequence, the dependencies that your project will need, might also be different from those that are published in the Jitsi Maven repository. This might lead to build problems, caused by dependencies that are unavailable.
51
-
52
-If you want to use a SDK that is built from source, you will likely benefit from composing a local Maven repository that contains these dependencies. The text below describes how you create a repository that includes both the SDK as well as these dependencies. For illustration purposes, we'll define the location of this local Maven repository as `/tmp/repo`
53
-
54
-In source code form, the Android SDK dependencies are locked/pinned by package.json and package-lock.json of the Jitsi Meet project. To obtain the data, execute NPM in the jitsi-meet project directory:
55
-
56
-    npm install
57
-
58
-This will pull in the dependencies in either binary format, or in source code format, somewhere under /node_modules/
59
-
60
-Third-party React Native _modules_, which Jitsi Meet SDK for Android depends on, are download by NPM in source code 
61
-or binary form. These need to be assembled into Maven artifacts, and then published to your local Maven repository.
62
-A script is provided to facilitate this. From the root of the jitsi-meet project repository, run:
63
-
64
-    ./android/scripts/release-sdk.sh /tmp/repo
65
-
66
-This will build and publish the SDK, and all of its dependencies to the specified Maven repository (`/tmp/repo`) in
67
-this example.
68
-
69
-You're now ready to use the artifacts. In _your_ project, add the Maven repository that you used above (`/tmp/repo`) into your top-level `build.gradle` file:
70
-
71
-    allprojects {
72
-        repositories {
73
-            maven { url "file:/tmp/repo" }
74
-            google()
75
-            jcenter()
76
-        }
77
-    }
78
-
79
-You can use your local repository to replace the Jitsi repository (`maven { url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" }`) when you published _all_ subprojects. If you didn't do that, you'll have to add both repositories. Make sure your local repository is listed first!
80
-
81
-Then, define the dependency `org.jitsi.react:jitsi-meet-sdk` into the `build.gradle` file of your module:
82
-
83
-    implementation ('org.jitsi.react:jitsi-meet-sdk:+') { transitive = true }
84
-
85
-Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive
86
-dependencies of `jitsi-meet-sdk`.
87
-
88
-</details>
89
-
90
-## Using the API
91
-
92
-Jitsi Meet SDK is an Android library which embodies the whole Jitsi Meet
93
-experience and makes it reusable by third-party apps.
94
-
95
-First, add Java 1.8 compatibility support to your project by adding the
96
-following lines into your `build.gradle` file:
97
-
98
-```
99
-compileOptions {
100
-    sourceCompatibility JavaVersion.VERSION_1_8
101
-    targetCompatibility JavaVersion.VERSION_1_8
102
-}
103
-```
104
-
105
-To get started, extends your `android.app.Activity` from
106
-`org.jitsi.meet.sdk.JitsiMeetActivity`:
107
-
108
-```java
109
-package org.jitsi.example;
110
-
111
-import org.jitsi.meet.sdk.JitsiMeetActivity;
112
-
113
-public class MainActivity extends JitsiMeetActivity {
114
-}
115
-```
116
-
117
-Alternatively, you can use the `org.jitsi.meet.sdk.JitsiMeetView` class which
118
-extends `android.view.View`.
119
-
120
-Note that this should only be needed when `JitsiMeetActivity` cannot be used for
121
-some reason. Extending `JitsiMeetView` requires manual wiring of the view to
122
-the activity, using a lot of boilerplate code. Using the Activity instead of the
123
-View is strongly recommended.
124
-
125
-<details>
126
-<summary>Show example</summary>
127
-
128
-```java
129
-package org.jitsi.example;
130
-
131
-import android.os.Bundle;
132
-import android.support.v4.app.FragmentActivity;
133
-
134
-import org.jitsi.meet.sdk.JitsiMeetView;
135
-import org.jitsi.meet.sdk.ReactActivityLifecycleCallbacks;
136
-
137
-// Example
138
-//
139
-public class MainActivity extends FragmentActivity implements JitsiMeetActivityInterface {
140
-    private JitsiMeetView view;
141
-
142
-    @Override
143
-    protected void onActivityResult(
144
-            int requestCode,
145
-            int resultCode,
146
-            Intent data) {
147
-        JitsiMeetActivityDelegate.onActivityResult(
148
-                this, requestCode, resultCode, data);
149
-    }
150
-
151
-    @Override
152
-    public void onBackPressed() {
153
-        JitsiMeetActivityDelegate.onBackPressed();
154
-    }
155
-
156
-    @Override
157
-    protected void onCreate(Bundle savedInstanceState) {
158
-        super.onCreate(savedInstanceState);
159
-
160
-        view = new JitsiMeetView(this);
161
-        JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions.Builder()
162
-            .setRoom("https://meet.jit.si/test123")
163
-            .build();
164
-        view.join(options);
165
-
166
-        setContentView(view);
167
-    }
168
-
169
-    @Override
170
-    protected void onDestroy() {
171
-        super.onDestroy();
172
-
173
-        view.dispose();
174
-        view = null;
175
-
176
-        JitsiMeetActivityDelegate.onHostDestroy(this);
177
-    }
178
-
179
-    @Override
180
-    public void onNewIntent(Intent intent) {
181
-        JitsiMeetActivityDelegate.onNewIntent(intent);
182
-    }
183
-
184
-    @Override
185
-    public void onRequestPermissionsResult(
186
-            final int requestCode,
187
-            final String[] permissions,
188
-            final int[] grantResults) {
189
-        JitsiMeetActivityDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
190
-    }
191
-
192
-    @Override
193
-    protected void onResume() {
194
-        super.onResume();
195
-
196
-        JitsiMeetActivityDelegate.onHostResume(this);
197
-    }
198
-
199
-    @Override
200
-    protected void onStop() {
201
-        super.onStop();
202
-
203
-        JitsiMeetActivityDelegate.onHostPause(this);
204
-    }
205
-}
206
-```
207
-
208
-</details>
209
-
210
-### JitsiMeetActivity
211
-
212
-This class encapsulates a high level API in the form of an Android `FragmentActivity`
213
-which displays a single `JitsiMeetView`. You can pass a URL as a `ACTION_VIEW`
214
-on the Intent when starting it and it will join the conference, and will be
215
-automatically terminated (finish() will be called on the activity) when the
216
-conference ends or fails.
217
-
218
-### JitsiMeetView
219
-
220
-The `JitsiMeetView` class is the core of Jitsi Meet SDK. It's designed to
221
-display a Jitsi Meet conference (or a welcome page).
222
-
223
-#### join(options)
224
-
225
-Joins the conference specified by the given `JitsiMeetConferenceOptions`.
226
-
227
-#### leave()
228
-
229
-Leaves the currently active conference. If the welcome page is enabled it will
230
-go back to it, otherwise a black window will be shown.
231
-
232
-#### dispose()
233
-
234
-Releases all resources associated with this view. This method MUST be called
235
-when the Activity holding this view is going to be destroyed, usually in the
236
-`onDestroy()` method.
237
-
238
-#### getListener()
239
-
240
-Returns the `JitsiMeetViewListener` instance attached to the view.
241
-
242
-#### setListener(listener)
243
-
244
-Sets the given listener (class implementing the `JitsiMeetViewListener`
245
-interface) on the view.
246
-
247
-### JitsiMeetConferenceOptions
248
-
249
-This object encapsulates all the options that can be tweaked when joining
250
-a conference.
251
-
252
-Example:
253
-
254
-```java
255
-JitsiMeetConferenceOptions options = new JitsiMeetConferenceOptions.Builder()
256
-    .setServerURL(new URL("https://meet.jit.si"))
257
-    .setRoom("test123")
258
-    .setAudioMuted(false)
259
-    .setVideoMuted(false)
260
-    .setAudioOnly(false)
261
-    .setWelcomePageEnabled(false)
262
-    .build();
263
-```
264
-
265
-See the `JitsiMeetConferenceOptions` implementation for all available options.
266
-
267
-### JitsiMeetActivityDelegate
268
-
269
-This class handles the interaction between `JitsiMeetView` and its enclosing
270
-`Activity`. Generally this shouldn't be consumed by users, because they'd be
271
-using `JitsiMeetActivity` instead, which is already completely integrated.
272
-
273
-All its methods are static.
274
-
275
-#### onActivityResult(...)
276
-
277
-Helper method to handle results of auxiliary activities launched by the SDK.
278
-Should be called from the activity method of the same name.
279
-
280
-#### onBackPressed()
281
-
282
-Helper method which should be called from the activity's `onBackPressed` method.
283
-If this function returns `true`, it means the action was handled and thus no
284
-extra processing is required; otherwise the app should call the parent's
285
-`onBackPressed` method.
286
-
287
-#### onHostDestroy(...)
288
-
289
-Helper method which should be called from the activity's `onDestroy` method.
290
-
291
-#### onHostResume(...)
292
-
293
-Helper method which should be called from the activity's `onResume` or `onStop`
294
-method.
295
-
296
-#### onHostStop(...)
297
-
298
-Helper method which should be called from the activity's `onSstop` method.
299
-
300
-#### onNewIntent(...)
301
-
302
-Helper method for integrating the *deep linking* functionality. If your app's
303
-activity is launched in "singleTask" mode this method should be called from the
304
-activity's `onNewIntent` method.
305
-
306
-#### onRequestPermissionsResult(...)
307
-
308
-Helper method to handle permission requests inside the SDK. It should be called
309
-from the activity method of the same name.
310
-
311
-#### onUserLeaveHint()
312
-
313
-Helper method for integrating automatic Picture-in-Picture. It should be called
314
-from the activity's `onUserLeaveHint` method.
315
-
316
-This is a static method.
317
-
318
-#### JitsiMeetViewListener
319
-
320
-`JitsiMeetViewListener` provides an interface apps can implement to listen to
321
-the state of the Jitsi Meet conference displayed in a `JitsiMeetView`.
322
-
323
-#### onConferenceJoined
324
-
325
-Called when a conference was joined.
326
-
327
-The `data` `Map` contains a "url" key with the conference URL.
328
-
329
-#### onConferenceTerminated
330
-
331
-Called when a conference was terminated either by user choice or due to a
332
-failure.
333
-
334
-The `data` `Map` contains an "error" key with the error and a "url" key
335
-with the conference URL. If the conference finished gracefully no `error`
336
-key will be present.
337
-
338
-#### onConferenceWillJoin
339
-
340
-Called before a conference is joined.
341
-
342
-The `data` `Map` contains a "url" key with the conference URL.
343
-
344
-## ProGuard rules
345
-
346
-When using the SDK on a project some proguard rules have to be added in order
347
-to avoid necessary code being stripped. Add the following to your project's
348
-rules file: https://github.com/jitsi/jitsi-meet/blob/master/android/app/proguard-rules.pro
349
-
350
-## Picture-in-Picture
351
-
352
-`JitsiMeetView` will automatically adjust its UI when presented in a
353
-Picture-in-Picture style scenario, in a rectangle too small to accommodate its
354
-"full" UI.
355
-
356
-## Dropbox integration
357
-
358
-To setup the Dropbox integration, follow these steps:
359
-
360
-1. Add the following to the app's AndroidManifest.xml and change `<APP_KEY>` to
361
-your Dropbox app key:
362
-```
363
-<activity
364
-    android:configChanges="keyboard|orientation"
365
-    android:launchMode="singleTask"
366
-    android:name="com.dropbox.core.android.AuthActivity">
367
-  <intent-filter>
368
-    <action android:name="android.intent.action.VIEW" />
369
-    <category android:name="android.intent.category.BROWSABLE" />
370
-    <category android:name="android.intent.category.DEFAULT" />
371
-    <data android:scheme="db-<APP_KEY>" />
372
-  </intent-filter>
373
-</activity>
374
-```
375
-
376
-2. Add the following to the app's strings.xml and change `<APP_KEY>` to your
377
-Dropbox app key:
378
-```
379
-<string name="dropbox_app_key"><APP_KEY></string>
380
-```
3
+This document has been moved to [The Handbook](https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk).

+ 1
- 204
ios/README.md 查看文件

@@ -1,206 +1,3 @@
1 1
 # Jitsi Meet SDK for iOS
2 2
 
3
-The Jitsi Meet iOS SDK provides the same user experience as the Jitsi Meet app,
4
-in a customizable way which you can embed in your apps.
5
-
6
-## Sample applications using the SDK
7
-
8
-If you want to see how easy integrating the Jitsi Meet SDK into a native application is, take a look at the
9
-[sample applications repository](https://github.com/jitsi/jitsi-meet-sdk-samples).
10
-
11
-## Usage
12
-
13
-There are 2 ways to integrate the SDK into your project:
14
-
15
-- Using CocoaPods
16
-- Building it yourself
17
-
18
-### Using CocoaPods
19
-
20
-Follow the instructions [here](https://github.com/jitsi/jitsi-meet-ios-sdk-releases/blob/master/README.md).
21
-
22
-### Building it yourself
23
-
24
-1. Install all required [dependencies](https://github.com/jitsi/jitsi-meet/blob/master/doc/mobile.md).
25
-
26
-2. `xcodebuild -workspace ios/jitsi-meet.xcworkspace -scheme JitsiMeet -destination='generic/platform=iOS' -configuration Release archive`
27
-
28
-After successfully building Jitsi Meet SDK for iOS, copy
29
-`ios/sdk/JitsiMeet.framework` (if the path points to a symbolic link, follow the
30
-symbolic link) and
31
-`node_modules/react-native-webrtc/ios/WebRTC.framework` into your project.
32
-
33
-## API
34
-
35
-JitsiMeet is an iOS framework which embodies the whole Jitsi Meet experience and
36
-makes it reusable by third-party apps.
37
-
38
-To get started:
39
-
40
-1. Add a `JitsiMeetView` to your app using a Storyboard or Interface Builder,
41
-   for example.
42
-
43
-2. Then, once the view has loaded, set the delegate in your controller and load
44
-   the desired URL:
45
-
46
-```objc
47
-- (void)viewDidLoad {
48
-  [super viewDidLoad];
49
-
50
-  JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;
51
-  jitsiMeetView.delegate = self;
52
-
53
-  JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
54
-      builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
55
-      builder.room = @"test123";
56
-      builder.audioOnly = YES;
57
-  }];
58
-
59
-  [jitsiMeetView join:options];
60
-}
61
-```
62
-
63
-### JitsiMeetView class
64
-
65
-The `JitsiMeetView` class is the entry point to the SDK. It a subclass of
66
-`UIView` which renders a full conference in the designated area.
67
-
68
-#### delegate
69
-
70
-Property to get/set the `JitsiMeetViewDelegate` on `JitsiMeetView`.
71
-
72
-#### join:JitsiMeetConferenceOptions
73
-
74
-Joins the conference specified by the given options.
75
-
76
-```objc
77
-  JitsiMeetConferenceOptions *options = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
78
-      builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
79
-      builder.room = @"test123";
80
-      builder.audioOnly = NO;
81
-      builder.audioMuted = NO;
82
-      builder.videoMuted = NO;
83
-      builder.welcomePageEnabled = NO;
84
-  }];
85
-
86
-  [jitsiMeetView join:options];
87
-```
88
-
89
-#### leave
90
-
91
-Leaves the currently active conference.
92
-
93
-#### Universal / deep linking
94
-
95
-In order to support Universal / deep linking, `JitsiMeet` offers 2 class
96
-methods that you app's delegate should call in order for the app to follow those
97
-links.
98
-
99
-If these functions return NO it means the URL wasn't handled by the SDK. This
100
-is useful when the host application uses other SDKs which also use linking.
101
-
102
-```objc
103
--  (BOOL)application:(UIApplication *)application
104
-continueUserActivity:(NSUserActivity *)userActivity
105
-  restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
106
-{
107
-  return [[JitsiMeet sharedInstance] application:application
108
-               continueUserActivity:userActivity
109
-                 restorationHandler:restorationHandler];
110
-}
111
-```
112
-
113
-And also one of the following:
114
-
115
-```objc
116
-// See https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623073-application?language=objc
117
-- (BOOL)application:(UIApplication *)app
118
-            openURL:(NSURL *)url
119
-            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
120
-  return [[JitsiMeet sharedInstance] application:app
121
-                            openURL:url
122
-                            options: options];
123
-}
124
-```
125
-
126
-### JitsiMeetViewDelegate
127
-
128
-This delegate is optional, and can be set on the `JitsiMeetView` instance using
129
-the `delegate` property.
130
-
131
-It provides information about the conference state: was it joined, left, did it
132
-fail?
133
-
134
-All methods in this delegate are optional.
135
-
136
-#### conferenceJoined
137
-
138
-Called when a conference was joined.
139
-
140
-The `data` dictionary contains a "url" key with the conference URL.
141
-
142
-#### conferenceTerminated
143
-
144
-Called when a conference was terminated either by user choice or due to a
145
-failure.
146
-
147
-The `data` dictionary contains an "error" key with the error and a "url" key
148
-with the conference URL. If the conference finished gracefully no `error`
149
-key will be present.
150
-
151
-#### conferenceWillJoin
152
-
153
-Called before a conference is joined.
154
-
155
-The `data` dictionary contains a "url" key with the conference URL.
156
-
157
-#### enterPictureInPicture
158
-
159
-Called when entering Picture-in-Picture is requested by the user. The app should
160
-now activate its Picture-in-Picture implementation (and resize the associated
161
-`JitsiMeetView`. The latter will automatically detect its new size and adjust
162
-its user interface to a variant appropriate for the small size ordinarily
163
-associated with Picture-in-Picture.)
164
-
165
-The `data` dictionary is empty.
166
-
167
-### Picture-in-Picture
168
-
169
-`JitsiMeetView` will automatically adjust its UI when presented in a
170
-Picture-in-Picture style scenario, in a rectangle too small to accommodate its
171
-"full" UI.
172
-
173
-Jitsi Meet SDK does not currently implement native Picture-in-Picture on iOS. If
174
-desired, apps need to implement non-native Picture-in-Picture themselves and
175
-resize `JitsiMeetView`.
176
-
177
-If `delegate` implements `enterPictureInPicture:`, the in-call toolbar will
178
-render a button to afford the user to request entering Picture-in-Picture.
179
-
180
-## Dropbox integration
181
-
182
-To setup the Dropbox integration, follow these steps:
183
-
184
-1. Add the following to the app's Info.plist and change `<APP_KEY>` to your
185
-Dropbox app key:
186
-```
187
-<key>CFBundleURLTypes</key>
188
-<array>
189
-  <dict>
190
-    <key>CFBundleURLName</key>
191
-    <string></string>
192
-    <key>CFBundleURLSchemes</key>
193
-    <array>
194
-      <string>db-<APP_KEY></string>
195
-    </array>
196
-  </dict>
197
-</array>
198
-<key>LSApplicationQueriesSchemes</key>
199
-<array>
200
-  <string>dbapi-2</string>
201
-  <string>dbapi-8-emm</string>
202
-</array>
203
-```
204
-
205
-2. Make sure your app calls the Jitsi Meet SDK universal / deep linking delegate
206
-   methods.
3
+This document has been moved to [The Handbook](https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk).

Loading…
取消
儲存