System Info
Access device timezone, locale, OS, and app version.
Consuming
Obtain the service in main() and pass it to implementations that need environment info:
import dev.krtirtho.plugin_interfaces.host_apis.SystemInformationAPI
import dev.krtirtho.plugin_interfaces.host_apis.SystemInformationAPI_SERVICE_NAME
fun main() {
val systemInfo = zipline.take<SystemInformationAPI>(SystemInformationAPI_SERVICE_NAME)
zipline.bind<CoreAPI>(CoreAPI_SERVICE_NAME, RealCoreAPI(systemInfo))
}
Interface
interface SystemInformationAPI : ZiplineService {
fun getTimeZone(): String // IANA timezone, e.g. "America/New_York"
fun getLocale(): String // ISO 639-1, e.g. "en"
fun getOperatingSystem(): String
fun getAppVersion(): String // Spotube version
}
All methods are synchronous. Use getTimeZone() for timezone-aware date handling, getLocale() to localize content, and getAppVersion() for conditional behavior or analytics.