We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fad2681 commit 5995c17Copy full SHA for 5995c17
android/app/src/main/java/me/kavishdevar/aln/services/AirPodsService.kt
@@ -327,6 +327,10 @@ class AirPodsService: Service() {
327
device = intent.getParcelableExtra("device", BluetoothDevice::class.java)!!
328
val name = this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE)
329
.getString("name", device?.name)
330
+ if (this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE).getString("name", null) == null) {
331
+ this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE).edit()
332
+ .putString("name", name).apply()
333
+ }
334
Log.d("AirPodsService", "$name connected")
335
showPopup(this@AirPodsService, name.toString())
336
connectToSocket(device!!)
0 commit comments