Commit Graph

241 Commits

Author SHA1 Message Date
tmoldovan8x8 61037b982b
feat(mobile) adds ability to send and receive text messages (#8425) 2021-01-20 14:06:45 +02:00
tmoldovan8x8 5ef60c3a7d
[WIP] adds BroadcastService (#8336)
feat(external_api) exposes more events from JS to native and adds the ability to send actions from native to JS.
2021-01-13 15:48:29 +02:00
Saúl Ibarra Corretgé 1ec8f70d55 fix(libre-build) skip spurious Firebase and GCM dependencies
Fixes: https://github.com/jitsi/jitsi-meet/issues/8353
2021-01-12 14:55:47 +01:00
Saúl Ibarra Corretgé a01e3e9d8a fix(android) avoid crashes if view is null
This may happen due to API misuse, but also in complex applications where
activity lifetimes are not straightforward.
2020-12-22 13:53:39 +01:00
Saúl Ibarra Corretgé 687a6c31ee feat(analytics) unify Amplitude handlers across web and mobile
The amplitude-js library gained React Native support so there is no need to keep
separate implementations.
2020-12-22 10:36:10 +01:00
Saúl Ibarra Corretgé baa39896f1 fix(android) set stream type hardware buttons should control
Ref:
https://developer.android.com/reference/android/app/Activity#setVolumeControlStream(int)
2020-11-26 16:30:01 +01:00
Saúl Ibarra Corretgé 3725f698e4 fix(android) reset audio route after audio focus was lost
Looks like audio devices must be re-set after focus was lost and regained.
Otherwise some devices (tested on a Samsung Galaxy S9) are in a weird state
where the second microphone is not used when speakerphone is on.
2020-11-26 15:33:36 +01:00
Saúl Ibarra Corretgé 67002c903a fix(android) use modern API for requesting audio focus 2020-11-26 15:33:36 +01:00
Titus-Andrei Moldovan 4cced3af07 fix(android) disables the RNWebViewFileProvider 2020-11-26 11:24:43 +01:00
Titus-Andrei Moldovan 9a35026d6a feat(android) add screen-sharing support
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
Co-authored-by: zycwind <391321232@qq.com>
2020-11-04 14:45:16 +01:00
tmoldovan8x8 8e19597e38
feat(mobile) add splash screen 2020-10-14 11:26:47 +02:00
Titus-Andrei Moldovan de8079cc98 fix(android) update Gradle and the plugin to the latest versions 2020-09-29 14:16:36 +02:00
Titus-Andrei Moldovan 2a9805f9b1 feat(android) revert to JSC as our JS engine
JSC wasn't the cause for the crash we were hunting after all. RN doesn't set
HErmes as the default, neither does Expo, so the jury is still out on Hermes,
and it looks like JSC is still the safest bet.

In addition, the way Hermes is packaged (as a standalone AARs, instead of a
local "Maven repo") complicates the SDK build and can make the resulting build
bloated.
2020-09-29 14:16:36 +02:00
Saúl Ibarra Corretgé 41ea94c0c2 android: update AndroidX core library dependencies 2020-09-15 21:22:50 +02:00
Saúl Ibarra Corretgé 57bbe3f75a android: fix crash when requesting permissions
The RN Permissions module calls this in a non-UI thread. What we observe is a
crash in ViewGroup.dispatchCancelPendingInputEvents, which is called on the
calling (ie, non-UI) thread. This doesn't look very safe, so try to avoid a
crash by pretending the permission was denied.
2020-09-15 16:17:46 +02:00
Saúl Ibarra Corretgé 5cf9a76f9e android: bump minimum API level to 23
Android < 23 is currently less than 3% for us so let's try to lower the
maintenance burden. Users can still download an older version no problem.
2020-08-10 16:37:20 +02:00
Saúl Ibarra Corretgé ddaaeccafa android: disable PiP on Android Go devices
Despite running Android 8.1, they don't support Picture-in-Picture.
2020-07-21 14:03:41 +02:00
Saúl Ibarra Corretgé a113151563 deps: update react-native-calendar-events
Rebase our patches (in PR) on top of latest master.

Sshould fix a crash when requesting permisssions.
2020-05-27 15:35:58 +02:00
tmoldovan8x8 07f64d94c0
android: set view listener in onCreate 2020-05-13 10:56:37 +02:00
Saúl Ibarra Corretgé 65a8091e53 android: simplify code
- No need to handle the activity result in the fragment, since we already do in
  the Activity
- Automagically ddispose the view when destroyed
2020-05-10 08:03:29 +02:00
Saúl Ibarra Corretgé 7fea8e2e6c android: suppress lint warning 2020-05-10 08:03:29 +02:00
tmoldovan8x8 b3f16926d4
rn: add ability to disable crash reporting 2020-05-07 23:05:48 +02:00
tmoldovan8x8 2085851179
android: persist Amplitude device id when not set externally
Co-authored-by: Titus-Andrei Moldovan <moldovan.titus@gmail.com>
2020-04-30 13:12:09 +02:00
Titus-Andrei Moldovan b1d1599a1c android: add a consistent deviceId for Amplitude from SharedPreferences 2020-04-21 11:45:42 +02:00
Volker Braun 2b181673b5
android: arcel the serverURL in the Android SDK
In the Android SDK, the setServerURL option is erroneously
ignored. The meeting's serverURL always defaults to
https://meet.jit.si because the serverURL is not parceled.
2020-04-10 14:53:47 +02:00
Saúl Ibarra Corretgé b0e7471a83 android: revert back to SW decoding
We see tons of crashes on Samsung and Huawei devices. It's really not worth the
headache anymore.
2020-03-20 13:39:48 +01:00
Saúl Ibarra Corretgé 025e2b1ecb android: simplify the creation of AudioManager
Do so on the main thread at startup and pass it along.
2020-03-11 16:27:42 +01:00
Saúl Ibarra Corretgé 05a8591110 android: make sure all AudioMode operations run in the audio thread 2020-03-11 16:27:42 +01:00
Saúl Ibarra Corretgé 38d1032fec android: disable HW accelerated decoding on Samsung
They just keep crashing.
2020-03-06 12:42:16 +01:00
Saúl Ibarra Corretgé 7d09088186 android: turn on HW video decoder
In 49e3b03885 we turned on SW encoders / decoders
on account of some devices having broken HW *encoders* and also our desire for
using simulcast.

Well, the astute reader may have noticed that only *encoding* was mentioned.
Indeed, we should be able to keep using the HW decoder just fine.
2020-02-07 15:27:12 +01:00
Saúl Ibarra Corretgé 306c8ba8c2 android: prepare SDK build for Hermes
We need to push the Hermes AAR to Maven and have the SDK depend on it.
2020-02-04 14:25:56 +01:00
Saúl Ibarra Corretgé 5a6335207f android: raise frament library version dependency 2020-02-04 14:25:56 +01:00
Saúl Ibarra Corretgé 659eb6b789 android: add a consistent device ID in Amplitude
Use ANDROID_ID:
https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
2020-01-09 16:38:13 +00:00
Saúl Ibarra Corretgé 87821eb2c0 android: unmute microphone on the ConnectionService handler
This shouldn't be needed, as ConnectionService should take care of it, but we
suspect some devices don't do it since we got reports of people not hearing
users, and the problem went away when CS was disabled.
2020-01-09 14:37:15 +00:00
Saúl Ibarra Corretgé fddaf7c8a8 android: handle ConnectionService failures more resiliently
Fallback to the non-ConnectionService case for any error. Also, handle errors
when registering the phone account; Pixel C devices throw UnsupportedException.
2020-01-08 16:50:39 +00:00
Saúl Ibarra Corretgé 960ffa7e78 android: switch to the Hermes JavaScript engine 2020-01-08 14:29:25 +00:00
Saúl Ibarra Corretgé 5ef0f527f9 android: handle exception when unregistering account
Pixel C devices have been seen crashing here, oh well.
2020-01-07 12:03:02 +01:00
Saúl Ibarra Corretgé a79ae9b576 android: guard against potential exceptions when dealing with log handlers 2019-12-17 16:11:36 +01:00
Saúl Ibarra Corretgé a622a4c713 android: handle ConnectionService failures more resiliently
Some Samsung devices will fail to fully engage ConnectionService if no SIM card
was ever installed on the device. We could check for it, but it would require
the CALL_PHONE permission, which is not something we want to do, so fallback to
not using ConnectionService.
2019-12-03 11:56:04 +01:00
Saúl Ibarra Corretgé 58bd48c1ae android: disable ConnectionService if permissions are not granted
Some devices seem to have a bug in their Android versions and startCall fails
with SecurityError because the CALL_PHONE permissions is not granted. This is
not a requirement for self-managed connection services as per the official
documentation though:
https://developer.android.com/guide/topics/connectivity/telecom/selfManaged

Alas, connection services takes over audio device management too, so let's
handle the error and disable CS if we get SecurityError.
2019-11-27 14:33:25 +01:00
Saúl Ibarra Corretgé 1a3736bf98 android: unregister phone account if startCall fails 2019-11-27 14:33:25 +01:00
Saúl Ibarra Corretgé 15e47a9eb3 android: update native dependencies 2019-11-26 20:33:38 +01:00
Saúl Ibarra Corretgé 8fd3bb2302 android: fallbacck to speaker in ConnectionService handler
It has been our default for a while.
2019-11-26 11:30:18 +01:00
Saúl Ibarra Corretgé af6642b91b rn: allow for userInfo and token to be set from the SDK 2019-11-14 12:30:15 +01:00
Saúl Ibarra Corretgé 4d243f9b92 android: fix selecting the Bluetooth route
Samsung devices (of course) seem to stick with the earpiece if we first select
Bluetooth but then set speaker to false. Reverse the order to make everyone
happy.

This only applies to the generic and legacy handlers.
2019-11-08 12:15:49 +01:00
Saúl Ibarra Corretgé 6b716f8f56 android: fix initializing audio device handler modules too early
When ConnectionService is used (the default) we were attaching the handlers too
early, and since attaching them requires that the RNConnectionService module is
loaded, it silently failed. Instead, use the initialize() method, which gets
called after all the Catalyst (aka native) modules have been loaded.
2019-11-08 12:15:49 +01:00
Saúl Ibarra Corretgé 5b99219f29 android: log a warning if listeners could not be attached 2019-11-08 12:15:49 +01:00
Saúl Ibarra Corretgé f0dcb51915 android: make code a bit more readable 2019-11-08 12:15:49 +01:00
Saúl Ibarra Corretgé 3c22cd8ef4 rn,android: refactor audio device handling module
Separate each implementation (3 as of this writing) into each own "handler"
class.

This should make the code easier to understand, maintain and extend.
2019-10-31 16:41:08 +01:00
Saúl Ibarra Corretgé c2ed296178 android: make check more resilient
If action is null (observed on some old devices) we'll get an exception.
Reversing the check fixes it since Actions.XXX is statically defined.
2019-10-14 17:45:43 +02:00