Commit Graph

226 Commits

Author SHA1 Message Date
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
Saúl Ibarra Corretgé 4a8f787519 rn: evaluate config.js in a sandboxed environment
We are downloading code off the Internet and executing it on the user's device,
so run it sandboxed to avoid potential bad actors.

Since it's impossible to eval() safely in JS and React Native doesn't offer
something akin to Node's vm module, here we are rolling our own.

On Android it uses the Duktape JavaScript engine and on iOS the builtin
JavaScriptCore engine. The extra JS engine is *only* used for evaluating the
downloaded code and returning a JSON string which is then passed back to RN.
2019-10-14 12:20:58 +02:00
Saúl Ibarra Corretgé ab4b6be9d7 rn: throw exception if default conference options set the room
See: https://github.com/jitsi/jitsi-meet/issues/4720
2019-10-08 14:31:13 +02:00
Saúl Ibarra Corretgé c45ee0230f android: add getters to JitsiMeetConferenceOptions 2019-10-08 14:31:13 +02:00
paweldomas 8dc0f30a49 ref(NAT64AddrInfoModule): use 'ipv4only.arpa' well known host
defined in RFC7050 instead of 'nat64.jitsi.net' as suggested by
Jonathan Lennox.
2019-10-02 10:49:39 -05:00
Saúl Ibarra Corretgé 944e8f8353 android: fix NPE when handling onHostPause
If the Activity is put into the background before the ReactContext is created we
get an NPE here. While the window might be short, it's thechnically possible to
hit this, as our Crashlytics reports show.
2019-09-24 09:49:52 +02:00
Saúl Ibarra Corretgé 4ce65ae7a7 android: make reportConnectedOutgoingCall return a Promise
The call-integration middleware relies on it returning it, as iOS does.
2019-09-20 10:25:42 +02:00
Bettenbuk Zoltan 8a3ddd8596 feat: SVG icons 2019-09-13 14:07:53 +02:00
Saúl Ibarra Corretgé 2f7b485b8f android: remove unneded code 2019-09-12 19:43:05 +02:00
Saúl Ibarra Corretgé 3a885c893a android: fix running on Android 5
For some reason ART complains about these methods being overrides of package
private ones from Timber.
2019-09-12 19:43:05 +02:00
Saúl Ibarra Corretgé 91c1c91950 android: fix log formatting issues 2019-09-11 14:29:37 +02:00
Saúl Ibarra Corretgé 1091ac7e7d log: fix log formatting 2019-09-10 10:34:52 +02:00
Saúl Ibarra Corretgé 902da8cc4f rn: add native loggers
These provide the ability to integrate the SDK with some other application
loggers.

At the time this was written we use Timber on Android and CocoaLumberjack on iOS.

In addition to the integration capabilities, a LogBridge React Native module
provides log transports for JavaScript code, thus centralizing all logs on the
native loggers.
2019-09-04 10:50:30 +02:00
paweldomas 6ae9bbe0c5 feat: report analytics for the network connection
Will emit new 'network.info' action with the online/offline status and
extra details for native like the network type and
'isConnectionExpensive' flag.
2019-08-23 13:36:33 -05:00
Saúl Ibarra Corretgé dd23ed09ad deps: react-native@0.60 2019-08-21 11:12:56 +02:00
Saúl Ibarra Corretgé 6aa895b679 android: attempt to fix assertion errors in ReactInstanceManager
This is the main one:
df4e67fe75/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java (L512)

Why this happens is a mystery wrapped in an enigma.
2019-08-16 17:59:47 +02:00