Many mobile apps have support for offline scenarios. Event if analytics not can be sent to a server when the users are offline. we are still interested in that data. With TinyInsights 1.9.0 that is now fully supported.

By default TinyInsights will use MemoryTelemetryChannel from the Application Insights SDK. This means that events (exceptions, page views, custom events) are saved in memory. This will work if app goes offline for a shorter time period. But when users switching apps, it can be terminated by the operating system and events saved in memory will get lost if they not sent to Application Insights.

If you want to make sure that they not will get lost you will have to user the ServerTelemetryChannel, this is also from the Application Insights SDK. Even if the name says server, it will work on other types of applications as well.

To do it you should set the TelemetryChannel property of the ApplicationInsightsProvider as below:

var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseTinyInsights("{CONNECTION-STRING}", (provider) =>
{
    if (provider is ApplicationInsightsProvider appProvider)
    {
        appProvider.TelemetryChannel = new ServerTelemetryChannel();
    }
});