📋 Changelog

What's New dialog after app update

Overview

The Changelog module automatically detects when the app has been updated and shows a beautiful dialog with the list of changes. It supports custom styling and Remote Config integration.

Basic Usage

// In MainActivity.onCreate()
ADict.Changelog.showIfUpdated(this) {
    version("2.0.0") {
        title = "Major Update!"
        added("New dark theme")
        added("Cloud sync")
        improved("Performance by 50%")
        fixed("Startup crash on Android 14")
    }
    version("1.5.0") {
        added("Push notifications")
        added("Widget support")
        improved("Battery usage")
    }
    version("1.0.0") {
        title = "Initial Release"
        added("Core functionality")
    }
} { shown, fromVersion, toVersion ->
    if (shown) {
        analytics.log("changelog_shown", mapOf(
            "from" to fromVersion,
            "to" to toVersion
        ))
    }
}

Change Types

Type Emoji Description
added() New features
improved() Improvements to existing features
fixed() 🐛 Bug fixes
removed() 🗑️ Removed features
security() 🔒 Security updates
deprecated() ⚠️ Deprecated features

Configuration

All dialog strings are configurable. Create a custom Strings instance:

import rip.nerd.adictlibrary.modules.Changelog

// Custom strings for different languages
val germanStrings = Changelog.Strings(
    dialogTitle = "Was ist neu",
    dismissButton = "Verstanden"
)

ADict.Changelog.showIfUpdated(activity, strings = germanStrings, config = {
    version("2.0.0") {
        added("Dunkles Thema")
        fixed("Fehlerbehebung")
    }
})

// Or inline
ADict.Changelog.show(
    activity = activity,
    strings = Changelog.Strings(
        dialogTitle = "What's New in v2.0",
        dismissButton = "Got it!"
    ),
    config = {
        version("2.0.0") { added("Feature") }
    }
)

Available String Properties

Property Default Value Description
dialogTitle "What's New" Dialog title
dismissButton "OK" Dismiss button text

Force Show

// Show changelog even if already shown
ADict.Changelog.show(activity, config = {
    version("2.0.0") {
        title = "Check out our new features!"
        added("Feature A")
        added("Feature B")
    }
} {
    // On dismiss callback
    Log.d("Changelog", "Dialog dismissed")
}

Remote Config

// Load changelog from Remote Config
ADict.Changelog.showFromRemoteConfig(
    activity = activity,
    remoteKey = "changelog_json"
) { shown ->
    if (shown) analytics.log("changelog_shown")
}

// JSON format in Remote Config:
// [
//   {
//     "version": "2.0.0",
//     "title": "Major Update",
//     "date": "2026-02-18",
//     "changes": [
//       {"type": "ADDED", "desc": "New feature"},
//       {"type": "FIXED", "desc": "Bug fix"}
//     ]
//   }
// ]

Utilities

// Check if there's a new version without showing dialog
if (ADict.Changelog.hasNewVersion(context)) {
    showNewVersionBadge()
}

// Mark current version as seen (without showing dialog)
ADict.Changelog.markCurrentVersionAsSeen(context)

// Reset (for testing)
ADict.Changelog.reset()