Skip to content

Releases: kdroidFilter/Platform-Tools

0.2.1

14 Jan 15:51
0328ac9
Compare
Choose a tag to compare

Implement cross-platform install permission handling

Full Changelog: v0.2.0...v0.2.1

0.2.0

14 Jan 06:46
b1ee47e
Compare
Choose a tag to compare

Release v0.2.0 🎉

We are excited to announce the release of PlatformTools v0.2.0, featuring significant improvements, new functionalities, and the introduction of an entirely new module! Below is a summary of the latest additions and modifications.


🚀 What's New in v0.2.0

🌐 Core Module

New Feature: getPlatform

The Core module now includes the getPlatform function, which allows you to determine the specific platform or runtime environment where the application is running. This addition complements the existing getOperatingSystem function and provides even more flexibility for platform-specific logic.

fun getPlatform(): Platform

🔧 AppManager Module

Modification: WindowsConfig Renamed to WindowsInstallerConfig

The configuration class for managing Windows application installations has been renamed for better clarity and consistency. Update your references accordingly:

WindowsInstallerConfig.requireAdmin = false

New Features:

  • hasAppVersionChanged: Detect if the application version has changed since the last time it was opened. Useful for update-related actions.

    fun hasAppVersionChanged(): Boolean
  • isFirstInstallation: Check if it is the first installation of the app. Ideal for onboarding or initial setup.

    fun isFirstInstallation(): Boolean

📥 ReleaseFetcher Module

New Feature: ReleaseFetcherConfig

The ReleaseFetcher module now includes ReleaseFetcherConfig, a configurable object that allows you to fine-tune download buffer sizes and client timeouts for optimized performance:

ReleaseFetcherConfig.downloaderBufferSize = 4 * 1024 * 1024 // Set buffer size to 4 MB
ReleaseFetcherConfig.clientTimeOut = 60_000 // Set timeout to 60 seconds

🆕 Permission Handler Module

The Permission Handler module is a brand-new addition to the library, simplifying the process of checking and requesting permissions on Android.

Key Features:

  • Comprehensive Permission Support:

    • Install Permissions
    • Notifications
    • Location (Coarse, Fine, Background)
    • Bluetooth
    • Camera
    • Audio Recording
    • Overlay
    • Contacts (Read/Write)
    • External Storage (with Android 13+ specific media permissions)
  • Ease of Use: Minimal setup and clear APIs for checking and requesting permissions with simple callbacks for granted or denied states.

Example:

fun checkAndRequestInstallPermission() {
    if (hasInstallPermission()) {
        println("Install permission already granted.")
    } else {
        requestInstallPermission(
            onGranted = {
                println("Install permission granted.")
            },
            onDenied = {
                println("Install permission denied.")
            }
        )
    }
}

📦 Dependency Updates

To include these features in your project, update your dependencies in build.gradle.kts:

  • Core Module:
    implementation("io.github.kdroidfilter:platformtools.core:0.2.0")
  • AppManager Module:
    implementation("io.github.kdroidfilter:platformtools.appmanager:0.2.0")
  • ReleaseFetcher Module:
    implementation("io.github.kdroidfilter:platformtools.releasefetcher:0.2.0")
  • Permission Handler Module:
    implementation("io.github.kdroidfilter:platformtools.permissionhandler:0.2.0")

🛠️ Upgrading Notes

  1. Update any references from WindowsConfig to WindowsInstallerConfig.
  2. Leverage new utility functions such as hasAppVersionChanged, isFirstInstallation, and getPlatform for enhanced functionality.
  3. Explore the new Permission Handler module for Android-specific permission handling.
  4. Use ReleaseFetcherConfig to customize download configurations in the ReleaseFetcher module.

Thank you for using PlatformTools!

Full Changelog: v0.1.4...v0.2.0

0.1.4

10 Jan 04:43
2eb6f54
Compare
Choose a tag to compare

Release v0.1.4 🎉

This release introduces enhancements to platform detection, extending support to JavaScript (JS) and WebAssembly (WASM) environments, alongside minor improvements and optimizations.


🛠️ Key Features

  • getOperatingSystem:
    • Renamed from getPlatform for improved clarity.
    • Detects the operating system across JVM, JS, and WASM environments.

Example:

import io.github.kdroidfilter.platformtools.getOperatingSystem

val operatingSystem = getOperatingSystem()
println("Current operating system: $operatingSystem")

Full Changelog: v0.1.3...v0.1.4

0.1.3

10 Jan 02:41
a22f160
Compare
Choose a tag to compare

Release v0.1.3 🎉

This release introduces the restartApplication feature, enabling seamless application restarts, alongside several refinements and optimizations for enhanced usability.


🛠️ Key Features

  • restartApplication:
    • A new function to restart the current application programmatically.
    • Simplifies workflows that require application restarts after updates or configuration changes.

Example:

import io.github.kdroidfilter.platformtools.appmanager.getAppInstaller

val appInstaller = getAppInstaller()

// Restart the current application
appInstaller.restartApplication()

Full Changelog: v0.1.2...v0.1.3

0.1.2

09 Jan 06:46
d508b7f
Compare
Choose a tag to compare

Release v0.1.2 🎉

This update introduces WindowsConfig for enhanced installation configuration on Windows and includes minor improvements and fixes.


🛠️ Key Features

  • WindowsConfig:
    • New object to configure Windows installation settings.
    • requireAdmin (default: true) can be set to false for non-admin installations.

Example:

WindowsConfig.requireAdmin = false

🌐 Notes

WindowsConfig simplifies user-level installations and caters to non-admin users.

Full Changelog: v0.1.1...v0.1.2

0.1.1

09 Jan 06:03
59ffbdf
Compare
Choose a tag to compare

Release v0.1.1 🎉

What's New

  • Improved Documentation: Enhanced module documentation for better clarity.
  • Refactored Structure: Optimized the library's structure to remove unused targets.
  • Enhanced Update Checker: Added refinements for smoother release fetching and update checks.
  • Cache Directory Access: Retrieve platform-independent cache directories for JVM and Android.
  • Application Versioning: Added functionality to manage and fetch application versions on JVM and Android.
  • Release Fetcher: Improved support for fetching the latest release information from GitHub repositories, tailored to specific platforms.
  • Downloader: Enhanced functionality for downloading files with robust progress tracking and error handling.

Full Changelog: v0.1.0...v0.1.1

0.1.0

07 Jan 19:52
d1a8975
Compare
Choose a tag to compare

Release v0.1.0 🎉

The initial release of PlatformTools introduces essential utilities for Kotlin Multiplatform projects.

🚀 Features

  • Operating System Detection: Identify the current OS (Windows, Mac, Linux, Android, iOS, JS, WASM).
  • Cache Directory Access (JVM & Android only): Retrieve the cache directory path.
  • Application Versioning (JVM & Android only): Fetch the application version.

📦 Installation

Add the dependency to your project:

implementation("io.github.kdroidfilter:platformtools:0.1.0")

Full Changelog: https://github.com/kdroidFilter/Platform-Tools/commits/v0.1.0