Commit Graph

488 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé f71ec55170 android: add ability to keep track of the current ongoing conference 2019-06-26 21:45:27 +02:00
Saúl Ibarra Corretgé 9e95e7cd97 rn: bump SDK version to 2.2.0 2019-06-26 12:04:17 +02:00
Saúl Ibarra Corretgé 1786bfadce android: make some activity attributes private
They are only meant to be used internally. This reduces the risk of SDK users
sending garbage when we expect a specific type.
2019-06-21 21:48:46 +02:00
Saúl Ibarra Corretgé ddaa22048f android: make sure we left the current meeting when the activity is destroyed
If the user swipes the activity from the recents list there is no other chance,
onDestroy gets called directly.
2019-06-21 21:48:46 +02:00
Saúl Ibarra Corretgé 3e77890387 android: fix not calling super in onNewIntent 2019-06-21 21:48:46 +02:00
Saúl Ibarra Corretgé 243fdba80f android: fix exception when sending events without URL
ENTER_PIP_MODE, for example, does not have it.
2019-06-21 15:42:10 +02:00
Saúl Ibarra Corretgé 803870ef8f android: add a uncaught exception handler
Its main task is to cleanup conferences (specially the connection services
stuff) to make sure the system is left in a working state even when the
unexpected happens.
2019-06-20 17:03:24 +02:00
Saúl Ibarra Corretgé 4591b36c3e android: handle onActivityResult Activity lifecycle method
It may be called in the Activity instead of in the Fragment. Handle both.
2019-06-18 14:51:44 +02:00
Saúl Ibarra Corretgé 73b6a7a134 android: fix React packager not working on debug builds on a device 2019-06-18 14:51:44 +02:00
Saúl Ibarra Corretgé 8b5b112c6a android: don't default to making libre builds 2019-06-18 14:51:44 +02:00
Saúl Ibarra Corretgé e33b334307 rn: add SDK API to set user information
At the moment it includes:

- display name
- email
- avatar URL

This information is used *only* if no token was specified.
2019-06-11 17:27:16 +00:00
Saúl Ibarra Corretgé cf7b10d53d feature-flags: initial implementation
The welcomePageEnabled and pictureInPictureEnabled props on mobile have been
converted to feature flags.
2019-06-11 13:37:50 +00:00
Hristo Terezov 9712804040 fix(Amplitude): user id 2019-05-29 09:53:31 -07:00
Hristo Terezov fecbef0aff fix(AmplitudeModule): class name 2019-05-29 17:22:50 +02:00
Saúl Ibarra Corretgé d65b71b584 rn: add ability to set the conference subject 2019-05-29 14:48:02 +02:00
Saúl Ibarra Corretgé 47d5163c52 rn: don't tag builds by default
People run these in their own checkout and will run into problems because
tagging will fail.
2019-05-23 12:07:04 +02:00
Saúl Ibarra Corretgé 466e1e3eb8 android: fix publishing new async storage package
The naming didn't match, so adjust it. @ cannot be used for maven artifact
names.
2019-05-20 17:33:36 +02:00
Saúl Ibarra Corretgé 8a90f0dab1 android: include SDK version in Maven repo commit message 2019-05-20 17:33:17 +02:00
Saúl Ibarra Corretgé 6f320f463d rn: don't use annotated tags when building the SDKs 2019-05-14 17:00:02 +02:00
Saúl Ibarra Corretgé b45a5da6e2 rn: use new AsyncStorage package
It was extracted from the RN core to a community maintained package.
2019-05-08 16:03:09 +02:00
Saúl Ibarra Corretgé 8b0e5b9d15 android: set system navbar color to match the header 2019-05-08 12:44:17 +02:00
paweldomas 0889ffdf27 android fix: do not enter PiP mode when the permissions alert is shown
Entering PiP mode while the permissions dialog is display will not only
fail, but also mess up the Activity lifecycle on some OS versions.
We may end up with two activity/fragment instances and a situation where
the onStop callback was not called yet on the instance #1 while
the onResume has been already called on instance #2.
2019-05-08 10:15:14 +02:00
Bettenbuk Zoltan 86d0d4fc22 rn: add DialInSummary 2019-05-07 18:02:14 +02:00
Saúl Ibarra Corretgé 2d45709a6a android: add the ability to make a "libre" build
A libre build will exclude the following:

