487qq / android-push Goto Github PK
View Code? Open in Web Editor NEW修改了Androidpn的一些bug,修改了离线消息的一些bug(基于网上的离线消息版本)
修改了Androidpn的一些bug,修改了离线消息的一些bug(基于网上的离线消息版本)
1.注册不了账号。
解决方法:修改客户端中的XmppManager.java文件中isRegistered方法
private boolean isRegistered() {
String url="http://"+xmppHost+":8080"+"/user.do?action=getUser";
Map<String,String> para=new HashMap<>();
para.put("userName",username.toLowerCase());
String result=NetUtil.doPost(url,para);
Log.d(LOGTAG, "isRegistered============"+result);
return !result.equals("failed");
}
RegisterTask方法中同样修改为小写,这样就统一为小写了
registration.addAttribute("username", newUsername.toLowerCase());
registration.addAttribute("password", newPassword);
应该是作者大意了,一个是url地址不对,一个是username没有转换小写。
2.客户端断开网络重连,有时候会再也连接不上。
3.sql server 中无法创建离线信息表
修改服务器端中的org.androidpn.server.model中的NotificationMO
@Column(name = "status",columnDefinition="varchar(10) comment '0: 未发送 1:已发送 2:已接收 3:已查看'")
columnDefinition在数据库移植中会出现问题。更改为普通的length = 10
4.绑定闹钟发送心跳包仍然会断开连接
解决方法:
不使用
Constants.xmppManager.getConnection().startKeepAliveThread(Constants.xmppManager);
发送消息给服务端
同时在闹钟心跳中判断service是否运行,如果没有运行就启动Service
5.被其他应用kill或者手机本身kill
解决方法:
设置最高优先级。防止被系统本身kill。被其它应用kill暂时无更好办法。
6.log配置文件错误
adnroidpn修改为androidpn.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.