package com.adealink.weparty.channel

import com.adealink.frame.googleservice.CHANNEL_DEFAULT
import com.adealink.frame.util.AppUtil
import com.adealink.weparty.App
import com.tencent.vasdolly.helper.ChannelReaderUtil

fun getChannel(): String {
    var channel = ChannelReaderUtil.getChannel(AppUtil.appContext)
    if (channel.isNullOrEmpty().not()) {
        return channel
    }

    channel = App.instance.googleService.getGPReferrerSource()
    if (channel.isEmpty().not()) {
        return channel
    }

    return CHANNEL_DEFAULT
}