- Analytics modules
- Google Play services GMS
- Crashlytics
- Firebase
2019-05-02 09:26:20 +02:00
Saúl Ibarra Corretgé 08891b17b6 android: expose JitsiMeetActivity.leave() 2019-05-02 09:26:20 +02:00
Saúl Ibarra Corretgé aab3428347 android: make JitsiMeetActivity.join public 2019-05-02 09:26:20 +02:00
Saúl Ibarra Corretgé bf7b1c5cfc rn: add support for alpha.jitsi.net 2019-05-01 23:23:24 +02:00
Saúl Ibarra Corretgé c1f8a35156 doc: add links to the sample SDK applications repo 2019-04-17 09:37:28 +02:00
Saúl Ibarra Corretgé b768b88491 android: add ability to override SDK version when releasing 2019-04-12 15:39:29 +02:00
Saúl Ibarra Corretgé 9f339c452b android: raise SDK version 2019-04-12 15:39:29 +02:00
Saúl Ibarra Corretgé b78989f5f2 android: improve SDK release script
- don't hardcode defaults in gradle files
- allow for uploading also to HTTP URLs
- support HTTP authentication when publishing
2019-04-11 17:43:33 +02:00
Saúl Ibarra Corretgé 21c0745504 android,ios: now working on version 19.2 2019-04-10 14:14:04 +02:00
Saúl Ibarra Corretgé 4c3cf8c14a android: add an improved SDK release script
It releases the SDK and all dependencies (including React Native) to the
specified Maven repo.
2019-04-03 16:15:11 +02:00
Saúl Ibarra Corretgé 1f371ab055 android: simplify qualifying dependencies when publishing
Use an ever increasing number so no manual updates are necessary.
2019-04-03 16:15:11 +02:00
Saúl Ibarra Corretgé dfeb26597b android: make Maven repo used for publising configurable 2019-04-03 16:15:11 +02:00
Saúl Ibarra Corretgé e217e10af5 android: update custom version for native dependencies 2019-04-02 14:17:45 +02:00
Saúl Ibarra Corretgé 36eb27e233 rn: add build information to SettingsView 2019-04-02 12:40:35 +02:00
paweldomas a386740103 fix(ConnectionService): history and audio focus on Samsung devices
On some Samsung devices the call done with the ConnectionService end up
in the native call history which we don't want. That's fixable by
marking the Connection as "external" just before the call is
disconnected.

Another issue specific to Samsung devices about the audio focus not
always being release when that call ends. That's fixable by marking
the call as holding just before disconnecting it.
2019-03-27 13:39:52 -05:00
Saúl Ibarra Corretgé 451949f49d android: enable PiP support by default in JitsiMeetActivity 2019-03-27 17:39:09 +01:00
Saúl Ibarra Corretgé 61ed459971 android: add JitsiMeetActivity.launch helper methods
They greatly simplify starting a JitsiMeetActivity by encapsulating the creation
of the Intent adn extras placement.

In order to make this possible JitsiMeetConferenceOptions now implements
Parcelable so it can be serialized and passed around when creating an Intent.
2019-03-27 17:39:09 +01:00
Saúl Ibarra Corretgé c30a4a0aa6 android: make Amplitude and Dropbox modules package private 2019-03-27 17:39:09 +01:00
Saúl Ibarra Corretgé 15c5a2339b android: fix getting permission request results
Now that we have both a Fragment and an Activity there are lifecycle methods
that overlap. If a Fragment requests permission by calling requestPermissions
then the result handler will be called on itself. React Native's permissions
module, however, calls ActivityCompat.requestPermissions on the Activity, thus
we need to handle the results at the Activity level and not at the Fragment
level.
2019-03-26 11:56:14 -05:00
Saúl Ibarra Corretgé 7ebcf69937 android: add fastlane integration 2019-03-25 19:08:12 +01:00
Saúl Ibarra Corretgé 030af37668 android: generate versionCode automatically
It's a number whichb must be ever increasing with each build submitted to the
store.

