Skip to content

[Proposal] Add AnySource for Automatic Ringtone Source Detection #7

Description

@AmjdAlhashede

Summary

Introduce a new AnySource data class that automatically detects and returns the appropriate RingtoneSource subtype based on the input provided.


Use Case

This feature allows developers to pass various input types (e.g., File, Uri, ByteArray, InputStream, URL string) without explicitly specifying the ringtone source type, simplifying API usage and reducing boilerplate code.


Proposed Implementation

Add a new data class:

data class AnySource(val input: Any) : RingtoneSource()

Implement a detection mechanism to automatically determine the appropriate source type based on the input value.


Benefit

Enhances developer experience by providing a flexible and intelligent way to handle multiple ringtone source formats transparently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions