Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
liyungui committed Oct 27, 2019
1 parent 8dbe6c7 commit 2dc04fd
Show file tree
Hide file tree
Showing 132 changed files with 7,840 additions and 683 deletions.
41 changes: 41 additions & 0 deletions source/_posts/Android/APP弱网络测试工具.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: APP弱网络测试工具
date: 2019-08-29 15:40:53
categories:
- Android
tags:
- Android
---

弱网络专项测试的方案主要有


# PC上使用抓包工具设置延时模拟弱网

- 在PC上的Fiddler在设置延时
- 将Android设备的网络代理到PC上

# 专有服务器上构建弱网络Wi-Fi

- 在专有服务器上构建弱网络Wi-Fi
- 移动设备连接该Wi-Fi进行弱网络测试

相关的技术方案有Facebook的ATC和腾讯的Wetest-WiFi;

# 缺陷

- 需要额外的PC或者服务器,弱网环境构建成本高;
- 需要安装、部署额外的工具,并且弱网络环境需要在PC上或者Web上进行配置,使用成本高;
- 弱网络环境功能并不完善,比如Fiddler不支持丢包、抖动等弱网环境;

# QNET

- 无需ROOT手机,只需安装一个独立app
- 弱网模拟功能强大。2G,3G,4G,丢包,抖动
- 支持 TCP/UDP网络协议抓包,导出为Pcap文件

# 参考&扩展

- [QNET,一款给力的APP弱网络测试工具](https://www.520mwx.com/view/53152)


49 changes: 49 additions & 0 deletions source/_posts/Android/Activity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Activity
date: 2019-10-16 14:13:53
categories:
- Android
tags:
- Android
---

# 全屏

设置在setContentView()方法之前

```java
//无title
requestWindowFeature(Window.FEATURE_NO_TITLE);
//全屏
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_FULLSCREEN);
```

# 背景透明

- Activity使用自定义透明背景style
- Activity布局根view使用默认(不要设置)

```xml
android:theme="@style/activity_Transparent"
```

```xml
<style name="activity_Transparent" >
<item name="android:windowBackground">@color/translucent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowCloseOnTouchOutside">false</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
</style>
```

```xml
<color name="translucent">#00000000</color>
```





This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@startuml
'skinparam monochrome true
skinparam classBackgroundColor White
skinparam classArrowColor Black
skinparam classBorderColor Black
skinparam stereotypeCBackgroundColor Gray
'hide members
hide circle



@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@startuml
class Route{
String type
Map<String, Object> params
}

enum RouteType {
NATIVE("native")
RN_PAGE("rn_page")
WEB("web")
}

class RouteHandler{
+ boolean handle(Route route)
}
note right: 策略模式

class NativePageRouteHandler{
+ String pageName
}

class RNPageRouteHandler{

}

class WebPageRouteHandler{

}

class RouteController{
- List<RouteHandler> handler
- void registRouteHandler()
+ void parseRoute(Route route)
}

RouteHandler <|-- NativePageRouteHandler
RouteHandler <|-- RNPageRouteHandler
RouteHandler <|-- WebPageRouteHandler

RouteHandler *-- Route

RouteController *-- RouteHandler
RouteController <-- Route
RouteController <-- RouteType

@enduml
Loading

0 comments on commit 2dc04fd

Please sign in to comment.