我是靠谱客的博主 虚心柠檬,最近开发中收集的这篇文章主要介绍工作总结知识点,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

微信扫码登陆原理:

1.打开https://wx.qq.com/的时候,会生成一个唯一的uuid(每次刷新界面都会变)。
并且网页端和服务器保持长链接
2.任意的用户(不同的username)扫描这个二维码,就把这个uuid和自己的账户信息(扫描的端肯定是登陆的)发送给服务器
3.服务器把这个uuid对应的用户信息发给我网页端,实现登陆流程。
4.以后就可以进行交互了。

统计功能流程图

这里写图片描述

根据模式名获取页码


getPageCode("T7.lay");
/**
* 根据模式名获取页码
*
* @param modeName
* @return
*/
private static int getPageCode(String modeName) {
if (TextUtils.isEmpty(modeName)) {
return 0;
}
String mode = modeName.replace(".lay", "");
int pageCode = mode.charAt(0) * 10000;
if (mode.length() > 1) {
int delta = Integer.valueOf(mode.substring(1));
delta = (0 == delta) ? -1 : delta;
pageCode += delta;
}
OwnLog.i(modeName + ":" + pageCode);
return pageCode;
}

java引用导致的bug

这里写图片描述

今天开发对讲功能,因为init调用了多次导致失败。但是对方一眼就看出是调用了多次init的原因。特此记录。

adb shell dumpsys activity services grep -nir “ImService”查看,调用多次的日志为:

C:UsersAdministrator>adb shell dumpsys activity services grep -nir "ImService"
ACTIVITY MANAGER SERVICES (dumpsys activity services)
User 0 active services:
* ServiceRecord{aa360af u0 cld.navi.mainframe/net.easyconn.talkie.sdk.ImServic
e}
intent={cmp=cld.navi.mainframe/net.easyconn.talkie.sdk.ImService}
packageName=cld.navi.mainframe
processName=cld.navi.mainframe:imService
baseDir=/data/app/cld.navi.mainframe-2/base.apk
dataDir=/data/user/0/cld.navi.mainframe
app=ProcessRecord{5c86889 11774:cld.navi.mainframe:imService/u0a181}
createTime=-4m39s651ms startingBgTimeout=--
lastActivity=-4m31s835ms restartTime=-4m39s512ms createdFromFg=true
Bindings:
* IntentBindRecord{e5dca5e CREATE}:
intent={cmp=cld.navi.mainframe/net.easyconn.talkie.sdk.ImService}
binder=android.os.BinderProxy@f8ca30c
requested=true received=true hasBound=true doRebind=false
* Client AppBindRecord{4382e6a ProcessRecord{34c0abb 11950:cld.navi.mainfr
ame:pushservice/u0a181}}
Per-process Connections:
ConnectionRecord{6eb6d68 u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@4f0488b}
* Client AppBindRecord{de6e3f8 ProcessRecord{55facbc 11788:com.cld.logtrac
e/u0a181}}
Per-process Connections:
ConnectionRecord{3469487 u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@9372cc6}
* Client AppBindRecord{fa2c736 ProcessRecord{5c86889 11774:cld.navi.mainfr
ame:imService/u0a181}}
Per-process Connections:
ConnectionRecord{528f320 u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@eedf223}
* Client AppBindRecord{ac57637 ProcessRecord{85e7694 11394:cld.navi.mainfr
ame/u0a181}}
Per-process Connections:
ConnectionRecord{57fa790 u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@db5f253}
* Client AppBindRecord{4c4a90d ProcessRecord{f90aaf8 12429:cld.navi.mainfr
ame:remote/u0a181}}
Per-process Connections:
ConnectionRecord{f2d060e u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@1e7e409}
All Connections:
ConnectionRecord{f2d060e u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@1e7e409}
ConnectionRecord{6eb6d68 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@4f0488b}
ConnectionRecord{3469487 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@9372cc6}
ConnectionRecord{57fa790 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@db5f253}
ConnectionRecord{528f320 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@eedf223}
Connection bindings to services:
* ConnectionRecord{f2d060e u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@1e7e409}
binding=AppBindRecord{4c4a90d cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:cld.navi.mainframe:remote}
conn=android.os.BinderProxy@1e7e409 flags=0x1
* ConnectionRecord{6eb6d68 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@4f0488b}
binding=AppBindRecord{4382e6a cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:cld.navi.mainframe:pushservice}
conn=android.os.BinderProxy@4f0488b flags=0x1
* ConnectionRecord{3469487 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@9372cc6}
binding=AppBindRecord{de6e3f8 cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:com.cld.logtrace}
conn=android.os.BinderProxy@9372cc6 flags=0x1
* ConnectionRecord{57fa790 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@db5f253}
binding=AppBindRecord{ac57637 cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:cld.navi.mainframe}
conn=android.os.BinderProxy@db5f253 flags=0x1
* ConnectionRecord{528f320 u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@eedf223}
binding=AppBindRecord{fa2c736 cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:cld.navi.mainframe:imService}
conn=android.os.BinderProxy@eedf223 flags=0x1

正常的日志为:

C:UsersAdministrator>adb shell dumpsys activity services grep -nir "ImService"
ACTIVITY MANAGER SERVICES (dumpsys activity services)
User 0 active services:
* ServiceRecord{d0ec2ea u0 cld.navi.mainframe/net.easyconn.talkie.sdk.ImServic
e}
intent={cmp=cld.navi.mainframe/net.easyconn.talkie.sdk.ImService}
packageName=cld.navi.mainframe
processName=cld.navi.mainframe:imService
baseDir=/data/app/cld.navi.mainframe-1/base.apk
dataDir=/data/user/0/cld.navi.mainframe
app=ProcessRecord{7df038c 31438:cld.navi.mainframe:imService/u0a181}
createTime=-10m45s412ms startingBgTimeout=--
lastActivity=-10m45s337ms restartTime=-10m45s337ms createdFromFg=true
Bindings:
* IntentBindRecord{f242cb1 CREATE}:
intent={cmp=cld.navi.mainframe/net.easyconn.talkie.sdk.ImService}
binder=android.os.BinderProxy@9eb2596
requested=true received=true hasBound=true doRebind=false
* Client AppBindRecord{696e517 ProcessRecord{e37b851 30335:cld.navi.mainfr
ame/u0a181}}
Per-process Connections:
ConnectionRecord{7e190bf u0 CR cld.navi.mainframe/net.easyconn.talkie.
sdk.ImService:@45c16de}
All Connections:
ConnectionRecord{7e190bf u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.
ImService:@45c16de}
Connection bindings to services:
* ConnectionRecord{7e190bf u0 CR cld.navi.mainframe/net.easyconn.talkie.sdk.Im
Service:@45c16de}
binding=AppBindRecord{696e517 cld.navi.mainframe/net.easyconn.talkie.sdk.ImS
ervice:cld.navi.mainframe}
conn=android.os.BinderProxy@45c16de flags=0x1

最后

以上就是虚心柠檬为你收集整理的工作总结知识点的全部内容,希望文章能够帮你解决工作总结知识点所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(106)

评论列表共有 0 条评论

立即
投稿
返回
顶部