Releases: sbokatuk/OpenTok.Net.Android
Release list
2.34.1.4
OpenTok.Net.Android 2.34.1.4
A packaging fix for OpenTok.Net.Transformers.Android, which 2.34.1.3 could build but could not
publish. The native SDK is unchanged at opentok-android-sdk 2.34.1, OpenTok.Net.Android and
OpenTok.Net.webrtc.Dependency.Android are unchanged in content, and no public API moved.
OpenTok.Net.Transformers.Android was too large for nuget.org
2.34.1.3 never reached the feed. The push failed with
Pushing OpenTok.Net.Transformers.Android.2.34.1.3.nupkg to 'https://www.nuget.org/api/v2/package/'...
PUT https://www.nuget.org/api/v2/package/
RequestEntityTooLarge https://www.nuget.org/api/v2/package/
error: Response status code does not indicate success: 413 (The package file exceeds the size limit).
The package was 304 MB against nuget.org's 250 MB limit. It is now 167 MB, from three changes,
none of which removes anything a consumer receives.
A duplicate .aar is no longer shipped. client-sdk-video-transformers' POM declares
com.vonage:mltransformersaudionoisesuppression-ps16k, and it was packed on that basis. Opened and
compared, it holds an empty classes.jar and a single libmltransformersaudionoisesuppression.so
whose SHA-256 matches the copy already in the main .aar — no assets, no resources, no Java. So it
was 22.6 MB of duplicate per target framework and nothing else. It is now listed as an
AndroidIgnoredJavaDependency, which keeps Java dependency verification satisfied without packing
it. mltransformers-ps16k is still shipped whole: unlike the audio one, it carries the MediaPipe
classes and selfie_segmentation_gpu.binarypb, which nothing else has.
No project-level .aar. The .NET 10 Android SDK builds one for a library project and folds the
native payload of every Bind="false" dependency into it. For a package that is nothing but
payload, that is a complete second copy of the jni/ tree — 42 MB, the largest single entry in the
package. AndroidGenerateLibraryAar=false turns it off. The .NET 9 band never did this, which is
why the net10 half of the package was half again the size of the net8 half.
Two target frameworks instead of three. net8.0-android34.0 and net10.0-android36.0;
net9.0-android35.0 is no longer built. Nothing needs it: NuGet resolves the best compatible
asset folder, so a net9 app takes the net8 copy and receives the entire payload.
What this means if you consume it
Nothing to change. A net8, net9 or net10 app adds the package the same way and gets the same three
.so files and three .tflite models in its APK.
The one visible difference is in a dotnet restore on a net9 head, which now resolves
lib/net8.0-android34.0/ rather than a folder named for its own target framework. That is ordinary
NuGet fallback, not a downgrade — the package has no managed API at all (see
src/OpenTok.Transformers.md), so there is nothing target-framework-specific in it.
Verification
transformers-packaging in CI is now a two-leg matrix rather than a single build, covering both
resolution paths the change creates:
- net9.0-android35.0 — resolves the net8 folder by fallback. Proves an app targeting a framework
the package does not name still gets everything. - net10.0-android36.0 — resolves its own folder, built by the band that wanted to emit the
duplicate project.aar. Proves suppressing it did not take the payload with it.
Each leg does a Release build of the device tests against the packed package and inspects the APK
for libopentok_transformers.so, libmltransformers.so and
libmltransformersaudionoisesuppression.so under lib/arm64-v8a/, plus selfie_segmentation.tflite,
ns_model_1.tflite and ns_model_2.tflite. Both legs pass, as does a third local run at
net8.0-android34.0.
TransformersPackageTests asserts the shape directly: the two target frameworks and no others, the
mltransformers-ps16k .aar present, and the audio .aar absent. A change that restored any of
the removed weight would otherwise only be caught by a release push.
Full changelog: v2.34.1.2...v2.34.1.4
Packages
Bound against com.opentok.android:opentok-android-sdk 2.34.1 and com.vonage:webrtc 121.1.101 (Maven Central). Each package publishes at its own version line; a row whose version did not move since the previous train was skipped by the push, not republished.
| Package | NuGet |
|---|---|
OpenTok.Net.Android |
2.34.1.4 |
OpenTok.Net.webrtc.Dependency.Android |
121.1.101.1 |
2.34.1.2
OpenTok.Net.Android 2.34.1.2
An ergonomics release. The native SDK is unchanged — still opentok-android-sdk 2.34.1 with
com.vonage:webrtc 121.1.101 — and OpenTok.Net.webrtc.Dependency.Android is unchanged at
121.1.101.1.
This release is source-breaking in one way, described first.
Breaking: listener event args have named properties
opentok-android-sdk's classes.jar is compiled without javac -parameters, so it carries no
parameter names at all and class-parse fell back to positional placeholders. Every generated
EventArgs therefore exposed P0, P1, P2:
session.StreamReceived += (s, e) => Subscribe(e.P1); // which one was the stream?The parameters are now named, and so are the properties:
session.StreamReceived += (s, e) => Subscribe(e.Stream);The renames cover the listeners an app actually implements — Session's session, connection,
signal, archive, reconnection, mute and stream-properties listeners, PublisherKit's publisher,
video, audio-level and mute listeners, SubscriberKit's subscriber, stream, video, audio-level and
captions listeners, and Publisher.CameraListener. The stats and transformer listeners are
deliberately left alone: their single parameter is a stats object whose type already says what it
is.
Two names to watch when updating: Session.SignalEventArgs is Session/Type/Data/Connection
in that order, and Session.ArchiveStartedEventArgs uses ArchiveName rather than Name (Name
on an event-args type reads as the event's own name).
Code using the listener interfaces rather than the events is unaffected.
Added: Publisher.Builder and Subscriber.Builder return their own types
Java's covariant Publisher build() override, and every fluent setter on Publisher.Builder, are
dropped by class-parse along with their synthetic bridge methods — so the only members a consumer
could reach were the inherited PublisherKit.Builder ones. That made this necessary:
var publisher = new Publisher.Builder(context).Build().JavaCast<Publisher>();and made the obvious alternative a trap, because a plain (Publisher) cast throws — the managed
peer was constructed as a PublisherKit, and only JavaCast asks JNI for a new peer of the right
type.
Additions/Builders.cs restores the covariant returns, on Build() and on every setter, so a chain
stays on Publisher.Builder throughout:
var publisher = new Publisher.Builder(context).Name("me").Build(); // PublisherSubscriber.Builder gets the same treatment. Existing JavaCast<Publisher>() calls keep working.
Changed: derived dependency versions are watched
com.google.flogger 0.6 and com.google.guava 31.1-android were written inline in
AndroidIgnoredJavaDependency items. They are derived pins — their only correct value is whatever
opentok-android-sdk's POM declares — and a stale one does not fail the build, it silently stops
matching, so the next SDK bump reports an XA4241 naming a version that appears nowhere in the
repository. They are now FloggerVersion and GuavaVersion in Directory.Build.props, watched by
the upstream-drift workflow the same way WebrtcVersion already was.
Changed: BG8A04 is suppressed
Every parameter rename raises "Metadata.xml element ... matched no nodes" — ~240 warnings a build —
while demonstrably working on all three target frameworks: the generator applies the transform and
then reports the path as unmatched against the document it has already rewritten. Leaving it on
would bury a genuine unmatched path among the spurious ones. The renames are asserted directly
against the packed assembly by BindingApiTests.Listener_event_args_carry_named_properties
instead, and the collision fixes in the same file fail the build outright if they stop matching.
Sample: the Android sample now connects a session
samples/OpenTok.Sample.Android was preview-only — it created a Publisher and showed the camera,
and never constructed a Session at all. It now mirrors the iOS sample: API key / session id /
token entry, Connect / Disconnect / Publish, subscribe to the first remote stream, local and remote
video, and a status log.
Packages
Bound against com.opentok.android:opentok-android-sdk 2.34.1 and com.vonage:webrtc 121.1.101 (Maven Central). Each package publishes at its own version line; a row whose version did not move since the previous train was skipped by the push, not republished.
| Package | NuGet |
|---|---|
OpenTok.Net.Android |
2.34.1.2 |
OpenTok.Net.webrtc.Dependency.Android |
121.1.101.1 |