Skottie.Mobile.Android 1.0.2

dotnet add package Skottie.Mobile.Android --version 1.0.2
                    
NuGet\Install-Package Skottie.Mobile.Android -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Skottie.Mobile.Android" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Skottie.Mobile.Android" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Skottie.Mobile.Android" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Skottie.Mobile.Android --version 1.0.2
                    
#r "nuget: Skottie.Mobile.Android, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Skottie.Mobile.Android@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Skottie.Mobile.Android&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Skottie.Mobile.Android&version=1.0.2
                    
Install as a Cake Tool

Skottie.Mobile

NuGet — Android NuGet — iOS NuGet — MAUI

Lottie JSON animation controls for .NET 10 Android, .NET 10 iOS, and .NET MAUI 10, rendered with SkiaSharp Skottie.

Skottie.Mobile replaces LottieXamarin, Lottie.DotNet8.Android, and Lottie.DotNet8.Ios, which are no longer supported. This is a replacement control with its own API, not a binary-compatible update to those bindings. See the migration notes below.

Why choose Skottie.Mobile over platform-specific Lottie bindings?

If your app just needs to display a Lottie animation, Skottie.Mobile is a much better fit: simpler to use and simpler to maintain. Add the control, load your animation, and play it. You get a small API for Android, iOS, and MAUI without having to integrate the broader APIs of separate platform Lottie bindings.

For common loading indicators, status animations, and decorative motion, this keeps both application code and ongoing support straightforward. The native controls and MAUI handler share the same Skottie rendering engine, and dependency updates are managed through SkiaSharp NuGet packages.

Advantage What it means for your application
Built for .NET 10 Dedicated Android, iOS, and MAUI projects provide a migration path from the unsupported Xamarin and .NET 8 bindings linked above.
One rendering engine Both platforms use Skia's Skottie renderer through SkiaSharp, reducing the number of renderer implementations you need to account for when testing animations.
MAUI integration included UseSkottie(), bindable Source and IsPlaying properties, and a handler that reuses the native controls let you integrate animations without writing your own platform handlers.
No separate Lottie binding projects to maintain This repository consumes SkiaSharp NuGet packages instead of maintaining bindings for separate Android and iOS Lottie libraries. SkiaSharp still supplies native binaries, so platform and dependency compatibility remain relevant.
Small playback API Start(), Stop(), and LoadFailed cover common playback and error-handling needs. MAUI provides one source property for packaged resources and local files.
Lifecycle handling included Native views suspend frame callbacks while detached and release animation resources when cleared or disposed. The MAUI handler clears its native control on disconnect.
Ready-to-run playgrounds Native Android, native iOS, and MAUI sample apps make it easy to check the same animation, loading paths, and playback behavior across platforms.

Need more functionality? Pull requests are welcome, including additions such as seeking, speed control, repeat counts, or completion callbacks. See CONTRIBUTING.md for how to propose a change, develop it, and test it across the supported platforms. If you need those features today, check the available APIs before migrating.

Skottie and the platform Lottie renderers can differ in feature support and output, so test your own animation files. Performance, memory use, and application size have not been benchmarked against the bindings; this project does not claim an advantage in those areas.

Projects

Project Target frameworks Control
src/Skottie.Mobile.Android net10.0-android Skottie.Mobile.Android.SkottieAnimationView
src/Skottie.Mobile.iOS net10.0-ios Skottie.Mobile.iOS.SkottieAnimationView
src/Skottie.Mobile.Maui net10.0-android;net10.0-ios Skottie.Mobile.Maui.SkottieAnimationView

The native controls inherit from SKCanvasView. Android uses Choreographer and iOS uses CADisplayLink for display-synchronized playback. The MAUI handler creates these same native controls, so native and MAUI applications share rendering code. Windows and Mac Catalyst are not currently targeted.

Requirements and building

  • .NET 10 SDK and the Android/iOS workloads; the MAUI workload for MAUI consumers.
  • Android API 21 or later; iOS 15 or later.
  • A compatible Android SDK/JDK to build Android applications.
  • A Mac with an Xcode version compatible with your installed .NET iOS workload to build and run iOS applications (or a paired Mac when using Visual Studio on Windows).

Dependencies are centrally managed in Directory.Packages.props: SkiaSharp 4.152.1 and Microsoft.Maui.Controls 10.0.110.

From the repository root, with the corresponding workloads installed (building iOS app bundles requires a Mac or a paired Mac):

dotnet restore Skottie.Mobile.slnx
dotnet build Skottie.Mobile.slnx

To build only the native Android library:

dotnet build src/Skottie.Mobile.Android/Skottie.Mobile.Android.csproj

To build only the Android target of the MAUI library on a machine without the iOS workload:

dotnet build src/Skottie.Mobile.Maui/Skottie.Mobile.Maui.csproj -p:TargetFrameworks=net10.0-android