Automate its value by using the number of seconds since 1st of January 2019.
That should be enough for ~680 years.
2019-03-25 19:08:12 +01:00
paweldomas 19e8e8710a fix(Android/ConnectionService): do not display the address
Turns out that on Samsung phones the calls placed with
the ConnectionService appear in the calls log as weird long numbers.
The system mangles the address we give it ("sip:meet.jit.si/something")
into this weird long number and the call to request.getAddress() returns
that. Turn off the presentation as neither this number nor our address
makes sense. This way the call appears as from "Unknown" caller in call
history which is still not perfect, but better than the random number.

Note that other phones will preserve the originally passed address value
(tested on One Plus 5).
2019-03-25 09:24:33 +01:00
paweldomas 3b24124d57 fix(Android/ConnectionService): mic not working
Turns out the microphone will not work on some devices when starting in
"audio only", because the audio mode is not set to the MODE_IN_COMMUNICATION,
but to the MODE_IN_CALL. Calling setAudioModeIsVoip(true) makes
the system adjust to MODE_IN_COMMUNICATION and the mic works fine.
2019-03-25 09:24:33 +01:00
paweldomas 6d0b6bee85 ref(AudioModeModule): check 1 method to enable ConnectionService 2019-03-22 09:17:14 +01:00
Saúl Ibarra Corretgé 08efc46f21 android: fix crash in debug mode 2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé e32336b96f android: run the React packager when running from AS
When running the app from Android Studio the React packager is not automatically
started. In vanilla RN projects this is done by the "react-native run-android"
command, but often times it is desired to run from Android Studio.

This fixes that by starting the packager from Gradle.
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé c91880859b android: fix gradle warning 2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé cff78d7a83 android: disable delta updates
It's enabled by default, but marked as experimental (uh?!). It creates trouble
as sometimes the packager goes bananas. Disable them until further notice, our
bundle is not that large anyway.
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé 2c592f61c3 android: enable 64bit builds 2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé b53a034aaf deps: update React Native to version 0.59
This new version comes with an updated JSC runtime, so we no longer need to
depend on the updated version ourselves.
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé 2715e81f1d rn: add more SDK documentation 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 7712c6913c android: make ReactInstanceManagerHolder.emitEvent return void 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 45b6a8b5d5 android: throw if a unsupported type makes it to the props Bundle 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 26ca0e6630 android: throw if the overlsay permission is not granted in Debug mode 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé d39290f9fa rn: refactor conference events
Consolidate all failure cases into a single one: CONFERENCE_TERMINATED. If the
conference ended gracefully no error indicator will be present, otherwise there
will be.
2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé bf3bcd65d6 android: add JitsiMeetActivity
It renders a single JitsiMeetFragment which holds the JitsiMeetView view.
2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé a7018970ca android: update SDK documentation 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 20edb7c279 android: make onExternalAPIEvent protected 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 59b00d022b android: don't proxy enterPictureInPicture in JitsiMeetFragment 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 53722fd2e6 android: remove ReactContextUtils
In practice, we are never going to be in a position where we don't have a
ReactContext but we do have some React Native code running. So let's not expect
the impossible.
2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 54bab793e5 android: remove JitsiMeetViewAdapter
It was never used and typicallt the Activity / Fragment holding the
JitsiMeetView object will be the listener.

