package com.laihua.vivopushtestlib;

import com.vivo.push.sdk.notofication.Message;
import com.vivo.push.sdk.notofication.Result;
import com.vivo.push.sdk.server.Sender;

public class MyClass {
    public static void main(String[] args) {
        try {
            Sender sender = new Sender("ccb2170d-3ded-499b-9779-f1a904edd98d");
            Result result = sender.getToken(105483822 ,   "cca2ba3da947c84ca7544e78237fca1c");
            sender.setAuthToken(result. getAuthToken());
            Message singleMessage = new Message.Builder()
//                    .regId("16214127740408382238160")
                    .regId("16226277681096597195561")
                    .notifyType(3)
                    .title("push title test1111")
                    .content("push content test 22222")
                    .timeToLive(1000)
                    .skipType(2)
                    .skipContent("https://www.baidu.com")
                    .networkType(-1)
                    .requestId("16214127740408382238160")
                    .pushMode(1)
                    .build();
            Result resultMessage = sender.sendSingle(singleMessage);
            System.out.println(resultMessage);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}