diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 9828d06..d10330c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -11,7 +11,7 @@ android {
minSdkVersion 8
targetSdkVersion 15
versionCode 1
- versionName "1.0"
+ versionName "V1.077"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -31,8 +31,16 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
+ //加载动态库
+ sourceSets{
+ main{
+ jniLibs.srcDir(['libs'])
+ }
+ }
}
dependencies {
+ //加载jar包
compile fileTree(dir: 'libs', include: ['*.jar'])
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e76315e..3051141 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,7 +1,6 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ package="com.activity.chaoran">
@@ -15,8 +14,8 @@
-
-
+
@@ -35,10 +34,12 @@
-
-
-
-
+
+
+
+
@@ -49,8 +50,6 @@
-
-
-
@@ -75,37 +73,36 @@
-
-
-
diff --git a/app/src/main/java/com/example/chaoran/DjActivity.java b/app/src/main/java/com/activity/chaoran/DjActivity.java
similarity index 70%
rename from app/src/main/java/com/example/chaoran/DjActivity.java
rename to app/src/main/java/com/activity/chaoran/DjActivity.java
index 0ffda0a..fb34f1e 100644
--- a/app/src/main/java/com/example/chaoran/DjActivity.java
+++ b/app/src/main/java/com/activity/chaoran/DjActivity.java
@@ -1,5 +1,6 @@
-package com.example.chaoran;
+package com.activity.chaoran;
+import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Instrumentation;
import android.app.ProgressDialog;
@@ -136,24 +137,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
ttsNr = null;
}
}
- };// 声音提示停止接口
- // /* 单据内容查询 */
- // public Runnable downloadRun = new Runnable() {
- // public void run() {
- // Object ob;
- // try {
- // ob = getWeather(formlx);
- // Message message = new Message();
- // message.obj = ob;
- // handler.sendMessage(message);
- // } catch (Exception e) {
- // Message message = new Message();
- // message.obj = e.toString();
- // message.what = -1;
- // handler.sendMessage(message);
- // }
- // }
- // };
+ };
/* 菜单栏查询 */
Runnable menuRun = new Runnable() {
public void run() {
@@ -180,7 +164,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
// 当有消息发送出来的时候就执行Handler的这个方法
public void handleMessage(Message msg) {
super.handleMessage(msg);
- System.out.println("=========sd=================================" + msg.what);
if (msg.what == -1) {
if (pd != null) {
pd.cancel();
@@ -244,12 +227,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
pd.cancel();
DialogUtil.builder(DjActivity.this, "错误信息", "检索方案内容解析失败!", 0);
}
- // String sql = msg.obj.toString();
- // String return_one = sql.substring(0, 1);
- // sql = sql.substring(1, sql.length());
- // Map map = SqlUtil.regSql(sql, hzTab, pageMap);
- // pd.setMessage("正在执行检索方案");
- // runSearch(map, return_one);
} else if (msg.arg1 == 1) {
String sql = null;
try {
@@ -260,15 +237,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
return;
}
Map map = SqlUtil.regSql(sql, hzTab, pageMap);
- // if (mxData.size() > 0) {
- // map.put("mxSql", mxSql);
- // map.put("mxData",
- // DjUtil.organizationMxData(mxData,
- // pageMap.get("GZID")));
- // } else {
- // map.put("mxSql", "");
- // map.put("mxData", null);
- // }
map.put("gzid", pageMap.get("GZID"));
map.put("mxTempTable", mxTempTable);
Map hzData = DjUtil.organizationHzData(hzTab, pageMap.get("GZID"));
@@ -315,32 +283,19 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
super.handleMessage(msg);
View rootview = DjActivity.this.getWindow().getDecorView();
View aaa = rootview.findFocus();
- // View bbb =
- // hzTab.findViewWithTag(defaultFocus2.toUpperCase().trim());
- // if (aaa == bbb && defaultFocus2 != null) {
- // DjUtil.setFocus(hzTab, defaultFocus2);
- // }
if (aaa instanceof SelfEditText) {
m_view = aaa;
SelfEditText set = (SelfEditText)aaa;
if (set.getText().length() > 0)
set.selectAll();
}
- /*
- if (defaultFocus2 != null) {
- View bbb = hzTab.findViewWithTag(defaultFocus2.toUpperCase().trim());
- if (bbb instanceof SelfEditText) {
- if (((SelfEditText)bbb).getText().length() > 0)
- DjUtil.setFocus(hzTab, defaultFocus2);
- }
- }*/
if (msg.what == -1) {
pd.cancel();
DialogUtil.builder(DjActivity.this, "错误信息", "检索方案执行失败:" + msg.obj.toString(), 0);
} else if (msg.what == -2) {
pd.cancel();
DialogUtil.builder(DjActivity.this, "错误信息", "页面修改方案执行失败:" + msg.obj.toString(), 0);
- WifiManager wifiManager = (WifiManager) DjActivity.this.getSystemService(Context.WIFI_SERVICE);
+ WifiManager wifiManager = (WifiManager) DjActivity.this.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
wifiManager.disconnect();
wifiManager.reconnect();
} else if (msg.what == -3) {
@@ -368,12 +323,9 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
}
String speakFld = (map.get("audioFld")).toString();
if (map.get("return_one").equals("Y") && len < 2) {
- // System.out.println("检索方案");
- // if (len > 0) {
Map paramValueMap = (Map) dg.getTableData().get(0);
play(paramValueMap, speakFld);
DjUtil.setUiValue(hzTab, paramValueMap, pageMap, imgHandler);
- // }
} else {
Intent intent = new Intent();
intent.setClass(getApplicationContext(), ParamActivity.class);
@@ -387,31 +339,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
}
pd.cancel();
} else if (msg.arg1 == 2) {// 页面修改方案
- // byte[] bb = org.kobjects.base64.Base64.decode(msg.obj
- // .toString());
Object ob = msg.obj;
- // try {
- // ob = IoUtil.byte_obj(bb);
- // } catch (Exception e) {
- // DialogUtil.builder(DjActivity.this, "提示信息",
- // "数据转换失败");
- // }
- // if (ob instanceof Map) {
- // Map map = (Map) ob;
- // DjUtil.setUiValue(hzTab, (List) map.get("hz"),
- // pageMap, imgHandler);
- // // mxData.clear();
- // // mxData.addAll((List) map.get("mx"));
- // // mxAdapter.notifyDataSetChanged();
- // // System.out.println(map.get("msg"));
- // if (map.get("msg") != null) {
- // DialogUtil.builder(DjActivity.this, "提示信息", map
- // .get("msg").toString());
- // }
- // } else {
- // DialogUtil.builder(DjActivity.this, "提示信息",
- // ob.toString());
- // }
if (ob instanceof Map) {
Map map = (Map) ob;
List