Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!--
Package version is <native SDK version>.<binding revision>, e.g. 2.35.0.1 — the same scheme
Package version is <native SDK version>.<binding revision>, e.g. 2.35.1.1 — the same scheme
the sibling Net.Agora.Android repository uses for its own packages.

OpenTok.Net.Android binds com.opentok.android:opentok-android-sdk. That artifact's own POM
Expand All @@ -15,7 +15,7 @@
The fourth component belongs to this repository and increments whenever the binding or
packaging changes while the native artifact stays put.
-->
<OpenTokVersion>2.35.0</OpenTokVersion>
<OpenTokVersion>2.35.1</OpenTokVersion>
<OpenTokBindingRevision>1</OpenTokBindingRevision>
<WebrtcVersion>145.0.113</WebrtcVersion>
<WebrtcBindingRevision>1</WebrtcBindingRevision>
Expand All @@ -37,7 +37,7 @@
<!--
The media transformers, which ship as their own artifact line rather than inside the SDK —
see src/OpenTok.Transformers.md. com.vonage:client-sdk-video-transformers rides OpenTok's own
version (2.35.0 today), so it needs no pin of its own; the two ML libraries it declares do,
version (2.35.1 today), so it needs no pin of its own; the two ML libraries it declares do,
and they are derived the same way WebrtcVersion is: their only correct value is whatever that
artifact's POM asks for, and the upstream-drift workflow watches them.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NuGet](https://img.shields.io/nuget/v/OpenTok.Net.Android?label=nuget)](https://www.nuget.org/packages/OpenTok.Net.Android)
[![Targets: net8.0 | net9.0 | net10.0](https://img.shields.io/badge/targets-net8.0%20%7C%20net9.0%20%7C%20net10.0-512BD4)](#packages)
[![opentok-android-sdk 2.35.0](https://img.shields.io/badge/opentok--android--sdk-2.35.0-099DFD)](https://central.sonatype.com/artifact/com.opentok.android/opentok-android-sdk)
[![opentok-android-sdk 2.35.1](https://img.shields.io/badge/opentok--android--sdk-2.35.1-099DFD)](https://central.sonatype.com/artifact/com.opentok.android/opentok-android-sdk)
[![Licence: MIT](https://img.shields.io/badge/licence-MIT-green.svg)](LICENSE)

.NET for Android and .NET MAUI bindings for the Vonage OpenTok (Video API) Android SDK.
Expand Down Expand Up @@ -185,7 +185,7 @@ Run the emulator suite locally, with an emulator already booted:

```sh
./build/BuildNugets.sh
OPENTOK_DEVICE_RID=android-arm64 ./.github/scripts/run-emulator-tests.sh 2.35.0.1 net9.0-android35.0
OPENTOK_DEVICE_RID=android-arm64 ./.github/scripts/run-emulator-tests.sh 2.35.1.1 net9.0-android35.0
```

## CI
Expand Down
2 changes: 1 addition & 1 deletion build/upstream.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# carrying a higher com.vonage:webrtc is not an upgrade path - adopting it would desync the
# AndroidIgnoredJavaDependency in OpenTok.Net.Android.csproj from what the SDK actually pulls. So
# these rows ask "does the pin match the bound SDK?" rather than "is there a newer one?", which is
# silent today (2.35.0 declares 145.0.113, 0.6 and 31.1-android, which is what is pinned) and speaks
# silent today (2.35.1 declares 145.0.113, 0.6 and 31.1-android, which is what is pinned) and speaks
# up exactly when an OpenTok bump moves one of them and the pin is left behind.
#
# The flogger/guava rows exist because their failure mode is quiet. An ignored-dependency entry
Expand Down
13 changes: 13 additions & 0 deletions src/OpenTok.Net.Android/Transforms/Metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@
<attr path="/api/package[@name='com.opentok.android']/interface[@name='SubscriberKit.SubscriberListener']/method[@name='onDisconnected' and count(parameter)=1 and parameter[1][@type='com.opentok.android.SubscriberKit']]" name="managedName">SubscriberDisconnected</attr>
<attr path="/api/package[@name='com.opentok.android']/interface[@name='SubscriberKit.SubscriberListener']/method[@name='onDisconnected' and count(parameter)=1 and parameter[1][@type='com.opentok.android.SubscriberKit']]" name="argsType">SubscriberListenerDisconnectedEventArgs</attr>

<!--
SubscriberKit.error(SubscriberKit, int, String) became public in opentok-android-sdk 2.35.0 —
it is the SDK's own error-dispatch plumbing, and 2.34.1 kept it package-private. class-parse
binds it as a method named Error, and the generator then renames the Error *event* (from
SubscriberListener.onError) to ErrorEvent rather than emit two members with one name. That
happens without a warning, and the package still builds, so the only symptom is a consumer's
`subscriber.Error += ...` failing with CS1656 — which is how it was found. Renamed rather than
removed, in keeping with the rest of this file, and named for what it is: the method stays
reachable for anyone who was somehow calling it, and the event gets its name back.
BindingApiTests.Error_events_survive_the_sdks_own_error_methods pins this.
-->
<attr path="/api/package[@name='com.opentok.android']/class[@name='SubscriberKit']/method[@name='error' and count(parameter)=3 and parameter[1][@type='com.opentok.android.SubscriberKit']]" name="managedName">ErrorInternal</attr>

<!--
============================================================================================
Listener parameter names.
Expand Down
21 changes: 21 additions & 0 deletions tests/OpenTok.Net.Android.PackageTests/BindingApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@ public void SubscriberKit_disconnected_events_do_not_collide(string tfm)
Assert.Contains("add_SubscriberDisconnected", methods);
}

[Theory]
[MemberData(nameof(Packages.Frameworks), MemberType = typeof(Packages))]
public void Error_events_survive_the_sdks_own_error_methods(string tfm)
{
using var api = OpenBinding(Packages.OpenTok, tfm);

// opentok-android-sdk 2.35.0 made SubscriberKit.error(SubscriberKit, int, String) public.
// Bound as-is it is a method named Error, and the generator then silently renames the Error
// event (from SubscriberListener.onError) to ErrorEvent rather than declare two members
// with one name — no warning, and the package builds. Transforms/Metadata.xml renames the
// method away; this checks all three kits still raise Error, so a future SDK doing the same
// to Session or PublisherKit is caught here rather than by a consumer's `x.Error +=` failing.
foreach (var kit in new[] { "Session", "PublisherKit", "SubscriberKit" })
{
var methods = api.MethodsOf($"Com.Opentok.Android.{kit}");

Assert.Contains("add_Error", methods);
Assert.Contains("remove_Error", methods);
}
}

[Theory]
[MemberData(nameof(Packages.Frameworks), MemberType = typeof(Packages))]
public void Listener_event_args_carry_named_properties(string tfm)
Expand Down
Loading