Commit Graph

81 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé ab83a97fd5 [Android] Handle audio focus changes while in a conference 2018-05-25 15:33:36 +02:00
Saúl Ibarra Corretgé c8c198b0b1 [Android] Add support for USB headset detection
The API to gather these was introduced in API level 26.
2018-05-24 16:40:11 +02:00
hristoterezov d4d2c25499 [RN] Add rejected ringtone sound assets to build 2018-05-23 15:22:01 -05:00
Lyubo Marinov 75c7cfd9e1 Coding style: comments, formatting, sorting order 2018-05-20 19:01:59 -05:00
Saúl Ibarra Corretgé ef7fb1a7b0 [RN] Make all delegate / listener methods run in the main / UI thread 2018-05-20 16:46:44 -05:00
Saúl Ibarra Corretgé 284d09eae7 [RN] Add ringtone sound assets to build 2018-05-17 08:31:46 -05:00
Lyubo Marinov 6a0de0ddde Coding style: consistency, formatting, naming 2018-05-07 10:05:37 -05:00
Lyubo Marinov 7ffdaf59c7 [RN] Add an example how to consume the public SDK invite API 2018-05-07 00:38:49 -05:00
Lyubo Marinov 5e79bbecef Codying style: naming, formatting, comments 2018-05-03 18:04:59 -05:00
paweldomas 565fd37f28 fix(Android|PiP): do not invoke 'enterPictureInPicture' in PAUSED state
Activity.enterPictureInPictureMode method must be invoked synchronously
on userLeaveHint callback in order to be sure that the current Activity
is still visible (does not transit to PAUSED state). Previously if the
asynchronous processing would be delayed enough for the Activity to go
into the PAUSED state it will be too late to go into the PiP mode.
2018-05-02 17:06:24 +02:00
Lyubo Marinov effd3728b6 [RN] add support for inviting participants during a call on mobile (2) 2018-05-02 12:54:02 +02:00
Ryan Peck f64c13d4b7 [RN] add support for inviting participants during a call on mobile
* Button conditionally shown based on if the feature is enabled and available
* Hooks for launching the invite UI (delegates to the native layer)
* Hooks for using the search and dial out checks from the native layer (calls back into JS)
* Hooks for handling sending invites and passing any failures back to the native layer
* Android and iOS handling for those hooks

Author: Ryan Peck <rpeck@atlassian.com>
Author: Eric Brynsvold <ebrynsvold@atlassian.com>
2018-04-25 18:58:06 +02:00
paweldomas 9cbcbf6e26 fix(PictureInPictureModule): catch the RuntimeException
Activity.enterPictureInPictureMode can fail for a couple of reasons
mentioned in the JSDoc:

"The system may disallow entering picture-in-picture in various cases,
including when the activity is not visible, if the screen is locked or
if the user has an activity pinned."

It seems to be safe to assume that those cases will be caught by
a RuntimeException handler (only RuntimeExceptions can be left without
explicit catch block).

Anyway the root cause for problems is the fact that the current process
for going to the picture in picture mode is not synchronised with
Activity's lifecycle. On Activity's "userLeaveHint" callback we dispatch
async task to the JS code which only then after dispatching some more
stuff eventually call native method that enter PiP. In case we spend too
much time on the JS side and the Activity goes to PAUSED state the call
will fail with IllegalStatException: "activity is not visible",
"activity is paused" etc. This means with this fix the app will not
crash, but we'll see it sometimes not go to the PiP mode as expected.
2018-04-22 00:41:18 -05:00
paweldomas 8b2ce21e1a fix(RN): bundle sound files in release build
On Android the files will be copied to the assets/sounds directory of
the SDK bundle on build time. To play the "asset:/" prefix has to be
used to locate the files correctly.

