mirror of
https://gitee.com/hotlcc/wechat4j.git
synced 2025-12-26 11:59:53 +08:00
[update] 新增视频消息发送
This commit is contained in:
@@ -3,6 +3,7 @@ import com.hotlcc.wechat4j.Wechat;
|
||||
import com.hotlcc.wechat4j.handler.ReceivedMsgHandler;
|
||||
import com.hotlcc.wechat4j.model.ReceivedMsg;
|
||||
import com.hotlcc.wechat4j.model.UserInfo;
|
||||
import com.hotlcc.wechat4j.util.CommonUtil;
|
||||
import com.hotlcc.wechat4j.util.StringUtil;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -34,9 +35,13 @@ public class TestClass {
|
||||
|
||||
@Test
|
||||
public void testSendImage() {
|
||||
File file = new File("D:\\Downloads\\images\\6600e90b8b0ce2037a5291a7147ffd2b.jpeg");
|
||||
|
||||
JSONObject result = wechat.sendImage(null, file);
|
||||
File file = null;
|
||||
JSONObject result = null;
|
||||
file = new File("C:\\Users\\Administrator\\Pictures\\壁纸\\9e5f4981099bcf351e0ec18c3654aced.jpg");
|
||||
result = wechat.sendImage(null, file);
|
||||
file = new File("C:\\Users\\Administrator\\Videos\\手机QQ视频_20190416170016.mp4");
|
||||
result = wechat.sendVideo(null, file);
|
||||
System.out.println(result);
|
||||
while (true) CommonUtil.threadSleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user