package com.yn.bftl.thirdparty.modules.umeng.abstracts.android;

/**
 * 安卓单播
 *
 * @author huabiao
 * @create 2023/12/5  16:22
 **/
public class AbstractAndroidUnicast extends AbstractAndroidNotificationAbstract {

    /**
     * 安卓单播-初始化
     *
     * @param appKey          应用key
     * @param appMasterSecret 应用密钥
     * @return AndroidUnicast
     * @author huabiao
     * @create 2023/12/6  10:33
     */
    public AbstractAndroidUnicast(String appKey, String appMasterSecret) throws Exception {
        // 设置单聊
        this.setPredefinedKeyValue("type", "unicast");
        // 配置应用相关参数
        setAppMasterSecret(appMasterSecret);
        setPredefinedKeyValue("appkey", appKey);
    }

    /**
     * 安卓单播-设置设备令牌
     *
     * @param token 设备令牌
     * @author huabiao
     * @create 2023/12/6  10:31
     */
    public void setDeviceToken(String token) throws Exception {
        setPredefinedKeyValue("device_tokens", token);
    }
}