Skip to content

Commit 12b0bcc

Browse files
committed
init
1 parent ca37a7b commit 12b0bcc

File tree

4 files changed

+62
-63
lines changed

4 files changed

+62
-63
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*.class
2+
bin
3+
gen
4+
out
25

36
# Package Files #
47
*.jar

README.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,59 @@
1-
BeeFramework_Android
2-
====================
1+
#BeeFramework 0.1
2+
3+
##BeeFramework是什么
4+
BeeFramework android版主要为android开发人员提供一个android app的MVC开发解决方案,包括数据存储,网络拉取,app内调试等,以新浪微薄的两个api为demo,展示app协议调试时的协议请求历史查看,crash log列表,app系统性能,2G\3G网络模拟等功能
5+
6+
7+
###app内调试
8+
####协议拉取历史查看
9+
通过扩展Androidquery类,添加调试模式下记录协议的发送和拉取,协议的发送继承BeeQuery后,即可以在小虫子中查看协议的拉取历史
10+
![Mou icon](http://wal8.com/51506684)
11+
12+
###Activity周期
13+
查看App内的Activity生存周期
14+
15+
###3G网络模拟
16+
提供类似android模拟器的3G网络模拟功能,并且可以自由设定maxBandwidthPerSecond来限定app协议层的网络传输速率,达到在wifi环境下模拟3G网络的目的,便于测试和发现问题
17+
18+
![Mou icon](http://wal8.com/51560960)
19+
20+
21+
###Crash log
22+
通过截取线程的exception,记录在文本文件中,并通过小虫子及时查看本app的crashlog。
23+
24+
![Mou icon](http://wal8.com/51561235)
25+
26+
##Quick Start
27+
###开启调试模式
28+
继承BeeFrameworkApp,在MainActivity按返回键时,调用
29+
30+
BeeFrameworkApp.getInstance().showBug(this);
31+
32+
###网络请求部分
33+
34+
BeeCallback<JSONObject> cb = new BeeCallback<JSONObject>()
35+
{
36+
public void callback(String url, JSONObject jo, AjaxStatus status)
37+
{
38+
//TODO
39+
}
40+
};
41+
HashMap<String,String> params = new HashMap<String, String>();
42+
cb.url(url).type(JSONObject.class).method(Constants.METHOD_GET);
43+
com.BeeFramework.model.BeeQuery aq = new BeeQuery(context);
44+
aq.ajax(cb);
45+
###开启Crash log
46+
47+
String path = Environment.getExternalStorageDirectory().getAbsolutePath() + AppConst.LOG_DIR_PATH;
48+
File storePath = new File(path);
49+
storePath.mkdirs();
50+
Thread.setDefaultUncaughtExceptionHandler(new CustomExceptionHandler(
51+
path, null));
52+
53+
###限定网络请求速率
54+
55+
BeeQuery.setForceThrottleBandwidth(true);
56+
BeeQuery.setMaxBandwidthPerSecond(1000);//限定1000Bytes/s
57+
58+
359

4-
极简化的Android App开发框架和App内调试工具

REAME.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

res/layout/webview.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:layout_width="match_parent"
99
android:layout_height="48dp"
1010
android:orientation="vertical"
11-
android:background="#ff0000" > git
11+
android:background="#ff0000" >
1212
<ImageView
1313
android:id="@+id/webview_back"
1414
android:layout_width="40dp"

0 commit comments

Comments
 (0)