On iOS each sound file must be added to the SDK's Xcode project in order
to be bundled correctly. To playback we need to know the path of the SDK
bundle which is now exposed by the AppInfo iOS module.
2018-04-10 10:59:52 +02:00
paweldomas 968b279b37 feat(android): support NAT64
Adds Nat64InfoModule which resolves IPv6 addresses for IPv4 addresses
in IPv6 only network where jitsi-meet deployment does not provide any
IPv6 addresses as ICE candidates.
2018-04-05 10:21:59 -05:00
zbettenbuk bba480f329 Add calendar-sync feature 2018-03-13 18:04:14 -05:00
paweldomas 60e03e3dec feat: add join/leave sounds on mobile
Adds base/sounds feature which allows other features to register a sound
source under specified id. A new SoundsCollection component will then
render corresponding HTMLAudioElement for each such sound. Once "setRef"
callback is called by the HTMLAudioElement, this element will be added
to the Redux store. When that happens sound can be played through the
new 'playSound' action which will call play() method on the stored
HTMLAudioElement instance.
2018-03-13 16:57:28 -05:00
Lyubo Marinov c018252eee [Android] Fix RuntimeException in RNImmersiveModule
java.lang.RuntimeException: Tried to access a JS module before the React instance was fully set up. Calls to ReactContext#getJSModule should only happen once initialize() has been called on your native module.
	at com.facebook.react.bridge.ReactContext.getJSModule(ReactContext.java:102)
	at com.rnimmersive.RNImmersiveModule.emitImmersiveStateChangeEvent(RNImmersiveModule.java:74)
	at org.jitsi.meet.sdk.JitsiMeetView.onWindowFocusChanged(JitsiMeetView.java:504)
	at android.view.View.dispatchWindowFocusChanged(View.java:10257)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1193)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
	at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3602)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6119)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
2018-03-09 13:50:07 -06:00
Lyubo Marinov 9f69c4d730 Grow features/settings from features/app-settings and features/settings-menu 2018-02-26 19:19:01 -06:00
Lyubo Marinov b8de5bbfc3 [RN] Add Picture-in-Picture support (Coding style: naming, consistency) 2018-02-23 11:21:26 -06:00
Saúl Ibarra Corretgé b3683068d4 [RN] Add Picture-in-Picture support
This only works automatically on Android >= 8. On other platforms / versions, it
relies on the SDK user on implementing a "reduced UI" mode and reacting to the
"request PIP" delegate method.
2018-02-23 11:21:25 -06:00
Lyubo Marinov 94473e5660 [Android] Allow accessing react-native's in-app developer menu (in the emulator) 2018-02-23 11:21:25 -06:00
Lyubo Marinov e2cf7a788d [RN] Make full-screen more resilient on Android (Coding style: consistency) 2018-02-14 12:28:22 -06:00
Saúl Ibarra Corretgé 4757c1ebca [RN] Make full-screen more resilient on Android
On Android we go into "immersive mode" when in a conference, this is our way of
being full-creen. There are occasions, however, in which Android takes us out of
immerfive mode without us (the application / SDK) knowing: when a child activity
is started, a modal window shown, etc.

In order to be resilient to any possible change in the immersive mode, register
a listener which will be called when Android changes it, so we can re-eavluate
if we need it and thus re-enable it.
2018-02-13 15:00:36 -06:00
Saúl Ibarra Corretgé 292f3ab1bd [Android] Fix crash if settings activity cannot be opened
The documentation states this is possible, so make sure we handle such errors.

Ref:
https://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DETAILS_SETTINGS
2018-01-09 13:12:53 -06:00
damencho 2f3ea1b458 [Android] Add module that provides getWiFiStats 2017-12-19 11:07:11 +01:00
Saúl Ibarra Corretgé e9c91d194c android: update appcompat version 2017-12-13 09:35:34 -06:00
Saúl Ibarra Corretgé 57206cc36a [RN] Build react-native-locale-detector
Upstream lacked a CocoaPods podspec file, PR:
https://github.com/DylanVann/react-native-locale-detector/pull/3
2017-12-13 10:17:05 +01:00
Lyubo Marinov 81094ba7fd [Android] Fix NullPointerException in AudioModeModule 2017-11-19 21:58:24 -06:00
Lyubo Marinov 3acf0c7f64 [Android] Fix UnsupportedOperationException in AudioModeModule 2017-11-19 21:58:24 -06:00
Saúl Ibarra Corretgé f973a695d8 [RN] Add audio route picker
Due to the difference in nature, the iOS and Android implementations are
completely different:

iOS: MPVolumeView is used, which allows us to place a button which will launch a
native route picker provided by iOS itself. This view is different depending on
the iOS version, with the iOS 11 version being more complete.

Android: A completely custom component is used, which displays a bottom sheet
with the device categories, not devices individually. This is akin to the sheet
in the builtin dialer.
2017-11-15 09:31:40 -06:00
paweldomas 3f6f5e7eb9 fix(JitsiMeetView): use setAppProperties 2017-11-02 14:32:35 +01:00
paweldomas b74bede0e7 feat(web/RN): update React to v16 and React Native to 0.49 2017-11-02 14:32:35 +01:00
Lyubo Marinov e0b73fdd1c [Android] Fix Android Studio 3.0 Beta 7 2017-10-03 20:45:43 -05:00
Lyubo Marinov 4bf19d73fd [RN] Fix documentation comments
* Javadoc introduced @code as a replacement of <code> and <tt> which is
  better aligned with other javadoc tags such as @link. Use it in the
  Java source code. If we switch to Kotlin, then we'll definitely use
  Markdown.

