配置调整

master
hwf452 10 months ago
parent 5d44210ac2
commit 0a13104961

@ -82,7 +82,6 @@
android:screenOrientation="portrait"> android:screenOrientation="portrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -190,6 +189,7 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".activity.sbxj.SxgzActivity" android:name=".activity.sbxj.SxgzActivity"
android:exported="true"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity

@ -104,6 +104,8 @@ public class LoginActivity extends BaseActivity {
// etUse.setText("BA001"); // etUse.setText("BA001");
// etPwd.setText("BA001"); // etPwd.setText("BA001");
// etUse.setText("ba001");
// etPwd.setText("ba001");
} }
@ -252,6 +254,7 @@ public class LoginActivity extends BaseActivity {
Intent intent = new Intent(LoginActivity.this, MainActivity.class); Intent intent = new Intent(LoginActivity.this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent); startActivity(intent);
finish(); finish();
break; break;
@ -516,14 +519,17 @@ public class LoginActivity extends BaseActivity {
} }
}; };
@Override // @Override
protected void onResume() { // protected void onResume() {
super.onResume(); // super.onResume();
} // }
@Override @Override
public void handleNfc(String result) { public void handleNfc(String result) {
super.handleNfc(result); //super.handleNfc(result);
//nfcOnlineLogin(result); //nfcOnlineLogin(result);
showLog("-------------");
showLog(result);
showToast(result);
} }
} }

