This commit is contained in:
魏少阳 2024-04-17 10:27:55 +08:00
commit 2e703bd0cc
2 changed files with 16 additions and 6 deletions

View File

@ -65,6 +65,13 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="skysmartlock" />
</intent-filter>
</activity>
</application>

View File

@ -42,13 +42,16 @@ class UDPManage {
int remoteUnlock = 0; // 1 0
void initUdp() async {
var listAddress = InternetAddress.lookup(host!);
listAddress.then((list) {
list.forEach((element) {
// print('Udp ----> element.address:${element.address} element.host:${element.host}');
host = element.address;
if (host != '') {
var listAddress = InternetAddress.lookup(host);
listAddress.then((list) {
list.forEach((element) {
// print('Udp ----> element.address:${element.address} element.host:${element.host}');
host = element.address;
});
});
});
}
await _initUdp();
}