* There are more uses of @code in the JavaScript source code than <tt>
  so use @code for the sake of consistency. Eventually, I'd rather we
  switch to Markdown because it's easier on my eyes.

* Xcode is plain confused by @code and @link. The Internet says that
  Xcode supports the backquote character to denote the beginning and end
  of a string of characters which should be formatted for display as
  code but it doesn't work for me. <tt> is not rendered at all. So use
  the backquote which is rendered itself. Hopefully, if we switch to
  Markdown, then it'll be common between JavaScript and Objective-C
  source code.
2017-10-01 01:35:19 -05:00
Lyubo Marinov e1222e947b [RN] Documentation, comments 2017-09-27 13:08:37 -05:00
Saúl Ibarra Corretgé 341e7e01aa [RN] Add the ability to set the default URL in the SDK 2017-09-27 11:59:00 -05:00
Lyubo Marinov b55faab33e Coding style 2017-09-27 11:01:27 -05:00
Saúl Ibarra Corretgé 3fdffa7497 [RN] Add AppInfo module
It provides access to the app's display name and version.
2017-09-27 10:32:07 -05:00
Lyubo Marinov ec58aa9959 [Android] Implement DefaultHardwareBackBtnHandler
* Regardless of whether the SDK client/consumer employs
  JitsiMeetActivity or JitsiMeetView, default to finishing the
  associated Activity upon invoking the back button (which is what
  Activity#onBackPressed() is documented to do).

* Do not break the public API of JitsiMeetView and, thus, Jitsi Meet SDK
  for Android.
2017-09-21 23:57:16 -05:00
paweldomas 35dab19b30 [Android] Implement DefaultHardwareBackBtnHandler
If the JS side chooses to not handle the back button press call
'super.onBackPressed()' to close the app.
2017-09-21 23:56:43 -05:00
Lyubo Marinov 2496b3ec02 [Android] Don't require camera, autofocus
Don't require autofocus because that prevents the app from appearing in
Google Play Store for some devices.

Don't require camera for the same reason but also because camera/video
is not a mandatory feature of the app, it's merely likely very
desirable.
2017-09-14 12:16:46 -05:00
Lyubo Marinov bf915fe886 Coding style, formatting 2017-09-14 12:14:54 -05:00
Lyubo Marinov f86f21beb2 [Android] Fix VerifyError on Android 4
The class ReflectiveOperationException used in ExternalAPIModule was
introduced in API level 19.
2017-09-13 14:32:32 -05:00
Lyubo Marinov 72c9933e73 [RN] SDK building, installing, and publishing
Based on work authored by Shuai Li <sli@atlassian.com>, Daniel Ornelas
<dornelas@atlassian.com>, and Lyubo Marinov <lmarinov@atlassian.com>.
2017-09-11 20:12:56 -05:00
Lyubo Marinov fce0e4c22c [RN] Report loadConfigError with locationURL to the SDK consumers 2017-09-06 20:34:46 -05:00
Lyubo Marinov 4dc78ce458 [RN] Increase the coverage of JitsiMeetViewListener
JitsiMeetViewListener is an integral part of the public API of Jitsi
Meet SDK for Android. Utilize it in the Debug configuration of the Jitsi
Meet app for Android in order to increase (1) awareness of API breakages
and (2) API coverage.

The same goes for JitsiMeetViewDelegate in Jitsi Meet SDK and app for
iOS.
2017-09-06 16:31:15 -05:00
Lyubo Marinov e830b80b6b [RN] Fix documentation 2017-09-06 16:31:15 -05:00
Saúl Ibarra Corretgé 284e4e543e [RN] Detect errors when loading the configuration
The error is stored in the redux store in base/config so other components can
consult it. It is also broadcasted as a new event in the external API for the
SDK.
2017-09-06 16:31:14 -05:00
Lyubo Marinov 1d8ee9d32f [RN] Reduce maintenance
JitsiMeetViewListener currently has methods of one and the same pattern
so adding new methods i.e. events i.e. redux action types is a question
of repetition in the Java source code. Speed up the support of new
events by trying to deal with them in a generic way.

The same goes for JitsiMeetViewDelegate.
2017-09-06 15:57:00 -05:00