diff --git a/Client/Android/app/src/main/java/com/neptune/app/DeviceActivity.java b/Client/Android/app/src/main/java/com/neptune/app/DeviceActivity.java index 47d987c..d71a6c2 100644 --- a/Client/Android/app/src/main/java/com/neptune/app/DeviceActivity.java +++ b/Client/Android/app/src/main/java/com/neptune/app/DeviceActivity.java @@ -16,8 +16,8 @@ public class DeviceActivity extends AppCompatActivity { - public Button connect; - public Button temp; + //public Button connect; + //public Button temp; public ConnectionManager cm; @@ -45,7 +45,7 @@ public void onClick(View v) { } }); - connect = (Button) findViewById(R.id.connec); + /*connect = (Button) findViewById(R.id.connec); connect.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -59,7 +59,7 @@ public void onClick(View view) { public void onClick(View view) { } - }); + });*/ } @Override diff --git a/Client/Android/app/src/main/java/com/neptune/app/MainActivity.java b/Client/Android/app/src/main/java/com/neptune/app/MainActivity.java index ab473c0..35d6bb0 100644 --- a/Client/Android/app/src/main/java/com/neptune/app/MainActivity.java +++ b/Client/Android/app/src/main/java/com/neptune/app/MainActivity.java @@ -36,7 +36,7 @@ public class MainActivity extends AppCompatActivity implements RenameDialog.Rena private Button add; private AlertDialog addDialog; private LinearLayout addLine; - private Button notifListTest; + //private Button notifListTest; private ImageView delete; @Override @@ -44,26 +44,26 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - devName = (TextView) findViewById(R.id.name); - editName = (ImageView) findViewById(R.id.editDevName); + //devName = (TextView) findViewById(R.id.name); + //editName = (ImageView) findViewById(R.id.editDevName); add = (Button) findViewById(R.id.addDev); addLine = findViewById(R.id.container); - notifListTest = findViewById(R.id.notifTest); + //notifListTest = findViewById(R.id.notifTest); buildAddDialog(); - devName.setOnClickListener(new TextView.OnClickListener(){ + /*devName.setOnClickListener(new TextView.OnClickListener(){ @Override public void onClick(View v) { startActivity(new Intent(MainActivity.this, DeviceActivity.class)); } - }); + });*/ - editName.setOnClickListener(new ImageView.OnClickListener(){ + /*editName.setOnClickListener(new ImageView.OnClickListener(){ @Override public void onClick(View v) { openDialog(); } - }); + });*/ add.setOnClickListener(new View.OnClickListener() { @Override @@ -73,7 +73,7 @@ public void onClick(View view) { }); //Part of the Notification Button - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + /*if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel("My notification", "My notification", NotificationManager.IMPORTANCE_DEFAULT); NotificationManager manager = getSystemService(NotificationManager.class); manager.createNotificationChannel(channel); @@ -94,7 +94,7 @@ public void onClick(View view) { notificationManagerCompat.notify(1,buidler.build()); } - }); + });*/ } private void buildAddDialog() { @@ -156,9 +156,13 @@ public void onClick(View v) { delete.setOnClickListener(new ImageView.OnClickListener() { @Override public void onClick(View v) { - server = serverManager.getServer(devName.getText().toString()); - serverManager.removeServer(server); - server.unpair(); + /*try{ + server = serverManager.getServer(devName.getText().toString()); + serverManager.removeServer(server); + } catch (Exception e) { + + } + server.unpair();*/ addLine.removeView(view); } }); diff --git a/Client/Android/app/src/main/res/layout/activity_device.xml b/Client/Android/app/src/main/res/layout/activity_device.xml index d5caca2..6742ec7 100644 --- a/Client/Android/app/src/main/res/layout/activity_device.xml +++ b/Client/Android/app/src/main/res/layout/activity_device.xml @@ -255,7 +255,7 @@ tools:ignore="ExtraText,OnClick,TouchTargetSizeCheck" /> -