23 Commits

Author SHA1 Message Date
pabloFuente
ef6f8abb69 openvidu-android: fix lacking 'sdkVersion' RPC parameter 2022-05-24 14:35:23 +02:00
Juan Navarro
4bcd06c235 android: Only publish/receive video if setting SDP doesn't fail
A bad SDP will be rejected by the WebRTC implementation, so no further
publish/subscribe operations should be done on failure.

This expands on the idea of
https://github.com/OpenVidu/openvidu-tutorials/pull/174
and also simplifies implementations of CustomSdpObserver: there is no
need to inherit its methods just for logging, as CustomSdpObserver
already logs everything on its default implementation.
2022-05-18 13:24:07 +02:00
Juan Navarro
81b7c492d1 android: CustomSdpObserver: Drop custom method "log"; use Log.e for failures
Having a custom "log()" method didn't bring many advantages, and
actually lacked needed flexibility. We'd like to log success messages
to "debug", but failure messages to the "error" level.
2022-05-18 13:24:07 +02:00
Juan Navarro
fcb783c3ad android: Get TURN settings from server and use them in client 2022-05-18 13:16:28 +02:00
Tapani Rantakokko
9c8f45cd77
Fixed an attempt to publish video after failure to set the local description. (#174)
When preparing to publish a video stream from an Android client app to OpenVidu session, it is possible that creating video offer succeeds but then setting it as the local description fails.

An example: Android client is configured to use a hardware video encoder, but a particular device does not have one. As a result, SDP description is created without some necessary video elements, and setting it as the local description fails at runtime.

The original code did not check the result of setting a local description before it went on to attempt publishing video. This resulted to breaking the whole OpenVidu session with rather severe consequences:
- various errors in server and client logs
- every participant's video streams stuck
- the session cannot be properly closed (it becomes a ghost session)

This simple fix checks if setting the local description succeeds, and only then attempts to publish video stream.

While this demo application does not configure HW encoder in use, other developers will use it as a basis for their apps. In addition, there can be other reasons why setting local description may fail. Hence, it should be checked.
2022-05-18 13:15:56 +02:00
Juan Navarro
aac2f5e80c android: add stored remote ICE candidates after SDP Offer/Answer finishes
ICE candidates are emitted asynchronously, so by the time that SDP messages
have been exchanged, some remote candidates might have already arrived and
stored in temporary variables.

These candidates must be added to the PeerConnection, to make sure that none
is left out!

Corresponds to equivalent code in OpenVidu-Browser:
https://github.com/OpenVidu/openvidu/blob/v2.20.0/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts#L140-L148
2021-11-05 15:47:36 +01:00
Juan Navarro
0f64ad7a62 android: do NOT mix addTrack() and addTransceiver() APIs
The PeerConnection API went through a transition from Track-based to
Transceiver-based API. Nowadays, it's a very common mistake to mix them
inconsistently, especially caused by Google- or StackOverflow-based
development, because examples online tend to be old and BAD.

Corresponds to equivalent code in OpenVidu-Browser:
https://github.com/OpenVidu/openvidu/blob/v2.20.0/openvidu-browser/src/OpenViduInternal/WebRtcPeer/WebRtcPeer.ts#L187-L248
2021-11-05 15:47:24 +01:00
csantosm
a3ee7df193 openvidu-adnroid: Fixed unexpected exception 2021-06-08 13:47:37 +02:00
pabloFuente
cce68e7b14 openvidu-android compatible with both subscription directions 2021-06-03 12:01:24 +02:00
pabloFuente
ee7994c149 openvidu-android: updated to support openvidu-server refactoring 2021-03-29 11:16:25 +02:00
pabloFuente
a24ecac4e4 Merge branch 'develop' 2020-11-12 23:40:18 +01:00
csantosm
e5166450d0 Updated tutorials with new OpenVidu API
WIP: Test the tutorials which use Java or Node client
2020-11-10 17:08:18 +01:00
csantosm
f91a69706d openvidu-android: Removed unnecesary code lines in LocalParticipant 2020-11-09 17:44:13 +01:00
csantosm
8bb8321490 openvidu-android: Fixed crash leaving session 2020-08-10 13:31:00 +02:00
ruben
f3113e9e63 Some fixes 2020-05-13 16:11:28 +02:00
pabloFuente
936aa92178 openvidu-android: not crash if clientData is not a JsonObject with specific property 2020-04-24 19:30:38 +02:00
pabloFuente
c34b85cd67 openvidu-android: getToken() refactoring 2019-09-18 16:56:24 +02:00
pabloFuente
b467f17607 openvidu-android: project rename 2019-09-18 15:37:20 +02:00
pabloFuente
7e685c38fb openvidu-android: minor refactoring 2019-09-16 14:28:40 +02:00
CSantos
1439f20bce openvidu-android: Added icons 2019-09-16 10:46:52 +02:00
CSantos
a299689607 Renamed app to Openvidu Android 2019-09-16 10:45:37 +02:00
pabloFuente
230ebf7d03 Show toast on connection error 2019-09-13 15:46:50 +02:00
pabloFuente
4b9deba5f0 openvidu-android 2019-09-13 14:39:19 +02:00