|
|
@@ -286,7 +286,11 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
Intent intent = new Intent(IndexActivity.this, BannerActivity.class);
|
|
|
intent.putStringArrayListExtra("lists", selectedItemList);
|
|
|
startActivity(intent);
|
|
|
- } else {
|
|
|
+ } else if (filenametcp.contains(".MP4") || filenametcp.contains(".mp4")){
|
|
|
+ Intent intent = new Intent(IndexActivity.this, VideoActivity.class);
|
|
|
+ intent.putStringArrayListExtra("lists", selectedItemList);
|
|
|
+ startActivity(intent);
|
|
|
+ }else {
|
|
|
CommonUtil.toastNoRepeat(IndexActivity.this, "此文件无法打开");
|
|
|
}
|
|
|
}
|
|
|
@@ -526,6 +530,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
});
|
|
|
ss_brdipsone = SharedPreUtil.getString(IndexActivity.this, "ss_brdip", null);
|
|
|
ss_brdportsone = SharedPreUtil.getString(IndexActivity.this, "ss_brdport", null);
|
|
|
+ mEmNameTv.setText("("+ss_brdipsone+" "+ss_brdportsone+")");
|
|
|
sound_monitor_vibration_sv2.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -561,10 +566,13 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
urlBeanList.clear();
|
|
|
for (Object index : dataArray) {
|
|
|
JSONObject data = (JSONObject) index;
|
|
|
- bean= new ResourcefileBean.DataBean.UrlBean(
|
|
|
- data.getString("path"),
|
|
|
- data.getString("filename"));
|
|
|
- urlBeanList.add(bean);
|
|
|
+ if (data.getString("filename").contains(mEmCodeTv.getText().toString().trim())){
|
|
|
+ bean= new ResourcefileBean.DataBean.UrlBean(
|
|
|
+ data.getString("path"),
|
|
|
+ data.getString("filename"));
|
|
|
+ urlBeanList.add(bean);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
setAdapter(urlBeanList);
|
|
|
}
|
|
|
@@ -717,12 +725,12 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
}
|
|
|
break;
|
|
|
case R.id.iv_setting:
|
|
|
- Intent intent = new Intent(IndexActivity.this, FunctionActivity.class);
|
|
|
- intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, GloableParams.GRIDNAME_SETTING);
|
|
|
+ Intent intent = new Intent(IndexActivity.this, VideoActivity.class);
|
|
|
+// intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, GloableParams.GRIDNAME_SETTING);
|
|
|
startActivity(intent);
|
|
|
break;
|
|
|
case R.id.line_login_post:
|
|
|
-// initEditPopupWindow();
|
|
|
+ initEditPopupWindow();
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
@@ -1952,7 +1960,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
for (int i=0;i<url.size();i++){
|
|
|
ResourcefileBean.DataBean.UrlBean urlBean = url.get(i);
|
|
|
String filename = urlBean.getFilename();
|
|
|
-// if (filename.contains(mEmCodeTv.getText().toString().trim())){
|
|
|
+ if (filename.contains(mEmCodeTv.getText().toString().trim())){
|
|
|
String path = urlBean.getPath();
|
|
|
String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
|
|
|
list.add(str2);
|
|
|
@@ -1960,7 +1968,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
Log.e("res===",str2);
|
|
|
Log.e("path",path);
|
|
|
Log.e("filename", filename);
|
|
|
-// }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
// pdfOrImageAdapter.setmList(urlBeanList);
|
|
|
@@ -1998,7 +2006,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
- })).init(ss_brdips,Integer.valueOf(ss_brdports));//Integer.valueOf(ss_brdports)192.168.2.6
|
|
|
+ })).init("192.168.0.72",Integer.valueOf(ss_brdports));//Integer.valueOf(ss_brdports)192.168.2.6
|
|
|
}
|
|
|
/**
|
|
|
* 断开socket
|
|
|
@@ -2052,7 +2060,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
for (int i=0;i<url.size();i++){
|
|
|
ResourcefileBean.DataBean.UrlBean urlBean = url.get(i);
|
|
|
String filename = urlBean.getFilename();
|
|
|
-// if (filename.contains(mEmCodeTv.getText().toString().trim())){
|
|
|
+ if (filename.contains(mEmCodeTv.getText().toString().trim())){
|
|
|
String path = urlBean.getPath();
|
|
|
String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
|
|
|
list.add(str2);
|
|
|
@@ -2060,7 +2068,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
Log.e("res===",str2);
|
|
|
Log.e("path",path);
|
|
|
Log.e("filename", filename);
|
|
|
-// }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
// pdfOrImageAdapter.setmList(urlBeanList);
|
|
|
@@ -2087,7 +2095,11 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
|
|
|
Intent intent = new Intent(IndexActivity.this, BannerActivity.class);
|
|
|
intent.putStringArrayListExtra("lists", list);
|
|
|
startActivity(intent);
|
|
|
- } else {
|
|
|
+ } else if (filenametcp.contains(".MP4") || filenametcp.contains(".mp4")){
|
|
|
+ Intent intent = new Intent(IndexActivity.this, VideoActivity.class);
|
|
|
+ intent.putStringArrayListExtra("lists", list);
|
|
|
+ startActivity(intent);
|
|
|
+ }else {
|
|
|
CommonUtil.toastNoRepeat(IndexActivity.this, "此文件无法打开");
|
|
|
}
|
|
|
|