package com.adealink.weparty.foregroundservice

import android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
import com.adealink.weparty.foregroundservice.base.BaseForegroundService
import com.adealink.weparty.foregroundservice.base.ServiceLauncher

abstract class AbsAudioForegroundService(
    launcher: ServiceLauncher<*>
) : BaseForegroundService(launcher) {

    override fun provideForegroundServiceType() = FOREGROUND_SERVICE_TYPE_MICROPHONE

    //override fun provideChannelId() = "rtc_uikit_audio_foreground_service"

//    companion object {
//        internal val launcher =
//            ServiceLauncher(AudioForegroundService::class.java, "AudioForegroundService")
//
//        @JvmStatic
//        fun start(context: Context, title: String?, description: String?, icon: Int) {
//            launcher.start(context, title, description, icon) {
//                ContextCompat.checkSelfPermission(context, Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED
//            }
//        }
//
//        @JvmStatic
//        fun stop(context: Context) = launcher.stop(context)
//    }
}