Browse Source

android: update documentation

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
545ad0e1a6
1 changed files with 30 additions and 93 deletions
  1. 30
    93
      android/README.md

+ 30
- 93
android/README.md View File

35
 
35
 
36
 ### Build and use your own SDK artifacts/binaries
36
 ### Build and use your own SDK artifacts/binaries
37
 
37
 
38
+<details>
39
+<summary>Show building instructions</summary>
40
+
38
 Start by making sure that your development environment [is set up correctly](https://github.com/jitsi/jitsi-meet/blob/master/doc/mobile.md).
41
 Start by making sure that your development environment [is set up correctly](https://github.com/jitsi/jitsi-meet/blob/master/doc/mobile.md).
39
 
42
 
40
 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.
43
 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.
103
 
106
 
104
 Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive dependencies of `jitsi-meet-sdk`.
107
 Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive dependencies of `jitsi-meet-sdk`.
105
 
108
 
109
+</details>
106
 
110
 
107
 ## Using the API
111
 ## Using the API
108
 
112
 
139
 the activity, using a lot of boilerplate code. Using the Activity instead of the
143
 the activity, using a lot of boilerplate code. Using the Activity instead of the
140
 View is strongly recommended.
144
 View is strongly recommended.
141
 
145
 
146
+<details>
147
+<summary>Show example</summary>
148
+
142
 ```java
149
 ```java
143
 package org.jitsi.example;
150
 package org.jitsi.example;
144
 
151
 
219
 }
226
 }
220
 ```
227
 ```
221
 
228
 
222
-### JitsiMeetActivity
223
-
224
-This class encapsulates a high level API in the form of an Android `Activity`
225
-which displays a single `JitsiMeetView`.
226
-
227
-#### getDefaultURL()
228
-
229
-See JitsiMeetView.getDefaultURL.
230
-
231
-#### isPictureInPictureEnabled()
232
-
233
-See JitsiMeetView.isPictureInPictureEnabled.
229
+</details>
234
 
230
 
235
-#### isWelcomePageEnabled()
236
-
237
-See JitsiMeetView.isWelcomePageEnabled.
238
-
239
-#### loadURL(URL)
240
-
241
-See JitsiMeetView.loadURL.
242
-
243
-#### setDefaultURL(URL)
244
-
245
-See JitsiMeetView.setDefaultURL.
231
+Starting with SDK version 1.22, a Glide module must be provided by the host app.
232
+This makes it possible to use the Glide image processing library from both the
233
+SDK and the host app itself.
246
 
234
 
247
-#### setPictureInPictureEnabled(boolean)
235
+You can use the code in `JitsiGlideModule.java` and adjust the package name.
236
+When building, add the following code in your `app/build.gradle` file, adjusting
237
+the Glide version to match the one in https://github.com/jitsi/jitsi-meet/blob/master/android/build.gradle
248
 
238
 
249
-See JitsiMeetView.setPictureInPictureEnabled.
239
+```
240
+// Glide
241
+implementation("com.github.bumptech.glide:glide:${glideVersion}") {
242
+    exclude group: "com.android.support", module: "glide"
243
+}
244
+implementation("com.github.bumptech.glide:annotations:${glideVersion}") {
245
+    exclude group: "com.android.support", module: "annotations"
246
+}
247
+```
250
 
248
 
251
-#### setWelcomePageEnabled(boolean)
249
+### JitsiMeetActivity
252
 
250
 
253
-See JitsiMeetView.setWelcomePageEnabled.
251
+This class encapsulates a high level API in the form of an Android `Activity`
252
+which displays a single `JitsiMeetView`.
254
 
253
 
255
 ### JitsiMeetView
254
 ### JitsiMeetView
256
 
255
 
401
 `JitsiMeetViewListener` provides an interface apps can implement to listen to
400
 `JitsiMeetViewListener` provides an interface apps can implement to listen to
402
 the state of the Jitsi Meet conference displayed in a `JitsiMeetView`.
401
 the state of the Jitsi Meet conference displayed in a `JitsiMeetView`.
403
 
402
 
404
-### JitsiMeetViewAdapter
405
-
406
-A default implementation of the `JitsiMeetViewListener` interface. Apps may
407
-extend the class instead of implementing the interface in order to minimize
408
-boilerplate.
403
+`JitsiMeetViewAdapter`, a default implementation of the
404
+`JitsiMeetViewListener` interface is also provided. Apps may extend the class
405
+instead of implementing the interface in order to minimize boilerplate.
409
 
406
 
410
 ##### onConferenceFailed
407
 ##### onConferenceFailed
411
 
408
 
451
 
448
 
452
 When using the SDK on a project some proguard rules have to be added in order
449
 When using the SDK on a project some proguard rules have to be added in order
453
 to avoid necessary code being stripped. Add the following to your project's
450
 to avoid necessary code being stripped. Add the following to your project's
454
-rules file:
455
-
456
-```
457
-# React Native
458
-
459
-# Keep our interfaces so they can be used by other ProGuard rules.
460
-# See http://sourceforge.net/p/proguard/bugs/466/
461
--keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
462
--keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
463
--keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
464
-
465
-# Do not strip any method/class that is annotated with @DoNotStrip
466
--keep @com.facebook.proguard.annotations.DoNotStrip class *
467
--keep @com.facebook.common.internal.DoNotStrip class *
468
--keepclassmembers class * {
469
-    @com.facebook.proguard.annotations.DoNotStrip *;
470
-    @com.facebook.common.internal.DoNotStrip *;
471
-}
472
-
473
--keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
474
-  void set*(***);
475
-  *** get*();
476
-}
477
-
478
--keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
479
--keep class * extends com.facebook.react.bridge.NativeModule { *; }
480
--keepclassmembers,includedescriptorclasses class * { native <methods>; }
481
--keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
482
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
483
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
484
-
485
--dontwarn com.facebook.react.**
486
-
487
-# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
488
-# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
489
--dontwarn android.text.StaticLayout
490
-
491
-# okhttp
492
-
493
--keepattributes Signature
494
--keepattributes *Annotation*
495
--keep class okhttp3.** { *; }
496
--keep interface okhttp3.** { *; }
497
--dontwarn okhttp3.**
498
-
499
-# okio
500
-
501
--keep class sun.misc.Unsafe { *; }
502
--dontwarn java.nio.file.*
503
--dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
504
--dontwarn okio.**
505
-
506
-# WebRTC
507
-
508
--keep class org.webrtc.** { *; }
509
--dontwarn org.chromium.build.BuildHooksAndroid
510
-
511
-# Jisti Meet SDK
512
-
513
--keep class org.jitsi.meet.sdk.** { *; }
514
-```
451
+rules file: https://github.com/jitsi/jitsi-meet/blob/master/android/app/proguard-rules.pro
515
 
452
 
516
 ## Picture-in-Picture
453
 ## Picture-in-Picture
517
 
454
 

Loading…
Cancel
Save