浏览代码

【提交内容】:ipu删除无用代码,且同步display中的基础插件功能

wangyj18 9 年之前
父节点
当前提交
4b00d91ab2

+ 49 - 2
ipu-client/AndroidManifest.xml

@ -36,6 +36,9 @@
36 36
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
37 37
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
38 38
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
39
    
40
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
41
    <uses-permission android:name="android.permission.WAKE_LOCK" />
39 42
40 43
    <application
41 44
        android:allowBackup="false"
@ -57,6 +60,10 @@
57 60
                <category android:name="android.intent.category.LAUNCHER" />
58 61
            </intent-filter>
59 62
        </activity>
63
        
64
        <!-- 注册推送服务 -->
65
        <service android:name="com.ai.mobile.im.PushService" android:process=":WmPush" />
66
        
60 67
        <!-- 对话框 -->
61 68
        <activity
62 69
            android:name="com.wade.mobile.ui.activity.CustomDialogActivity"
@ -83,24 +90,64 @@
83 90
        </activity>
84 91
        <!-- 音乐播放服务 -->
85 92
        <service android:name="com.wade.mobile.common.audio.play.AudioPlayerService" />
86
        <!-- 录制声音 -->
93
        <!-- 录制声音
87 94
        <activity
88 95
            android:name="com.wade.mobile.common.audio.activity.AudioRecorderActivity"
89 96
            android:theme="@style/AudioDialogTheme" >
97
        </activity> -->
98
         <activity
99
            android:name="com.wade.mobile.common.simplemedia.activity.SARecorder"
100
            android:theme="@style/AudioDialogTheme" >
90 101
        </activity>
91 102
		<!-- 播放音乐 -->
92 103
        <activity
93 104
            android:name="com.wade.mobile.common.audio.activity.AudioPlayerActivity"
94 105
            android:theme="@style/AudioDialogTheme" >
95 106
        </activity>
107
        <activity
108
            android:name="com.wade.mobile.common.simplemedia.activity.SARecorder"
109
            android:theme="@style/AudioDialogTheme" >
110
        </activity>
96 111
        <!-- 标记地图 -->
97 112
        <activity android:name="com.wade.mobile.common.map.activity.MarkMapActivity">
98 113
        </activity>
99
        <activity android:name="com.ipu.client.test.TestActivity" ></activity>
114
        <!-- 通讯录UI -->
115
        <activity android:name="com.wade.mobile.common.contacts.activity.ContactsActivity">
116
        </activity>
100 117
        <!-- 设定位置 -->
101 118
        <activity
102 119
            android:name="com.wade.mobile.common.map.activity.SelectLocationActivity"
103 120
            android:screenOrientation="portrait" >
104 121
        </activity>
122
        
123
        <!-- 键盘 -->
124
        <activity android:name="com.wade.mobile.common.keyboard.KeyboardActivity"
125
            android:theme="@android:style/Theme.Translucent">
126
        </activity>
127
        <!-- 手势锁 -->
128
        <activity android:name="com.wade.mobile.common.screenlock.ScreenUnlockActivity" 
129
            android:theme="@android:style/Theme.NoTitleBar">
130
        </activity> 
131
        <activity android:name="com.wade.mobile.common.screenlock.SetScreenLockActivity" 
132
            android:theme="@android:style/Theme.NoTitleBar">
133
        </activity>
134
        
135
         <!-- YunBa Start -->
136
137
        <meta-data
138
            android:name="YUNBA_APPKEY"
139
            android:value="5630418ff085fc471efdf2c9" />
140
141
        <service android:name="io.yunba.android.core.YunBaService" >
142
        </service>
143
144
        <receiver android:name="io.yunba.android.core.YunBaReceiver" >
145
            <intent-filter>
146
                <action android:name="android.intent.action.USER_PRESENT" />
147
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
148
            </intent-filter>
149
        </receiver>
150
        
151
        <!-- YunBa End -->
105 152
    </application>
106 153
</manifest>

+ 10 - 0
ipu-client/assets/mobile-action.xml

@ -115,5 +115,15 @@
115 115
	<action name="setCallbackForPushWithYunba" class="com.ai.ipu.mobile.push.YunBaPush" method="setCallbackForPush"></action>
116 116
	
117 117
	<action name="getContacts" class="com.wade.mobile.func.MobileContactDetail" method="getContacts"></action>
118
	
119
	<!-- keyboard -->
120
	<action name="openKeyboard" class="com.wade.mobile.func.MobileKeyboard" method="openKeyboard"></action>
121
	
122
	<action name="setScreeLock" class="com.wade.mobile.func.MobileScreenLock" method="setScreeLock"></action>
123
	<action name="screeUnlock" class="com.wade.mobile.func.MobileScreenLock" method="screeUnlock"></action>
124
	
125
	<action name="openNative" class="com.ai.mobile.func.MobileOpenApp" method="openNative"></action>
126
	
118 127
	<action name="openBrowser" class="com.ipu.func.Util" method="openBrowser" ></action>
128

119 129
</actions>

+ 0 - 3
ipu-client/lint.xml

@ -1,3 +0,0 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<lint>
3
</lint>

+ 0 - 9
ipu-client/mac.bak.classpath

@ -1,9 +0,0 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry kind="src" path="gen"/>
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>

二进制
ipu-client/res/drawable-ldpi/map_mark.png


+ 1 - 3
ipu-client/res/menu/main.xml

@ -1,6 +1,4 @@
1
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2
    xmlns:tools="http://schemas.android.com/tools"
