From 6873496aa6765a144b2939f5b4a833efb2862d85 Mon Sep 17 00:00:00 2001 From: Zhengyu Peng Date: Tue, 22 Feb 2022 22:58:28 -0500 Subject: [PATCH] Update MainActivity.kt --- .../com/rookiedev/hexapod/MainActivity.kt | 55 +++++++++++-------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt b/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt index 085212b..b12190c 100644 --- a/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt +++ b/software/android/app/src/main/java/com/rookiedev/hexapod/MainActivity.kt @@ -48,13 +48,16 @@ class MainActivity : AppCompatActivity() { private lateinit var btDeviceName: TextView private lateinit var btDeviceMac: TextView + private var btConnectPermission = false + private var btScanPermission = false + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) mContext = applicationContext - // Tab layout + // tab layout tabLayout = findViewById(R.id.tab) // TCP @@ -63,22 +66,22 @@ class MainActivity : AppCompatActivity() { ipInput = findViewById(R.id.ip_input) portInput = findViewById(R.id.port_input) - // Bluetooth + // bluetooth val selectedDevice = findViewById(R.id.selected) btDeviceName = findViewById(R.id.textView_device_name) btDeviceMac = findViewById(R.id.textView_device_mac) - // Connect button + // connect button val connectButton = findViewById