In addition, once we refactor the events they will be reduced into far fewer.
2019-03-12 16:55:28 +01:00
paweldomas 5b3e8a9b5e android: introduce JitsiMeetConferenceOptions
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 56135bd085 android: add initial implementation of join / leave 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 405905be82 rn: raise SDK version 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé 90803c8ff6 android: SDK v2 pass one
Add JitsiMeetFragment and refactor the app to use it.
2019-03-12 16:55:28 +01:00
Hristo Terezov 59fc3642a6 feat(amplitude): add mobile implementation 2019-03-12 16:48:08 +01:00
Jose Angel Gonzalez 039805eba3 fix(android-sdk): Recover audio device if the OS changes it 2019-03-12 09:55:51 +01:00
Saúl Ibarra Corretgé c737d46d90 android: update gradle plugin version 2019-03-08 17:24:49 +01:00
Saúl Ibarra Corretgé 3f2a559d64 rn: now working on version 19.1 2019-03-08 14:04:03 +01:00
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
Saúl Ibarra Corretgé a4b3f8ade6 android: don't build javadocs when publishing react-native plugins
They generate a bunch of harmless yet confusing error messages and they are not
really useful.
2019-02-14 13:16:04 -08: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é 14990a427a rn: set version to 19.0.0
This marks our switch to CalVer: http://calver.org/

Major: year
Minor: release number
Patch: build (in case we need to retry)
2019-01-29 17:25:00 +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é d5a43426ed android: don't read Dropbox key from iOS files 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
Guus der Kinderen 4b99caa1a9 Android SDK build instructions: add 'clean'
I'm ashamed to admit that I spent several _days_ chasing a bug that was already fixed. :( This obvious instruction would have been a time-saver.
2019-01-23 16:46:51 +01:00
Saúl Ibarra Corretgé 7c69308270 android: remove unused ProGuard rules file 2019-01-16 14:55:58 -06:00
Saúl Ibarra Corretgé 50b4212463 android: add missing ProGuard rules 2019-01-16 14:55:58 -06:00
Saúl Ibarra Corretgé bb8fc8770a android: fix packager in debug mode in API 28
These values must match these ones in React Native:
5939d078a0/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java (L20-L22)
2019-01-16 14:55:12 -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é 148d4ebb90 rn: add Firebase integration
This is done at the app level, not the SDK.

Currently 2 Firebase services are used:

  - Crashlytics
  - Dynamic Links

They are enabled in tandem, if the appropriate Google services file
(GoogleService-Info.plist on iOS or google-services.json on Android) is found.

Each service needs to be individually enabled in the Firebase console.
2019-01-08 17:42:59 +01:00
Saúl Ibarra Corretgé a1ebba0ef7 android: fix compilation warning
The annotation processor is required for our Glide module to be included.
2019-01-08 17:42:59 +01:00
Sebastian Safari ce01b31514 doc: add notes to enable 32bit only mode 2019-01-03 13:43:11 +01:00
Saúl Ibarra Corretgé 0469e5af5e deps: update react-native-calendar-events 2018-12-20 13:52:14 +01:00
Saúl Ibarra Corretgé 1e83891a70 deps: update react-native-immersive 2018-12-19 17:44:29 +01:00
Saúl Ibarra Corretgé f97869ffde deps: update react-native-keep-awake 2018-12-19 15:20:10 +01:00
Saúl Ibarra Corretgé 0fc69416d4 android: update build and target SDK versions
Note that Android 9 Pie (API 28) disallows HTTP requests by default, so an
exception was needed in the app in order for the Metro bundler to work in debug
mode.
2018-12-19 15:18:10 +01:00
Saúl Ibarra Corretgé f8f544c615 android: remove unneeded gradle task 2018-12-19 15:18:10 +01:00
Saúl Ibarra Corretgé ac624b104f android: remove duplicated Maven repo
The Google repository is already added with google().
2018-12-19 15:18:10 +01:00
Saúl Ibarra Corretgé d18f582922 android: fix warning 2018-12-19 15:18:10 +01:00
Saúl Ibarra Corretgé 85b141db89 android: update proguard rules 2018-12-19 15:18:10 +01:00
Saúl Ibarra Corretgé e4b1e40cc6 deps: update react-native-google-signin 2018-12-19 15:15:21 +01:00
Saúl Ibarra Corretgé 342718f673 rn: drop support for no longer supported deployments 2018-12-18 16:18:08 +01:00
Saúl Ibarra Corretgé 545ad0e1a6 android: update documentation 2018-12-18 09:05:50 +01:00
Saúl Ibarra Corretgé 053437c86e android: circumvent trouble with apps using Glide
Glide (which is used by react-native-fast-image) can cause trouble if the host
app (the one using the SDK) is using Glide already.