3
    tools:context="com.ai.wm_base_client.MainActivity" >
1
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
4 2

5 3
    <item
6 4
        android:id="@+id/action_settings"

+ 8 - 0
ipu-client/res/values-sw600dp/dimens.xml

@ -0,0 +1,8 @@
1
<resources>
2

3
    <!--
4
         Customize dimensions originally defined in res/values/dimens.xml (such as
5
         screen margins) for sw600dp devices (e.g. 7" tablets) here.
6
    -->
7

8
</resources>

+ 9 - 0
ipu-client/res/values-sw720dp-land/dimens.xml

@ -0,0 +1,9 @@
1
<resources>
2

3
    <!--
4
         Customize dimensions originally defined in res/values/dimens.xml (such as
5
         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
6
    -->
7
    <dimen name="activity_horizontal_margin">128dp</dimen>
8

9
</resources>

+ 0 - 62
ipu-client/src/MainActivity.java.local

@ -1,62 +0,0 @@
1

2

3
import android.os.Bundle;
4
import android.view.KeyEvent;
5

6
import com.wade.mobile.app.AppRecord;
7
import com.wade.mobile.app.MobileUtil;
8
import com.wade.mobile.frame.activity.TemplateMainActivity;
9
import com.wade.mobile.frame.activity.TemplateMobileActivity;
10
import com.wade.mobile.frame.config.ServerConfig;
11
import com.wade.mobile.frame.template.TemplateManager;
12
import com.wade.mobile.func.MobileUI;
13
import com.wade.mobile.ui.comp.dialog.ConfirmBlockDialog;
14
import com.wade.mobile.ui.view.FlipperLayout;
15
import com.wade.mobile.util.Messages;
16

17
public class MainActivity extends TemplateMobileActivity {
18
	@Override
19
	public void onCreate(Bundle savedInstanceState) {
20
		setTheme(R.style.Theme_Sherlock_Light);
21
		//设置本地的密钥
22
		TemplateManager.initResKey("abcdefgh");
23
		if (AppRecord.isFirst(this) && !MobileUtil.checkWifiActive(this)) {
24
			ConfirmBlockDialog dialog = new ConfirmBlockDialog(this, "下载提醒",
25
					"即将下载应用资源,连接wifi将为您节省流量,是否继续下载");
26
			dialog.show();
27
			if (dialog.getResult() == ConfirmBlockDialog.Result.OK) {
28
				super.onCreate(savedInstanceState);
29
			} else {
30
				android.os.Process.killProcess(android.os.Process.myPid());// 同一线程调用会导致异常
31
				System.exit(0); // 经典退出
32
			}
33
		} else {
34
			super.onCreate(savedInstanceState);
35
		}
36
	}
37
	
38
	@Override
39
	public boolean onKeyDown(int keyCode, KeyEvent event) {
40
		if (keyCode == KeyEvent.KEYCODE_BACK) {
41
			FlipperLayout flipperLayout= getFlipperLayout();
42
			if(flipperLayout!=null){
43
				//回到首页的时候就直接退出应用
44
				String indexPage = ServerConfig.getInstance().getValue("indexPage");
45
				String tagPage = flipperLayout.getCurrView().getTag().toString();
46
				if(flipperLayout.isCanBack()&&!indexPage.equals(tagPage)){
47
					flipperLayout.back();
48
					return true;
49
				}
50
			}
51
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
52
			return true;
53
		}
54
		return false;
55
	}
56
	
57
	@Override
58
	protected void initBasePath() {
59
		// TODO Auto-generated method stub
60
		TemplateManager.initBasePath("assets/");
61
	}
62
}

+ 0 - 23
ipu-client/src/com/ipu/client/MainActivity.java

@ -4,16 +4,12 @@ import java.net.ConnectException;
4 4
import java.net.SocketTimeoutException;
5 5

6 6
import android.os.Bundle;
7
import android.view.View;
8 7

9 8
import com.wade.mobile.app.AppRecord;
10 9
import com.wade.mobile.app.MobileOperation;
11 10
import com.wade.mobile.app.MobileUtil;
12 11
import com.wade.mobile.frame.activity.TemplateMainActivity;
13
import com.wade.mobile.frame.config.ServerConfig;
14 12
import com.wade.mobile.ui.comp.dialog.ConfirmBlockDialog;
15
import com.wade.mobile.ui.view.FlipperLayout;
16
import com.wade.mobile.util.Messages;
17 13

18 14
public class MainActivity extends TemplateMainActivity {
19 15
	@Override
@ -34,25 +30,6 @@ public class MainActivity extends TemplateMainActivity {
34 30
	}
35 31
	
36 32
	@Override
37
	public void onBackPressed() {
38
		try {
39
			FlipperLayout flipperLayout= getFlipperLayout();
40
			if(flipperLayout!=null){
41
				//回到首页的时候就直接退出应用
42
				String indexPage = ServerConfig.getInstance().getValue("indexPage");
43
				View currView = flipperLayout.getCurrView();
44
				if(flipperLayout.isCanBack()&& currView != null && (!indexPage.equals(currView.getTag().toString()))){
45
					flipperLayout.back();
46
					return;
47
				}
48
			}
49
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
50
		} catch (Exception e) {
51
			getWadeMobileClient().shutdownByConfirm(Messages.CONFIRM_CLOSE);
52
		}
53
	}
54

55
	@Override
56 33
	protected void error(Exception e) {
57 34
		if (e instanceof ConnectException || e  instanceof SocketTimeoutException) {
58 35
			MainActivity.this.runOnUiThread(new Runnable() {