All Projects → wxpusher → wxpusher-sdk-java

wxpusher / wxpusher-sdk-java

Licence: Apache-2.0 License
微信消息实时推送服务[WxPusher]的Java版本sdk,可以通过API实时给个人微信推送消息。wechat pusher.

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to wxpusher-sdk-java

mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (-77.61%)
Mutual labels:  push
git-cheatsheet
One stop guide to help solve all your doubts related to Git & GitHub.
Stars: ✭ 31 (-84.58%)
Mutual labels:  push
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (-87.56%)
Mutual labels:  push
PushAll
PushAll让推送集成更简洁、快速
Stars: ✭ 28 (-86.07%)
Mutual labels:  push
bootpush
📶即时消息推送服务(即时通讯),基于Netty- Instant Messaging push service based on Netty
Stars: ✭ 146 (-27.36%)
Mutual labels:  push
push-jobs-cookbook
Development repository for Chef Cookbook push-jobs
Stars: ✭ 21 (-89.55%)
Mutual labels:  push
text-sdk-php
PHP SDK to send messages with CM.com
Stars: ✭ 18 (-91.04%)
Mutual labels:  push
openmessaging.github.io
OpenMessaging homepage
Stars: ✭ 12 (-94.03%)
Mutual labels:  push
nginx-websocket-module
make nginx as websocket server
Stars: ✭ 22 (-89.05%)
Mutual labels:  push
PushMeBaby
iOS Push Notification Debug App. You can use this app during iOS Push Notification (development or production) to push notifications on your device from your Mac.
Stars: ✭ 47 (-76.62%)
Mutual labels:  push
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (-58.71%)
Mutual labels:  push
StackFlowView
Enforce stack behaviour for custom UI flow.
Stars: ✭ 35 (-82.59%)
Mutual labels:  push
hms-react-native-plugin
This repo contains all of React-Native HMS plugins.
Stars: ✭ 167 (-16.92%)
Mutual labels:  push
action-mercure
🚀 GitHub Action for Mercure.
Stars: ✭ 14 (-93.03%)
Mutual labels:  push
push
基于springboot & netty & kafka 实现的消息推送服务
Stars: ✭ 32 (-84.08%)
Mutual labels:  push
getui-pushapi-java-demo
个推官方提供的推送服务端API Demo(Java语言)
Stars: ✭ 32 (-84.08%)
Mutual labels:  push
pushdeer
开放源码的无App推送服务,iOS14+扫码即用。亦支持快应用/iOS和Mac客户端、Android客户端、自制设备
Stars: ✭ 2,911 (+1348.26%)
Mutual labels:  push
OneSignal-WordPress-Plugin
OneSignal is a free push notification service for web and mobile apps. This plugin makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
Stars: ✭ 71 (-64.68%)
Mutual labels:  push
android-easy-gcm
Use this library to add GCM to your project, only in a few minutes !
Stars: ✭ 50 (-75.12%)
Mutual labels:  push
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (-82.59%)
Mutual labels:  push

WxPusher

微信消息实时推送服务[WxPusher],可以通过API实时给个人微信推送消息.http://wxpusher.zjiecode.com/admin

功能介绍说明

请直接访问官方说明文档http://wxpusher.zjiecode.com/docs

目录说明

其他语言SDK

如果不存在你需要语言的sdk,请你按照参考文档直接使用http调用,另外,欢迎你贡献更多语言的SDK。

Java版本SDK

version

目录模块说明

  • demo

    官网演示demo源码,开发的时候,可以做参考,demo演示网站地址: http://wxpusher.zjiecode.com/demo

  • sdk

    Java版本SDK源码,开发的时候可以直接使用。

添加依赖

gradle中使用

你需要添加Jcenter库,在“build.grade”中配置:

dependencies {
    ......
    compile 'com.zjiecode:wxpusher-java-sdk:2.1.4'//使用上面的版本号
    ......
}

在maven中使用

pom.xml文件中添加:

<dependency>
  <groupId>com.zjiecode</groupId>
  <artifactId>wxpusher-java-sdk</artifactId>
  <version>2.1.4</version>
  <type>pom</type>
</dependency>

功能说明

发送消息

最后可以在你需要的地方,直接调用方法,即可实时推送消息到微信上了,比如下面这样:

Message message = new Message();
message.setAppToken("AT_xxxxx");
message.setContentType(Message.CONTENT_TYPE_TEXT);
message.setContent("不加限制的自由是很可怕的,因为很容易让任何人滑向深渊。");
message.setUid("UID_xxxxxx");
message.setUrl("http://wxpuser.zjiecode.com");//可选参数
Result<List<MessageResult>> result = WxPusher.send(message);

创建带参数的二维码

创建一个带参数的二维码,用户扫码的时候,回调里面会携带二维码的参数.

CreateQrcodeReq createQrcodeReq = new CreateQrcodeReq();
createQrcodeReq.setAppToken("xxxx"); //必填,应用的appTOken
createQrcodeReq.setExtra("parameter");//必填,携带的参数
createQrcodeReq.setValidTime(3600);//可选,二维码有效时间,默认1800 s,最大30天,单位是s
Result<CreateQrcodeResp> tempQrcode = WxPusher.createAppTempQrcode(createQrcodeReq);
if (tempQrcode.isSuccess()) {
    //创建成功
}

查询消息发送状态

发送消息是异步的,你可以通过这个api查询消息发送状态

Result result = WxPusher.queryMessageStatus(messageId);

查询关注APP的微信用户列表

//分页查询全部用户
Result<Page<WxUser>> wxUsers = WxPusher.queryWxUser("AT_xxxxx", 1, 50);
wxUsers.getData().getRecords().forEach(d-> System.out.println(d.getUid()));
//根据查询指定UID用户
Result<Page<WxUser>> users = WxPusher.queryWxUser("AT_xxxx", "UID_xxxx");
System.out.println(JSONObject.toJSONString(users));

使用就是这么简单,有需要就来试试吧。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].