@ -271,32 +271,39 @@ public class MainActivity extends BaseActivity3 {
// str.add("测振"); // str.add("测振");
if(iconText.equals("运行巡检")){ if(iconText.equals("运行巡检")){
Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class); Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","YX"); intentTemp.putExtra("type","YX");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("燃料巡检")){ }else if(iconText.equals("燃料巡检")){
Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class); Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","RL"); intentTemp.putExtra("type","RL");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("运行定期")){ }else if(iconText.equals("运行定期")){
Intent intentTemp=new Intent(MainActivity.this, RegularActivity.class); Intent intentTemp=new Intent(MainActivity.this, RegularActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","YX"); intentTemp.putExtra("type","YX");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("燃料定期")){ }else if(iconText.equals("燃料定期")){
Intent intentTemp=new Intent(MainActivity.this, RegularActivity.class); Intent intentTemp=new Intent(MainActivity.this, RegularActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","RL"); intentTemp.putExtra("type","RL");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("读取NFC")){ }else if(iconText.equals("读取NFC")){
startActivity(NfcinfoActivity.class); startActivity(NfcinfoActivity.class);
}else if(iconText.equals("测温")){ }else if(iconText.equals("测温")){
Intent intentTemp=new Intent(MainActivity.this, CustomDialogActivity.class); Intent intentTemp=new Intent(MainActivity.this, CustomDialogActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","7"); intentTemp.putExtra("type","7");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("测振")){ }else if(iconText.equals("测振")){
Intent intentVibration=new Intent(MainActivity.this, CustomDialogActivity.class); Intent intentVibration=new Intent(MainActivity.this, CustomDialogActivity.class);
intentVibration.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentVibration.putExtra("type","11"); intentVibration.putExtra("type","11");
startActivity(intentVibration); startActivity(intentVibration);
}else if(iconText.equals("保安巡检")){ }else if(iconText.equals("保安巡检")){
Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class); Intent intentTemp=new Intent(MainActivity.this, XscbglActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type","BA"); intentTemp.putExtra("type","BA");
startActivity(intentTemp); startActivity(intentTemp);
}else if(iconText.equals("手电筒")){ }else if(iconText.equals("手电筒")){
@ -307,6 +314,7 @@ public class MainActivity extends BaseActivity3 {
if (NetworkUtil.hasNetWorkStatus(context, true)) { if (NetworkUtil.hasNetWorkStatus(context, true)) {
Log.i("app", "有wifi网络"); Log.i("app", "有wifi网络");
Intent intentTemp = new Intent(context, BamjActivity.class); Intent intentTemp = new Intent(context, BamjActivity.class);
intentTemp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentTemp.putExtra("type", "BA"); intentTemp.putExtra("type", "BA");
startActivity(intentTemp); startActivity(intentTemp);
} else { } else {

@ -66,7 +66,7 @@ public class SxgzActivity extends BaseActivity3 {
private List<XSJJHXZDataBean> noCheckeListBA = new ArrayList<>(); private List<XSJJHXZDataBean> noCheckeListBA = new ArrayList<>();
private List<String> qybh = new ArrayList<>(); private List<String> qybh = new ArrayList<>();
private ArrayList<XSJJHDataBean> xsjjhDataBeanArrayList = new ArrayList<>();//点检记录列表 private ArrayList<XSJJHDataBean> xsjjhDataBeanArrayList = new ArrayList<>();//点检记录列表
String nfcValue = null; //String nfcValue = null;
String lastNfcbm = null; String lastNfcbm = null;
private String type = null; private String type = null;
private String username; private String username;
@ -93,6 +93,7 @@ public class SxgzActivity extends BaseActivity3 {
private void goScan() { private void goScan() {
Intent intent = new Intent(SxgzActivity.this, MipcaActivityCapture.class); Intent intent = new Intent(SxgzActivity.this, MipcaActivityCapture.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivityForResult(intent, 1); startActivityForResult(intent, 1);
} }
@ -108,7 +109,12 @@ public class SxgzActivity extends BaseActivity3 {
Intent intent = getIntent(); Intent intent = getIntent();
type = intent.getStringExtra("type"); type = intent.getStringExtra("type");
username = (String) SPUtils.get(context, Contans.USERID, ""); username = (String) SPUtils.get(context, Contans.USERID, "");
// showLog(type);
// showLog(username);
lv.setEmptyView(tvNodata); lv.setEmptyView(tvNodata);
headView = View.inflate(this, R.layout.xsgz_item, null); headView = View.inflate(this, R.layout.xsgz_item, null);
headView.findViewById(R.id.head).setVisibility(View.VISIBLE); headView.findViewById(R.id.head).setVisibility(View.VISIBLE);
@ -136,6 +142,7 @@ public class SxgzActivity extends BaseActivity3 {
public void onClick(View v) { public void onClick(View v) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
Intent intent = new Intent(SxgzActivity.this, CheckedListActivity.class); Intent intent = new Intent(SxgzActivity.this, CheckedListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
// bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList); // bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList);
// bundle.putBoolean("edit", false); // bundle.putBoolean("edit", false);
// bundle.putInt(Contans.KEY_ITEM, 0); // bundle.putInt(Contans.KEY_ITEM, 0);
@ -152,6 +159,7 @@ public class SxgzActivity extends BaseActivity3 {
public void onClick(View v) { public void onClick(View v) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
Intent intent = new Intent(SxgzActivity.this, NoCheckedListActivity.class); Intent intent = new Intent(SxgzActivity.this, NoCheckedListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
// bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList); // bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList);
// bundle.putBoolean("edit", false); // bundle.putBoolean("edit", false);
// bundle.putInt(Contans.KEY_ITEM, 0); // bundle.putInt(Contans.KEY_ITEM, 0);
@ -182,15 +190,10 @@ public class SxgzActivity extends BaseActivity3 {
setListData(); setListData();
} }
@Override
public void handleNfc(String result) {
super.handleNfc(result);
handleNfcCheck(result);
//handleNfcCheck("04B46E8AF36780");
}
//加载数据库中已经下载的计划 //加载数据库中已经下载的计划
private void getDataInSqlite() { private void getDataInSqlite() {
if(type!=null&&username!=null){
xsjjhxzDataBeanList.clear(); xsjjhxzDataBeanList.clear();
checkedListBA.clear(); checkedListBA.clear();
noCheckeListBA.clear(); noCheckeListBA.clear();
@ -200,10 +203,11 @@ public class SxgzActivity extends BaseActivity3 {
//DataSupport.findAll(XSJJHXZDataBean.class); //DataSupport.findAll(XSJJHXZDataBean.class);
List<XSJJHXZDataBean> planTemp1 = this.removeDuplicate(planTemp); List<XSJJHXZDataBean> planTemp1 = this.removeDuplicate(planTemp);
xsjjhxzDataBeanList.addAll(planTemp1); xsjjhxzDataBeanList.addAll(planTemp1);
Log.i("app", String.valueOf(xsjjhxzDataBeanList.size())); //showLog(String.valueOf(String.valueOf(xsjjhxzDataBeanList.size())));
for (int i = 0; i < xsjjhxzDataBeanList.size(); i++) { for (int i = 0; i < xsjjhxzDataBeanList.size(); i++) {
XSJJHXZDataBean item = xsjjhxzDataBeanList.get(i); XSJJHXZDataBean item = xsjjhxzDataBeanList.get(i);
if (type != null && type.equals("BA")) { if (type != null && type.equals("BA")) {
//showLog(GsonUtils.GsonString(item));
if(item.isBAChecked()){ if(item.isBAChecked()){
checkedListBA.add(item); checkedListBA.add(item);
}else{ }else{
@ -235,6 +239,7 @@ public class SxgzActivity extends BaseActivity3 {
total_checked.setText(String.valueOf(checkedList.size())); total_checked.setText(String.valueOf(checkedList.size()));
} }
} }
}
public List<XSJJHXZDataBean> removeDuplicate(List<XSJJHXZDataBean> list) { public List<XSJJHXZDataBean> removeDuplicate(List<XSJJHXZDataBean> list) {
for (int i = 0; i < list.size() - 1; i++) { for (int i = 0; i < list.size() - 1; i++) {
@ -324,7 +329,7 @@ public class SxgzActivity extends BaseActivity3 {
} else { } else {
showToast("请使用NFC进行巡检"); showToast("请使用NFC进行巡检");
nfcValue = "click"; //nfcValue = "click";
xsjjhDataBeanArrayList.clear(); xsjjhDataBeanArrayList.clear();
//List<XSJJHDataBean> xsjjhdatabean = DataSupport.where("qybh = ?",xsjjhxzDataBeanList.get(postion - 1).getQybh()).find( XSJJHDataBean.class); //List<XSJJHDataBean> xsjjhdatabean = DataSupport.where("qybh = ?",xsjjhxzDataBeanList.get(postion - 1).getQybh()).find( XSJJHDataBean.class);
xsjjhDataBeanArrayList.addAll(where("qybh = ? and mk = ? and username = ?", xsjjhxzDataBeanList.get(postion - 1).getQybh(), type, username).find(XSJJHDataBean.class)); xsjjhDataBeanArrayList.addAll(where("qybh = ? and mk = ? and username = ?", xsjjhxzDataBeanList.get(postion - 1).getQybh(), type, username).find(XSJJHDataBean.class));
@ -333,6 +338,7 @@ public class SxgzActivity extends BaseActivity3 {
if (xsjjhDataBeanArrayList.size() != 0) { if (xsjjhDataBeanArrayList.size() != 0) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class); Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList); bundle.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList);
bundle.putBoolean("edit", false); bundle.putBoolean("edit", false);
// bundle.putBoolean("edit", true); // bundle.putBoolean("edit", true);
@ -363,10 +369,16 @@ public class SxgzActivity extends BaseActivity3 {
//处理NFC的数据 //处理NFC的数据
public void handleNfcCheck(String result) { public void handleNfcCheck(String result) {
// showLog(type);
// showLog(username);
// showLog(result);
if (type != null && type.equals("BA")) { if (type != null && type.equals("BA")) {
//showLog("BA");
//保安巡检 //保安巡检
List<XSJJHXZDataBean> planNFC = where("nfcbm = ? and mk = ? and username = ?", result, type, username).find(XSJJHXZDataBean.class); List<XSJJHXZDataBean> planNFC = where("nfcbm = ? and mk = ? and username = ?", result, type, username).find(XSJJHXZDataBean.class);
//showLog(String.valueOf(planNFC.size()));
if (planNFC != null && planNFC.size() > 0) { if (planNFC != null && planNFC.size() > 0) {
showLog("planNFC != null");
XSJJHXZDataBean itemQY = planNFC.get(0); XSJJHXZDataBean itemQY = planNFC.get(0);
String content = null; String content = null;
String notice = null; String notice = null;
@ -395,22 +407,38 @@ public class SxgzActivity extends BaseActivity3 {
auditDialog.setCancelable(true); auditDialog.setCancelable(true);
auditDialog.show(); auditDialog.show();
} else { } else {
nfcValue = null; //showLog("planNFC == null");
BaCheckDialog auditDialog = new BaCheckDialog(context, "无数据请联系管理员", new BaCheckDialog.AuditDialogListener() {
@Override
public void confirm(String notice) {
}
});
auditDialog.setTvTitle("提示");
auditDialog.setNotice("");
auditDialog.hideNotice("");
auditDialog.setCancelable(true);
auditDialog.hideBottomClick();
auditDialog.show();
//nfcValue = null;
//getLastUploadUser(result); //getLastUploadUser(result);
toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show(); //showToast("无数据请联系管理员");
//toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show();
} }
} else { } else {
//showLog("运行,燃料巡检");
//运行,燃料巡检 //运行,燃料巡检
List<XSJJHDataBean> xsjjhDataBeen = DataSupport.where("nfcbm = ? and mk = ? and username = ?", result, type, username).find(XSJJHDataBean.class); List<XSJJHDataBean> xsjjhDataBeen = DataSupport.where("nfcbm = ? and mk = ? and username = ?", result, type, username).find(XSJJHDataBean.class);
xsjjhDataBeanArrayList.clear(); xsjjhDataBeanArrayList.clear();
xsjjhDataBeanArrayList.addAll(xsjjhDataBeen); xsjjhDataBeanArrayList.addAll(xsjjhDataBeen);
if (xsjjhDataBeen.size() == 0) { if (xsjjhDataBeen.size() == 0) {
nfcValue = null; //nfcValue = null;
//getLastUploadUser(result); //getLastUploadUser(result);
toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show(); toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show();
} else { } else {
Bundle bundle3 = new Bundle(); Bundle bundle3 = new Bundle();
Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class); Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
bundle3.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList); bundle3.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList);
bundle3.putBoolean("edit", true); bundle3.putBoolean("edit", true);
bundle3.putInt(Contans.KEY_ITEM, 0); bundle3.putInt(Contans.KEY_ITEM, 0);
@ -538,8 +566,20 @@ public class SxgzActivity extends BaseActivity3 {
auditDialog.setCancelable(true); auditDialog.setCancelable(true);
auditDialog.show(); auditDialog.show();
} else { } else {
nfcValue = null; //nfcValue = null;
toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show(); BaCheckDialog auditDialog = new BaCheckDialog(context, "无数据请联系管理员", new BaCheckDialog.AuditDialogListener() {
@Override
public void confirm(String notice) {
}
});
auditDialog.setTvTitle("提示");
auditDialog.setNotice("");
auditDialog.hideNotice("");
auditDialog.setCancelable(true);
auditDialog.hideBottomClick();
auditDialog.show();
//toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show();
} }
} else { } else {
List<XSJJHXZDataBean> scranTwoCodeList = where("txm = ? and txm_zt = 1 and mk = ? and username = ?", result, type, username).find(XSJJHXZDataBean.class); List<XSJJHXZDataBean> scranTwoCodeList = where("txm = ? and txm_zt = 1 and mk = ? and username = ?", result, type, username).find(XSJJHXZDataBean.class);
@ -552,11 +592,12 @@ public class SxgzActivity extends BaseActivity3 {
xsjjhDataBeanArrayList.clear(); xsjjhDataBeanArrayList.clear();
xsjjhDataBeanArrayList.addAll(xsjjhDataBeen); xsjjhDataBeanArrayList.addAll(xsjjhDataBeen);
if (xsjjhDataBeen.size() == 0) { if (xsjjhDataBeen.size() == 0) {
nfcValue = null; //nfcValue = null;
toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show(); toastviewbymyself.makeText(SxgzActivity.this, "无数据请联系管理员", Toast.LENGTH_SHORT).show();
} else { } else {
Bundle bundle3 = new Bundle(); Bundle bundle3 = new Bundle();
Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class); Intent intent = new Intent(SxgzActivity.this, XjYulActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
bundle3.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList); bundle3.putParcelableArrayList("xsjjhDataBeanArrayList", xsjjhDataBeanArrayList);
bundle3.putBoolean("edit", true); bundle3.putBoolean("edit", true);
bundle3.putInt(Contans.KEY_ITEM, 0); bundle3.putInt(Contans.KEY_ITEM, 0);
@ -689,6 +730,14 @@ public class SxgzActivity extends BaseActivity3 {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
nfcValue = null; //nfcValue = null;
}
@Override
public void handleNfc(String result) {
// showLog("-------------");
// showLog(result);
handleNfcCheck(result);
//handleNfcCheck("SGP-AB001");
} }
} }

@ -119,14 +119,17 @@ public class XscbglActivity extends BaseActivity {
switch (i) { switch (i) {
case 0: case 0:
intent = new Intent(XscbglActivity.this, XjMainActivity.class); intent = new Intent(XscbglActivity.this, XjMainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type",type); intent.putExtra("type",type);
break; break;
case 1: case 1:
intent = new Intent(XscbglActivity.this, SxgzActivity.class); intent = new Intent(XscbglActivity.this, SxgzActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type",type); intent.putExtra("type",type);
break; break;
case 2: case 2:
intent = new Intent(XscbglActivity.this, XJStatisticsActivity.class);//XJStatisticsMyUploadActivity //XJStatisticsActivity intent = new Intent(XscbglActivity.this, XJStatisticsActivity.class);//XJStatisticsMyUploadActivity //XJStatisticsActivity
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("type",type); intent.putExtra("type",type);
break; break;
} }

@ -84,7 +84,7 @@ public abstract class BaseActivity extends AutoLayoutActivity {
} }
public void showToast(String text) { public void showToast(String text) {
if (text != null && !text.trim().equals("")) { if (text != null) {
Toast.makeText(this, text, Toast.LENGTH_SHORT).show(); Toast.makeText(this, text, Toast.LENGTH_SHORT).show();
} }
} }
@ -130,7 +130,7 @@ public abstract class BaseActivity extends AutoLayoutActivity {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT); pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
} else { } else {
pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_UPDATE_CURRENT);
} }
//设定要过滤的标签动作这里只接收ACTION_NDEF_DISCOVERED类型 //设定要过滤的标签动作这里只接收ACTION_NDEF_DISCOVERED类型
ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED); ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);

@ -84,7 +84,7 @@ public abstract class BaseActivity3 extends AutoLayoutActivity {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT); pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
} else { } else {
pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), PendingIntent.FLAG_UPDATE_CURRENT);
} }
//pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); //pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
//设定要过滤的标签动作这里只接收ACTION_NDEF_DISCOVERED类型 //设定要过滤的标签动作这里只接收ACTION_NDEF_DISCOVERED类型

@ -7,6 +7,10 @@ public class Contans {
public static String LOGINNFC = "AppLogin/userLogin.ashx"; public static String LOGINNFC = "AppLogin/userLogin.ashx";
//内网正式环境 //内网正式环境
public static String IP = "http://10.21.100.21:1102/"; public static String IP = "http://10.21.100.21:1102/";
// public static String IP = "http://192.168.2.6:9099/";
public static String MAXIMOIP = "http://10.46.0.152:7001/"; public static String MAXIMOIP = "http://10.46.0.152:7001/";

Loading…
Cancel
Save