To avoid this, don't use the builtin AppGlideModule (as the docs recommend) and
let apps define it.
2018-12-18 09:05:50 +01:00
Saúl Ibarra Corretgé 0031fd2678 android, ios: update react-native-fast-image dependency 2018-12-18 09:05:50 +01:00
Saúl Ibarra Corretgé 22199cb57a android: update documentation to match the new SDK API 2018-12-06 15:29:59 +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
damencho 34f2ff9b85 Update comments. 2018-12-03 16:46:59 +01:00
damencho 21b0ed691b Auto accept android license on build machines.
Every time the android version that is used changes we need to update the license hash.
2018-12-03 16:46:59 +01:00
Saúl Ibarra Corretgé 8b359f48db android: remove no longer needed code
The dependency was dropped, so it's no longer needed.
2018-12-03 16:41:12 +01:00
Saúl Ibarra Corretgé ee8d2df355 android: update build instructions 2018-12-03 11:49:03 +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é cf9a65f475 android: update dependencies for publishing 2018-12-03 11:49:03 +01:00
Saúl Ibarra Corretgé d7ba4a8a2a android: add helper scripts to publish RN and JSC to Maven 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 39a22effb1 fix(build.gradle): Move dropboxAppKey definition to defaultConfig 2018-09-27 01:42:59 -05:00
hristoterezov ca600928f5 feat(build.gradle): Use the Dropbox app key specified in Info.plist. 2018-09-27 01:42:59 -05: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
hristoterezov 717fade79c ref(proguard): Create common proguard config. 2018-09-18 14:37:05 -05:00
hristoterezov 959e687ed4 feat(proguard): Add crashlytics rules 2018-09-18 14:37:05 -05:00
hristoterezov 5f5adc3fa8 feat(proguard): enable 2018-09-18 14:37:05 -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é 4fd8172126 [Android] Add LeakCanary
LeakCanary is a memory leak detection library which will run only in Debug mode.
2018-08-31 16:27:51 -05:00
Saúl Ibarra Corretgé 8d3cecad86 [Android] Update JSC version
The JSC version used by React Native is about 3 years old, and doesn't implement
things like Symbol or Typed Arrays, which require polyfills. These polyfills are
sometimes a los less performant, as is the case for Typed Arrays.

Bumping an updated JSC version makes both platforms consistent when it comes to
the JavaScript platform.
2018-08-05 17:04:16 -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
Saúl Ibarra Corretgé c3f602b7b6 Revert "fix(android): do not require java 8 target"
This reverts commit 9e0fee6c7d.

WebRTC requires Java 8, and Java 7 is now considered unsupported:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/discuss-webrtc/V1h2uQMDCkA/RA-uzncVAAAJ
2018-06-25 22:58:26 -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
Guus der Kinderen f604b1c82d doc: elaborate in Jitsi Meet SDK for Android readme 2018-05-30 16:51:18 +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
Saúl Ibarra Corretgé 52da5010cc [Android] Make sure we use the react-native version in node_modules
Releases are also published to jcenter, and due to how the dependency is
declared, we are picking the latest release from there, which is arguably not
what we want.
2018-05-15 13:48:34 -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
Shuai Li 5cde674eff
fix(android): webrtc progurd rule
The new libwebrtc.jar contains an extra unused class file, when proguard is enabled result in the following warning:

org.chromium.build.BuildHooksAndroidImpl: can't find superclass or interface org.chromium.build.BuildHooksAndroid
2018-03-09 12:29:49 -08: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
paweldomas 9e0fee6c7d fix(android): do not require java 8 target
Updates react-native-webrtc to get rid of Java 8 requirement for
the Android app.
2018-03-08 15:47:05 -06:00
Lyubo Marinov 9f69c4d730 Grow features/settings from features/app-settings and features/settings-menu 2018-02-26 19:19:01 -06:00
zbettenbuk 9a9890f86c Introduce SafeArea for Settings and Header 2018-02-26 18:35:13 -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é 9c2849a663 [Android] Enable Java 1.8 compatibility support
It was recently introduced in WebRTC, so we we need to enable it project wide.
As for what features are supportd, see:
https://developer.android.com/studio/write/java8-support.html
2018-01-19 14:05:25 -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é b920140488 android: update Gradle plugin version for AS 3.0.1 2017-12-14 15:20:05 -06:00
Saúl Ibarra Corretgé 49acd6bf6a android: simplify using the Google Maven repo reference
Also remove mavenLocal since we don't need it.
2017-12-14 15:20:05 -06:00
Saúl Ibarra Corretgé e9c91d194c android: update appcompat version 2017-12-13 09:35:34 -06:00
Saúl Ibarra Corretgé 3460fe03e5 android: update target SDK version
Android Oreo (API level 26) is supported since React Native 50.
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
Saúl Ibarra Corretgé f6ace61674 doc: document required proguard rules 2017-12-12 10:48:51 -06:00
Lyubo Marinov 569b3547c8 Upgrade NPM dependencies/packages: react-native 0.50 2017-12-04 00:45:18 -06: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 0550858653 [Android] Maven artifact publishing documentation 2017-10-30 16:04:37 -05:00
Saúl Ibarra Corretgé 5308f78c9a [Android] Fix Android Studio 3.0 (final) 2017-10-26 10:04:52 +02:00
Saúl Ibarra Corretgé a14cc60e30 [Android] Specify build tools version
Android Studio won't build the app otherwise. Since the gradle plugin 3.0 beta7,
the minimum supported build tools version is 26.0.2, so set it to that. Also
bump compileSdkVersion to 26 since they need to match (in the major number, that
is).

The target API is still 25. Android Oreo (26) brought some changes in overlay
permissions which I haven't figured out yet.
2017-10-25 15:16:09 -05:00
Saúl Ibarra Corretgé ae0e37be34 [Android] Fix Android Studio 3.0 RC2 2017-10-25 16:17:23 +02: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 b3cef401f2 [Android] Fix Android Studio 3.0 Beta 6 2017-10-01 00:18:25 -05:00
Lyubo Marinov 3b5ee2d4c6 [iOS] Add initial CallKit support 2017-09-29 12:00:13 -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
Saúl Ibarra Corretgé fe8f383a41 [Android] Update gradle plugin version for Android Studio 3 beta 5 2017-09-13 14:35:21 +02: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
Saúl Ibarra Corretgé ba49c7955a [Android] Fix gradle and plugin versions with Android Studio 3.0 Beta 4 2017-09-08 10:47:08 +02: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
Lyubo Marinov 6982506acc [RN] Remove duplication 2017-09-06 14:48:53 -05:00
Saúl Ibarra Corretgé 5f55b3198c [Android] Update gradle plugin version for Android Studio 3 beta 2 2017-08-24 15:04:31 +02:00
Saúl Ibarra Corretgé 26f0f7f89c [RN] Alert the user when they need to manually grant a permission 2017-08-22 07:28:19 -05:00
Lyubo Marinov 2356238887 [Android] Reduce boilerplate/duplication 2017-08-21 13:58:13 -05:00
Saúl Ibarra Corretgé ca80839094 [Android] Fix gradle and plugin versions with Android Studio 3.0 Canary 9 2017-08-08 14:48:43 -05:00
Saúl Ibarra Corretgé 1c1604bee7 [Android] Don't mute the microphone under any circumstance
It's a global action, and if we do that other applications won't be able to use
it. I experienced this with the system camera. We do, however, make sure to
enable it when we need to.

