update
This commit is contained in:
parent
1baa779c49
commit
95c4bdaa9d
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.idea/vcs.xml
|
||||
|
@ -24,7 +24,7 @@
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -30,23 +30,19 @@ class MainActivity : Activity() {
|
||||
ble?.startScan()
|
||||
}
|
||||
|
||||
th = Thread(Runnable { ->
|
||||
{}.run {
|
||||
th = Thread(Runnable {
|
||||
thrun = true
|
||||
while (thrun) {
|
||||
System.out.println("state ===== " + ble?.mState)
|
||||
if (ble?.mState == ble?.CONNECTED) {
|
||||
uiHandler.post {
|
||||
run {
|
||||
btn.isEnabled = true
|
||||
}
|
||||
}
|
||||
thrun = false
|
||||
break
|
||||
}
|
||||
Thread.sleep(200)
|
||||
}
|
||||
}
|
||||
})
|
||||
th?.start()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user