Playground apps

The solution includes three runnable .NET 10 playgrounds. Each references its corresponding library project directly, so library edits are picked up when you rebuild.

Project Runs on What it exercises
playground/Skottie.Mobile.Playground.Android Android Native SkottieAnimationView, Android assets, and activity lifecycle
playground/Skottie.Mobile.Playground.iOS iOS Native SkottieAnimationView, bundle resources, and scene lifecycle
playground/Skottie.Mobile.Playground.Maui Android and iOS UseSkottie(), the native handler, compiled XAML bindings, and MAUI window lifecycle

All three package the same original, self-contained animation from playground/Shared/orbit.json as animations/orbit.json. It shows a teal dot orbiting a dark center every two seconds and needs no network connection or external images. Replace that file with your own Lottie JSON and rebuild to test another animation.

In Visual Studio or Rider, select a playground as the startup project, choose its target platform and a device/emulator/simulator, then run. On Windows, iOS app deployment requires a paired Mac. The native iOS app uses a scene delegate and does not require a storyboard.

Run from the command line

Start an Android emulator or connect a device with USB debugging enabled, then run one of these commands from the repository root:

dotnet build playground/Skottie.Mobile.Playground.Android/Skottie.Mobile.Playground.Android.csproj -t:Run
dotnet build playground/Skottie.Mobile.Playground.Maui/Skottie.Mobile.Playground.Maui.csproj -t:Run -f net10.0-android -p:TargetFrameworks=net10.0-android

For iOS, run on a Mac with the .NET 10 iOS/MAUI workloads and compatible Xcode. Find a simulator UDID with xcrun simctl list devices available, then replace SIMULATOR_UDID below with that value:

dotnet build playground/Skottie.Mobile.Playground.iOS/Skottie.Mobile.Playground.iOS.csproj -t:Run -p:RuntimeIdentifier=iossimulator-arm64 -p:_DeviceName=:v2:udid=SIMULATOR_UDID
dotnet build playground/Skottie.Mobile.Playground.Maui/Skottie.Mobile.Playground.Maui.csproj -t:Run -f net10.0-ios -p:TargetFrameworks=net10.0-ios -p:RuntimeIdentifier=iossimulator-arm64 -p:_DeviceName=:v2:udid=SIMULATOR_UDID

Use iossimulator-x64 on an Intel Mac. Running on a physical iPhone requires your Apple signing identity and provisioning profile; configure those in your IDE. Windows builds can check the iOS C# code but do not validate an iOS app bundle or device rendering without a Mac.

Manual checks

  1. Launch each app: the teal dot should orbit continuously on a transparent canvas.
  2. Pause, then Play: the dot should resume from its paused position.
  3. Reload asset (or Reload bundle on iOS): playback should restart.
  4. Load file: the app copies the bundled JSON to its cache and plays it through the absolute-file-path API.
  5. Missing asset: a visible Load failed message should appear without a crash. Reload the bundled animation to check recovery.
  6. Clear: the animation should disappear. Reload to play again.
  7. Background and reopen the app, both while playing and while paused. Playing animations should resume; paused animations should stay paused. Rotate the device to check layout (the native Android activity reloads on recreation).

.NET MAUI

1. Install the NuGet package

Install Skottie.Mobile.Maui from your .NET 10 MAUI app's project directory:

dotnet add package Skottie.Mobile.Maui

The appropriate native package is included automatically for the app's target platform. Your app should target net10.0-android and/or net10.0-ios. If your app also targets other platforms, condition the package reference and the control's usage to Android/iOS.

2. Register the handler

In MauiProgram.cs:

using Skottie.Mobile.Maui;

public static class MauiProgram
{
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder.UseMauiApp<App>()
               .UseSkottie();
        return builder.Build();
    }
}

UseSkottie() is the only registration needed for this control.

3. Add an animation

Place loading.json in your app's Resources/Raw directory with build action MauiAsset. The standard MAUI template includes the following item; add it only if it is missing:

<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

Use the asset's logical name as Source, without the Resources/Raw/ prefix. For example, Resources/Raw/animations/loading.json becomes animations/loading.json. Resource names are case-sensitive.

4. Use the control in XAML

<ContentPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:skottie="clr-namespace:Skottie.Mobile.Maui;assembly=Skottie.Mobile.Maui"
    x:Class="MyApp.MainPage">
    <skottie:SkottieAnimationView
        x:Name="LoadingAnimation"
        Source="loading.json"
        IsPlaying="True"
        WidthRequest="160"
        HeightRequest="160" />
</ContentPage>

Both Source and IsPlaying are bindable properties. For example, IsPlaying="{Binding IsBusy}" controls playback from a view model.