Note that enabling it doesn't mean we are *using* it. It just means we *can*,
and that we will get actual audio when we do.
2017-08-03 13:45:41 -05:00
Saúl Ibarra Corretgé 99fd325a51 [Android] Fix gradle warning
This setting is no longer used.
2017-08-03 13:45:41 -05:00
Saúl Ibarra Corretgé 4f6ec920cd [Android] Set targetApiVersion to 25
We keep being compatible with versions all the way down to 16 for now, but this
will disable internal compatibility shims when running on 25.
2017-08-03 13:45:41 -05:00
Saúl Ibarra Corretgé 0d33844d51 [Android] Use an appropriate Android support library version
It must match the compileSdkVersion major number.
2017-08-03 13:45:41 -05:00
Lyubo Marinov 504646fff0 Coding style 2017-08-03 13:45:41 -05:00
Saúl Ibarra Corretgé 122ebe48c7 [RN] Cache avatars and provide a default in case load fails
Avatars are cached to the filesystem and loaded from there when requested again.
The cache is cleaned after a conference ends and on application startup
(defensive move).

In addition, implement a fully local avatar system, which is used as a fallback
when loading a remote avatar fails. It can also be forced using a prop.

The fully local avatars use a user icon as a mask and apply a background color
qhich is picked by hashing the URI passed to the avatar. If no URI is passed a
random color is chosen.

A grace period of 1 second is also implemented so a default local avatar will be
rendered if an Avatar component is mounted but has no URI. If a URI is specified
later on, it will be loaded and displayed. In case loading the remote avatar
fails, the locally generated one will be used.
2017-08-03 13:45:41 -05:00
Lyubo Marinov 1ad8436cb5 [Android] Use loadURL in the app 2017-08-01 12:07:22 -05:00
Saúl Ibarra Corretgé bfa5f4c953 [Android] Fix resource leak when JitsiMeetView is destroyed
In iOS this is automagically done in the view destructor, bunt we don't have
that luxury in Java we have to do it manually.

The new disponse() method MUST be called when the Activity holding the view is
going to be destroyed, typically in the onDestroy() handler.
2017-07-28 10:50:12 -05:00
Saúl Ibarra Corretgé d00ee3d7b6 [Android] Add an example for loadURLObject 2017-07-28 09:19:07 -05:00
Lyubo Marinov 3546cf4915 Fixes jsdocs, formatting 2017-07-26 15:54:57 -05:00
Lyubo Marinov a2c2d3bee1 [RN] Alternative to JitsiMeetView.loadURL w/o URL
Introduces loadURLObject in JitsiMeetView on Android and iOS which
accepts a Bundle and NSDictionary, respectively, similar in structure to
the JS object accepted by the constructor of Web's ExternalAPI. At this
time, only the property url of the bundle/dictionary is supported.
However, it allows the public API of loadURLObject to be consumed. The
property url will be made optional in the future and other properties
will be supported from which a URL will be constructed.
2017-07-26 15:53:35 -05:00
Saúl Ibarra Corretgé 51934dac1b [Android] Fix gradle version with Android Studio 3.0 Canary 8 2017-07-26 17:30:45 +02:00
Lyubo Marinov f0ab835b46 [RN] Add loadURLString to JitsiMeetView
Initializing a new URL/NSURL instance is a chore especially when one
takes into account that the JavaScript side (1) is loading the URL
asynchronously and (2) is capable of parsing strings that may or may not
be represented as URL/NSURL.

The Android method loadURLString(String) may have been called
loadURL(String) to overload loadURL(URL) but I didn't want to do that
because:

1. It would not be compatible with existing source code such as
loadURL(null) which would have become ambiguous.

2. I wanted to achieve better convergence with the iOS API.
2017-07-25 19:07:01 -05:00
Saúl Ibarra Corretgé 4efbbe14b1 [Android] Require OpenGL ES 2.0
This was already an implicit requirement, as it's the only version implemented
in libwebrtc.

The reason to add this is to (defensively) try to filter old devices which may
not implement it.

WebRTC's own Android demo app defines this.
2017-07-19 16:36:42 -05:00
Saúl Ibarra Corretgé 326ce4217f [Android] Fix gradle and plugin versions with Android Studio 3.0 Canary 6 2017-07-17 11:32:57 -05:00
Lyubo Marinov e54744e5ef [Android] Use target API 23 2017-07-16 02:26:09 -05:00
Saúl Ibarra Corretgé 96bfcafc97 [Android] Use target API 23
This reverts commit c9a29153dd.

