浏览代码

Merge branch 'master' of
http://114.215.100.48:3000/ipu/android-share.git

Conflicts:
display-server/.gitignore

huangbo 9 年之前
父节点
当前提交
2599e0edd7

+ 9 - 9
display-client/.classpath

1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
	<classpathentry kind="src" path="gen"/>
4
	<classpathentry kind="src" path="src"/>
5
	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
8
	<classpathentry kind="output" path="bin/classes"/>
9
</classpath>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5
	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6
	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
7
	<classpathentry kind="src" path="gen"/>
8
	<classpathentry kind="output" path="bin/classes"/>
9
</classpath>

+ 1 - 1
display-client/assets/mobile-config.xml

1
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<configs>
2
<configs>
3
    <!-- 请求主机名或请求地址。包括服务器的ip地址和端口 -->
3
    <!-- 请求主机名或请求地址。包括服务器的ip地址和端口 -->
4
	<config name="request_host" value="http://10.173.148.168:8080"/>
4
	<config name="request_host" value="http://114.215.100.48:8080"/>
5
	<!-- 必须。10.0.2.2为Android模拟器的保留ip地址。访问到本机电脑时使用 -->
5
	<!-- 必须。10.0.2.2为Android模拟器的保留ip地址。访问到本机电脑时使用 -->
6
	<!-- <config name="request_host" value="http://10.0.2.2:8080"/> -->
6
	<!-- <config name="request_host" value="http://10.0.2.2:8080"/> -->
7
	<!-- 必须。容器应用名或请求根路径 -->
7
	<!-- 必须。容器应用名或请求根路径 -->

+ 4 - 2
display-server/.gitignore

1
/.settings
2
/display.war
3
/bin/
1
/bin/
2
/.settings
3
/display.war
4

5

+ 2 - 2
display-server/web/res/js/mobile/browser-toolkit.js

305
	 		post:function(action,params,callback,error,settings){
305
	 		post:function(action,params,callback,error,settings){
306
	 			browserTool.ajax.request("mobiledata",action,params,callback,error,Wade.extend({type:"POST",encoding:"UTF-8"},settings));
306
	 			browserTool.ajax.request("mobiledata",action,params,callback,error,Wade.extend({type:"POST",encoding:"UTF-8"},settings));
307
	 		},
307
	 		},
308
	 		html:function(action,params,callback,error,settings){
309
	 			browserTool.ajax.request("mobile",action,params,callback,error,Wade.extend({type:"POST",encoding:"UTF-8"},settings),true);
308
	 		html:function(action,params,callback,error,settings,isContext){
309
	 			browserTool.ajax.request("mobile",action,params,callback,error,Wade.extend({type:"POST",encoding:"UTF-8"},settings),isContext);
310
	 		}
310
	 		}
311
	    };
311
	    };
312
	})();
312
	})();

+ 1 - 1
display-server/web/res/js/mobile/mobile-browser.js

53
		};
53
		};
54
		/*将模板转换成html源码*/
54
		/*将模板转换成html源码*/
55
		this.getTemplate = function(action, param, callback, err) {
55
		this.getTemplate = function(action, param, callback, err) {
56
			browserTool.ajax.html(action, param, callback, err);
56
			browserTool.ajax.html(action, param, callback, err, null, true);
57
		};
57
		};
58
		/*将Page转换成html源码*/
58
		/*将Page转换成html源码*/
