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"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </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> </activity>
</application> </application>

View File

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