Now that react-native-webrtc supports the permissions system in 23, use it since
it provides a more pleasant experience to users.

In addition, fix a bug in the previous code: the React Native view must be
loaded after we have acquired the permission to draw on top of other apps,
otherwise our app may crash while we accept the permission, since React may try
to draw.
2017-07-16 02:26:09 -05:00
Lyubo Marinov 9a295723cf Consistent formatting 2017-07-16 02:25:26 -05:00
Saúl Ibarra Corretgé 6fc1a3f45d [Android] Add comment on disabling JS packaging for dev builds 2017-07-10 17:42:39 +02:00
Lyubo Marinov 948d18f954 [Android] Fix "Minimum supported Gradle version is 4.1-milestone-1" 2017-07-06 15:20:09 -05:00
Saúl Ibarra Corretgé 01ac394e92 [Android] Fix compileSdkVersion
It must match the major number in buildToolsVersion.
2017-06-28 10:51:49 +02:00
Lyubo Marinov 8e4864004b Revert "Speed `react-native run-android` up (more)"
Reverts commit d117989b55 because it does
not bundle the fonts assets and the JS bundle.
2017-06-22 09:21:25 -05:00
Lyubo Marinov d117989b55 Speed `react-native run-android` up (more)
React Native's Gradle script does not bundle the JS bundle in the Debug
configuration. Copy that source code (and adapt it) into our sdk Gradle
script.
2017-06-20 13:14:30 -05:00
Lyubo Marinov 2fa7e777d6 Speed `react-native run-android` up 2017-06-20 10:32:44 -05:00
Saúl Ibarra Corretgé 617df1c69c [Android] Remove no longer used gradle options 2017-06-15 10:38:08 -05:00
Saúl Ibarra Corretgé c9a29153dd [RN] Lower Android target SDK version to 22
API level 22 is below 23 (aka Marshmallow), which included an overhaul in the
permissions system. React Native recommends 22 (it's the default when you create
a new app) and there have been reports when set higher [0] and [1].

This also fixes a critical bug, wherein Jitsi Meet wouldn't request permissions
for the camera and microphone.

Last, this change also allows us to get rid of the overlay checking code,
because it was only needed for API level 23 or higher.

[0]: https://github.com/facebook/react-native/pull/10479
[1]: https://github.com/facebook/react-native/issues/10587
2017-06-15 08:20:33 -05:00
Lyubo Marinov 4b2add7aa6 [Android] Allow multiple JitsiMeetViews 2017-06-10 03:34:11 -05:00
Lyubo Marinov 10e5e0fdf5 [iOS] Allow multiple JitsiMeetViews 2017-06-09 19:17:01 -05:00
Lyubo Marinov 5f64ccb97d [RN] Naming 2017-06-09 14:51:31 -05:00
Saúl Ibarra Corretgé 4687c1f465 [RN] Add ability to skip the welcome page
Also expose this in the native SDKs.
2017-06-09 14:10:10 -05:00
Lyubo Marinov a5cd118550 [Android] Naming 2017-06-09 10:55:14 -05:00
Saúl Ibarra Corretgé a266a71999 [RN] Add JitsiMeetViewAbstractListener to Android SDK 2017-06-09 09:57:06 -05:00
Saúl Ibarra Corretgé be8694f93e [RN] Remove duplicated font on Android
Copy it from the main fonts directory instead.
2017-06-09 16:05:27 +02:00
Lyubo Marinov 90466183d6 [RN] Consistency in Jitsi Meet SDK for Android 2017-06-09 00:03:23 -05:00
Saúl Ibarra Corretgé 84463d8cf0 [RN] Add workaround for loading different URLs on Android
Changing the props from native (Java) code was only added in 0.45, so add a
workaround until we get to updating our React Native dependency.
2017-06-09 00:03:23 -05:00