LoadingAnimation.Stop();  // Pause at the current position.
LoadingAnimation.Start(); // Resume from that position.
LoadingAnimation.Source = null; // Stop, release the animation, and clear the view.

To load an existing file instead of a packaged asset, set Source to its absolute path:

LoadingAnimation.Source = Path.Combine(FileSystem.AppDataDirectory, "downloaded.json");

The control does not download URLs. Download the JSON yourself before setting the file path. Loading is synchronous; change properties and call methods on the UI thread.

Subscribe before setting Source to observe initial loading errors:

var animation = new SkottieAnimationView { WidthRequest = 160, HeightRequest = 160 };
animation.LoadFailed += (_, exception) => System.Diagnostics.Debug.WriteLine(exception);
animation.Source = "loading.json";
MAUI member Behavior
Source Packaged asset name or absolute JSON file path. Changing it loads from the beginning. Null/empty clears the view.
IsPlaying Requested playback state; defaults to true. An animation must be loaded and the native view attached to play.
Start() / Stop() Set IsPlaying to true / false. Stop pauses rather than rewinding.
LoadFailed Reports file/resource loading and parsing errors on the UI thread.

Playback loops indefinitely. Detached native views suspend frame callbacks and resume on attachment when playback is still requested. The handler releases the loaded animation when disconnected. For navigation that keeps a page attached but hidden, pause in OnDisappearing and resume in OnAppearing as appropriate for your app.

Native .NET Android

Install Skottie.Mobile.Android from your net10.0-android app's project directory:

dotnet add package Skottie.Mobile.Android

Put loading.json in Assets with build action AndroidAsset.

using Skottie.Mobile.Android;

// In an Activity; keep a field reference for lifecycle management.
var animation = new SkottieAnimationView(this);
animation.LoadFailed += (_, exception) => System.Diagnostics.Debug.WriteLine(exception);
SetContentView(animation);
animation.InitFromAsset("loading.json"); // Loads and requests looping playback.

// Alternatively: animation.Init(absoluteJsonFilePath);
animation.Stop();  // Pause.
animation.Start(); // Resume.

For Android XML layouts, the registered view name is:

<skottie.mobile.SkottieAnimationView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/animation"
    android:layout_width="160dp"
    android:layout_height="160dp" />

Retrieve it using FindViewById<SkottieAnimationView>(Resource.Id.animation), then call InitFromAsset or Init. Pause in OnPause and resume in OnResume when appropriate. Call Clear() to release the animation without disposing the view. Dispose the view when its owner is permanently destroyed.

Native .NET iOS

Install Skottie.Mobile.iOS from your net10.0-ios app's project directory:

dotnet add package Skottie.Mobile.iOS

Add loading.json to the application bundle with build action BundleResource.

using CoreGraphics;
using Skottie.Mobile.iOS;

// In a UIViewController; keep a field reference for lifecycle management.
var animation = new SkottieAnimationView(new CGRect(0, 0, 160, 160));
animation.LoadFailed += (_, exception) => System.Diagnostics.Debug.WriteLine(exception);
View!.AddSubview(animation);
animation.InitFromBundle("loading.json");
animation.Start(); // iOS native loading does not automatically start playback.

// Alternatively:
// animation.Init(absoluteJsonFilePath);
// animation.InitFromNSData(jsonData);
// animation.Start();

Bundle names may include subdirectories, for example animations/loading.json. Stop() pauses and Start() resumes. Pause in ViewWillDisappear and resume in ViewWillAppear when appropriate. Clear() releases the animation and clears the view. Remove and dispose the view when its owner is permanently destroyed.

On both native controls, IsPlaying reports active playback. AnimPath retains the most recently requested path; assigning it alone does not load an animation. Use the loading methods instead. Call all native APIs on the UI thread.

Migrating from the older Lottie bindings

  1. Remove the Lottie.DotNet8.Android or Lottie.DotNet8.Ios reference and add the appropriate Skottie.Mobile NuGet package.
  2. Replace the old native view and namespace with SkottieAnimationView (including the registered class name in Android XML or iOS storyboard integrations).
  3. Load your JSON using the native methods above, or Source in MAUI, and replace playback calls with Start() and Stop().
  4. Check your animations on each target device. Skottie is a different renderer; feature support and rendering can differ from the original Lottie libraries.

The current API supports looping JSON animations and pause/resume. It does not expose repeat counts, speed, seeking, completion callbacks, .lottie archives, or external image/font resource providers. Prefer self-contained vector animations; animations requiring external assets need additional resource-provider integration.

Contributing

See CONTRIBUTING.md for development setup, testing, and pull-request guidelines. Please follow the Code of Conduct when participating.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Skottie.Mobile.Android:

Package Downloads
Skottie.Mobile.Maui

Lottie JSON animation controls for .NET 10 Android, iOS, and MAUI, powered by SkiaSharp Skottie.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 123 9/26/2026