Commit Graph

354 Commits

Author SHA1 Message Date
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é 692c6a47b4 rn: now working on versions 20.0 / 2.6 2019-12-17 16:19:42 +01:00
Saúl Ibarra Corretgé b3983aa766 android: add ability to make test signed release builds 2019-12-17 16:11:50 +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é e69da98348 android,ios: add store screenshots
While Fastlane recommends automagic screenshots, we cannot really do that since
we require a specific setup for a video call and so on.
2019-12-17 16:09:57 +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é 0eec182df4 android: remove old code for accepting SDK license
It can now be automated in a CI environment as follows:

yes | sdkmanager --licenses
2019-11-27 14:24:29 +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é eb900ddbe1 android: fix track name in Fastlane 2019-11-14 15:27:32 +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é 131e8f4aea fastlane: prepare for open beta access 2019-11-12 16:06:15 +01:00
Saúl Ibarra Corretgé 44970648ea rn: now working on versions 19.5 / 2.5 2019-11-08 15:21:55 +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é 97d75c2cb9 android: fix SDK release script for new dependency syntax
Skip the first character, since it's now like ^123456.0.0
2019-10-21 11:12:26 +02:00
Saúl Ibarra Corretgé 0fa6ffc439 deps: react-native-google-signin@3.0.1 2019-10-14 19:12:45 +02: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é ac06892bb4 android,ios: now working on versions 19.4 / 2.4 2019-09-26 17:33:52 +02: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é 64d2885233 android: raise SDK version 2019-09-20 10:25:42 +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
Saúl Ibarra Corretgé 00c8409e31 ios,android: update SDK version to 2.3.0 2019-09-17 13:42:08 +02:00
Bettenbuk Zoltan 8a3ddd8596 feat: SVG icons 2019-09-13 14:07:53 +02:00
Saúl Ibarra Corretgé eb15f73e59 android: don't use proguard on debug builds
It's not necessary and makes the build faster.
2019-09-12 19:43:05 +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é 6861f463b3 android: update SDK release script to publish JSC artifacts
In
b53a034aaf (diff-0339cf92cc68bc5981fe6df601316c1c)
I removed this, because RN has updated the builtin JSC version. On the next
release, however, RN introduced a new JS interpreter (Hermes) so JSC is now a RN
dependency. Thus, add the magic spells to publish the AARs to Maven.
2019-09-05 16:32:53 +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
Saúl Ibarra Corretgé 1c1e8a942b audio-mode: refactor device handling
This commit refactors device selection (more heavily on iOS) to make it
consistent across platforms.

Due to its complexity I couldn't break out each step into separate commits,
apologies to the reviewer.

Changes made to device handling:

- speaker is always the default, regardless of the mode
- "Phone" shows as a selectable option, even in video call mode
- "Phone" is not displayed when wired headphones are present
- Shared device picker between iOS and Android
- Runtime device updates while the picker is open
2019-08-14 18:57:03 +02:00
Дамян Минков 8800cb4580
Adds live streaming sound notification. (#4532)
* Adds live streaming sound notification.

* Adds ios resources for the new files.
2019-08-12 18:34:38 +03:00
Saúl Ibarra Corretgé 0f77cf9e0c android: use adaptive icons 2019-08-07 14:40:20 +02:00