59
		this.getPage = function(action, param, callback, err) {
59
		this.getPage = function(action, param, callback, err) {

+ 21 - 0
general-web-server/web/html/myindex.html

42
		
42
		
43
		
43
		
44
		<br /><br />
44
		<br /><br />
45
		<button style="width:200px;height:100px;" id="setMemoryCache">设置缓存</button>
46
		<script type="text/javascript">
47
			var btn = document.getElementById("setMemoryCache");
48
			btn.onclick = function(){
49
				WadeMobile.setMemoryCache("Key001","我是缓存中的测试值-Value001");
50
			}
51
		</script>
52
		
53
		<br /><br />
54
		<button style="width:200px;height:100px;" id="getMemoryCache">获取缓存</button>
55
		<script type="text/javascript">
56
			var btn = document.getElementById("getMemoryCache");
57
			btn.onclick = function(){
58
				WadeMobile.getMemoryCache(function(value){
59
					alert(value);
60
				},"Key001","没有取到值我,我是默认值");
61
			}
62
		</script>
63
		
64
		
65
		<br /><br />
45
		<button style="width: 200px;height: 100px;" id="sendAjaxPost">发送Post请求</button>
66
		<button style="width: 200px;height: 100px;" id="sendAjaxPost">发送Post请求</button>
46
		<script type="text/javascript">
67
		<script type="text/javascript">
47
			var btn = document.getElementById("sendAjaxPost");
68
			var btn = document.getElementById("sendAjaxPost");

+ 1 - 1
general-web-server/web/res/js/wade-mobile.js

1
/**
1
/**
2
 * 与客户端交互的基础API
2
 * 与客户端交互的基础API
3
 */
3
 */
4
window.Mobile = window.WadeMobile = (function(Wade,Base64) {
4
window.Mobile = window.WadeMobile = (function() {
5
	//终端类型,a为android,i为ios
5
	//终端类型,a为android,i为ios
6
	var deviceType = (function(){
6
	var deviceType = (function(){
7
		var sUserAgent = navigator.userAgent.toLowerCase();
7
		var sUserAgent = navigator.userAgent.toLowerCase();

+ 19 - 20
ipu-count-test/assets/count-config.xml

1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<config>
3
    
4
        <delegate name="firstDele" class="com.ai.ipu.count.test.TestBeanImpl">
5
            <aspect class="com.ai.ipu.count.test.TestLogImpl"/>
6
            <method>sayHello</method>
7
        </delegate>
2
<config>    
3
    <count class="com.ai.ipu.count.test.TestLogImpl">
4
        <monitor class="com.ai.ipu.count.test.TestBeanImpl">
5
            
6
        </monitor>
8
        
7
        
9
        <delegate name="secondDele" class="com.ai.ipu.count.test.TestBeanImpl2">
10
            <aspect class="com.ai.ipu.count.test.TestLogImpl"/>
11
            <method>sayBey</method>
8
        <monitor class="com.ai.ipu.count.test.TestBeanImpl2">
12
            <method>sayHello</method>
9
            <method>sayHello</method>
13
        </delegate>
14
  
10
            <method>sayHey</method>
11
        </monitor>
12
    </count>
15
    
13
    
16
    <!-- <aspect class="com.ai.ipu.count.test.TestLogImpl">
17
        <delegate class="com.ai.ipu.count.test.TestBeanImpl">
18
            <method>sayHello</method>
19
        </delegate>
14
    <count class="com.ai.ipu.count.test.TestLogImpl222222">
15
        <monitor class="com.ai.ipu.count.test.TestBeanImpl222">
16
            <method>sayHello22222</method>
17
        </monitor>
20
        
18
        
21
        <delegate class="com.ai.ipu.count.test.TestBeanImpl2">
22
            <method>sayHello</method>
23
            <method>sayHey</method>
24
        </delegate>
25
    </aspect> -->
19
        <monitor class="com.ai.ipu.count.test.TestBeanImpl222222">
20
            <method>sayHello222222</method>
21
            <method>sayHey222222</method>
22
        </monitor>
23
    </count>
24
    
26
</config>
25
</config>

二进制
ipu-count-test/libs/ipu-count.jar


+ 2 - 6
ipu-count-test/src/com/ai/ipu/count/test/TestActivity.java

85
				new Thread(new Runnable() {
85
				new Thread(new Runnable() {
86
					@Override
86
					@Override
87
					public void run() {
87
					public void run() {
88
						try {
89
							IpuUDPHelper.send("Hello UDP");
90
						} catch (IOException e) {
91
							e.printStackTrace();
92
						}
88
						IpuUDPHelper.sendReport(getApplicationContext(), "Hello UDP");
93
					}
89
					}
94
				}).start();
90
				}).start();
95
			}
91
			}
103
			@Override
99
			@Override
104
			public void onClick(View v) {
100
			public void onClick(View v) {
105
				try {
101
				try {
106
					IpuUDPUtil.FileUtil.getInstance(getApplicationContext()).clear(IpuConstant.LOG_FILE_NAME);
102
					IpuUDPUtil.FileUtil.getInstance().clear(IpuConstant.LOG_FILE_NAME);
107
				} catch (IOException e) {
103
				} catch (IOException e) {
108
					e.printStackTrace();
104
					e.printStackTrace();
109
				}
105
				}

+ 1 - 2
ipu-count-test/src/com/ai/ipu/count/test/TestApplication.java

2

2

3
import android.app.Application;
3
import android.app.Application;
4

4

5
import com.ai.ipu.count.IpuCrashHandler;
6
import com.ai.ipu.count.IpuReport;
5
import com.ai.ipu.count.IpuReport;
7

6

8
public class TestApplication extends Application {
7
public class TestApplication extends Application {
11
		super.onCreate();
10
		super.onCreate();
12
		//移到IpuReport的initiate方法中
11
		//移到IpuReport的initiate方法中
13
//		IpuCrashHandler.getInstance().init(getApplicationContext());
12
//		IpuCrashHandler.getInstance().init(getApplicationContext());
14
		IpuReport.initiate(getApplicationContext());
13
		IpuReport.initiate(getApplicationContext(),"127.0.0.1",6001);
15
	}
14
	}
16
}
15
}