package com.example.core

import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.provider.Settings

fun getDeviceName(): String {
    val manufacturer = Build.MANUFACTURER
    val model = Build.MODEL

    return if (model.startsWith(manufacturer, ignoreCase = true)) {
        model
    } else {
        "$manufacturer $model"
    }
}

@SuppressLint("HardwareIds")
fun getAndroidId(context: Context): String {
    return Settings
        .Secure
        .getString(context.contentResolver, Settings.Secure.ANDROID_ID)
}