Commit Graph

114 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé bdb3099073 android: fix running on Android < M
The android.telecom.CallAudioState class was only added in API level 23 (Android
M), so make sure we don't import it in lower versioned devices.
2019-03-08 11:37:25 +01:00
Bettenbuk Zoltan d56d01cebb [Android] Change the type of the color scheme 2019-02-15 13:33:38 +01:00
Bettenbuk Zoltan eec7a1b628 [RN] Add color scheme support - native 2019-02-08 11:43:21 +01:00
Saúl Ibarra Corretgé 5f7a515610 rn: drop {AddPeople,Invite}Controller
We are going to implement the invite dialog *inside* the SDK, so there is no
need to have all this machinery anymore.
2019-02-08 09:02:15 +01:00
Paweł Domas f8294fb312 android: add ConnectionService
* feat(Android): implement ConnectionService

Adds basic integration with Android's ConnectionService by implementing
the outgoing call scenario.

* ref(callkit): rename _SET_CALLKIT_SUBSCRIPTIONS

* ref(callkit): move feature to call-integration directory

* feat(ConnectionService): synchronize video state

* ref(AudioMode): use ConnectionService on API >= 26

Not ready yet - few details left mentioned in the FIXMEs

* feat(ConnectionService): add debug logs

Adds logs to trace the calls.

* fix(ConnectionService): leaking ConnectionImpl instances

Turns out there is no callback fired back from the JavaScript side after
the disconnect or abort event is sent from the native. The connection
must be marked as disconnected and removed immediately.

* feat(ConnectionService): handle onCreateOutgoingConnectionFailed

* ref(ConnectionService): merge classes and move to the sdk package

* feat(CallIntegration): show Alert if outgoing call fails

* fix(ConnectionService): alternatively get call UUID from the account

Some Android flavours (or versions ?) do copy over extras to
the onCreateOutgoingConnectionFailed callback. But the call UUID is also
set as the PhoneAccount's label, so eventually it should be available
there.

* ref(ConnectionService): use call UUID as PhoneAccount ID.

The extra is not reliable on some custom Android flavours. It also makes
sense to use unique id for the account instead of the URL given that
it's created on the per call basis.

* fix(ConnectionService): abort the call when hold is requested

Turns out Android P can sometimes request HOLD even though there's no
HOLD capability added to the connection (what!?), so just abort the call
in that case.

* fix(ConnectionService): unregister account on call failure

Unregister the PhoneAccount onCreateOutgoingConnectionFailed. That's
before the ConnectionImpl instance is created which is normally
responsible for doing that.

* fix(AudioModeModule): make package private and run on the audio thread

* address other review comments
2019-01-31 17:20:53 +01:00
Saúl Ibarra Corretgé 9bfe54475b android: read Dropbox API from main package resources
This makes Dropbox work on apps using the SDK without needing to build it
themselves.
2019-01-29 15:39:20 +01:00
Saúl Ibarra Corretgé 15c8f2b125 android: remove unused import 2019-01-25 11:06:35 +01:00
Saúl Ibarra Corretgé 349b1ff70e android: fix warning 2019-01-25 11:06:35 +01:00
Saúl Ibarra Corretgé 7c69308270 android: remove unused ProGuard rules file 2019-01-16 14:55:58 -06:00
Bettenbuk Zoltan 8a241ba2b7 [RN] Add chat functionality
Co-authored-by: DimaG <dgeorgiev06@gmail.com>
2019-01-15 11:33:12 +01:00
Saúl Ibarra Corretgé 634f304815 android: simplify handling of the back button
Provide a default and builtin default implementation which finishes the
Activity, same as before.

What this PR removes is the ability to provide a custom default handler because
applications can already take this decision when calling `onBackPressed`. In
addition, make `onBackPressed` return `void` because it's virtually impossible
for it to return `false` (that would mean that there is no
`ReactInstanceManager`, which means there is no app to begin with).

In addition, remove the use of `BackAndroid` since `BackHandler` contains an iOS
shim now.
2019-01-08 17:43:36 +01:00
Saúl Ibarra Corretgé 1e83891a70 deps: update react-native-immersive 2018-12-19 17:44:29 +01:00
Saúl Ibarra Corretgé 0c3d037cb5 android: throw if Activity doesn't implement the required interface 2018-12-04 20:09:54 +01:00
Saúl Ibarra Corretgé bc77a62626 android: fix maven repo relative location
Assume it's at the same level as the Jitsi Meet repo, by default.
2018-12-03 11:49:03 +01:00
Saúl Ibarra Corretgé b15533d75f android: update app / sdk version
Set them to the next release versions. In additon, the buildNumber variable will
be used to match the requirements of versionCode:
https://developer.android.com/studio/publish/versioning

that is, a monotonically increasing number, independent of the app / sdk
version.
2018-12-03 11:49:03 +01:00
Saúl Ibarra Corretgé 26ba974757 [RN] Drop react-native-locale-detector dependency
The upstream package has been unmaintained for 2 years now, and making the litle
changes needed as React Native needs them is getting old. The actual
funcionality is a couple of one-liners plus tons of boliterplate, which gets
reduced by quite a bit if we just embed it. So here it goes.
2018-12-03 11:48:44 +01:00
Guus der Kinderen fb6949f7ba [Android] Add jsc-android to SDK project / improve build docs
Due to a switch to a newer version of JSCore, the jsc-android dependency is now used by the
SDK. As this dependency is not (yet) available in the Jitsi Maven repository, an error like
this is reported when an application is ran that uses the SDK:

    com.facebook.react.common.JavascriptException: Can't find variable: Symbol

This commit primarily improves the instructions on how to create a local Maven repository
that contains all required dependencies, including the JSCore dependency that was missing.

This intends to address the issue described in https://github.com/jitsi/jitsi-meet/issues/3399
2018-11-29 22:21:27 +00:00
Leonard Kim d5fb2c2717 ref(sdk): update comments to exclude mention of componentWillReceiveProps 2018-11-21 08:08:45 -08:00
Saúl Ibarra Corretgé 011a46ce2d [RN] Don't bundle fonts we don't use 2018-10-16 14:33:48 +02:00
Saúl Ibarra Corretgé b71adbdf70 deps: update React Native to version 0.57 2018-10-10 18:07:36 +02:00
hristoterezov 60decf7692 ref(dropbox): Consistency for the naming around the app key. 2018-09-27 01:42:59 -05:00
hristoterezov 38517127c3 feat(dropbox): Implement react-native module. 2018-09-27 01:42:59 -05:00
Bettenbuk Zoltan d10d61fb7a [RN] Add Google Sign In to live streaming 2018-09-05 23:09:56 +02:00
Bettenbuk Zoltan 9fe2b834eb [Android] Implement Activity.onActivityResult 2018-09-05 23:09:56 +02:00
Saúl Ibarra Corretgé f3d623e0ca android: move calendar permission handling to the SDK
Since this is a feature implemented in the SDK, it makes sense that all the
plumbing required to make it work it's in the SDK itself.
2018-09-05 14:56:00 -05:00
Saúl Ibarra Corretgé 388c906312 android: implement the PermissionAwareActivity interface
This makes the PermissionsAndroid builtin module work.

Introduce the JitsiMeetActivityInterface, which defines the interface that
activities using JitsiMeetView directly must implement in order to ensure full
functionality.
2018-09-05 14:56:00 -05:00
Saúl Ibarra Corretgé 27021ea271 [RN] Replace cached image implementation
Use react-native-fastimage, which uses 2 full-native image impleentations using
well known and mature (native) libraries.

This gets us rid of 2 libraries which were observerd as a source of bugs and
created trouble with dependencies: react-native-fetch-blob and
react-native-img-cache. They are also no longer well maintained.
2018-07-31 14:07:17 -05:00
Saúl Ibarra Corretgé 243dd16285 android: run all audio and bluetooth operation on a dedicated thread 2018-07-27 15:39:39 -05:00
Saúl Ibarra Corretgé 92001f4d37 android: run WiFi stats operations on a dedicated thread 2018-07-27 15:39:39 -05:00
Lyubo Marinov 8ff3ae0ab2 [Android] Introduce IncomingCallView (continued) 2018-07-18 22:47:18 -05:00
Saúl Ibarra Corretgé ea22d12581 [Android] Introduce IncomingCallView
It's a separate view (on the native side) and app (on the JavaScript side) so
applications can use it independently.

Co-authored-by: Shuai Li <sli@atlassian.com>
Co-authored-by: Pawel Domas <pawel.domas@jitsi.org>
2018-07-18 22:47:18 -05:00
Saúl Ibarra Corretgé 9972e88b67 [Android] Split base functionality out of JitsiMeetView
As the need for adding more views connected with our React code arises, having
everything in JitsiMeetView is not going to scale.

In order to pave the way for multiple apps / views feeding off the React side,
the following changes have been made:

- All base functionality related to creating a ReactRootView and layout are now
  in BaseReactView
- All Activity lifecycle methods that need to be called by any activity holding
  a BaseReactView are now conveniently placed in ReactActivityLifecycleAdapter
- ExternalAPIModule has been refactored to cater for multiple views: events are
  delivered to views, and its their resposibility to deal with them
- Following on the previous point, ListenerUtils is a utility class for helping
  with the translation from events into listener methods
2018-07-18 22:47:18 -05:00
virtuacoplenny 3e79926ad4 feat(recording): add sounds for when recording starts and stops (#3078)
* feat(recording): add sounds for when recording starts and stops

* squash: use constants, play sounds for file only

* squash: rename recordingStopped.mp3 -> recordingOff.mp3

* squash: flip var declaration for alpha order
2018-06-05 20:20:43 +02:00
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