增加 解绑和查询

master
wangh 6 months ago
parent d09499b4b1
commit 1dcadcd121

@ -69,8 +69,8 @@ public class MainActivity extends BaseActivity {
SharedPreferencesUtils.putstring("ip", ip);
}
// Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
Intent intent = new Intent(MainActivity.this, RflyActivity.class);
Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
// Intent intent = new Intent(MainActivity.this, RflyActivity.class);
// Intent intent = new Intent(MainActivity.this, WebViewActivity.class);
startActivity(intent);
finish();

@ -238,6 +238,11 @@ public class RflyActivity extends BaseActivity implements Rfly.ConnectCallback,
}
// 解绑
public void deleteItem(View view) {
if (!state.get()) {
Toast.makeText(context, "停止读取", Toast.LENGTH_SHORT).show();
blueToothSanRFID(null);
}
OkGo.<MyResult>post("http://" + SharedPreferencesUtils.getstring("ip", "") +
"/api/deleteLocationCode")
.params("dbCode",binding.ledgerDb.getText().toString() )

@ -71,6 +71,11 @@ public class BaseActivity extends AppCompatActivity {
}
@Override
protected void onResume() {
super.onResume();
}
public void initRFID() {
application = MyApplication.getApplication();
uhfReader = application.getUhfReader();
@ -87,7 +92,7 @@ public class BaseActivity extends AppCompatActivity {
}
private void initDialog() {
dialog = new ProgressDialog(this);
dialog = new ProgressDialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
@ -116,6 +121,7 @@ public class BaseActivity extends AppCompatActivity {
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(myReceiver);
}
public void titleToolClick(View view) {

Loading…
Cancel
Save