1 | // returns IP |
2 | static S waitForPhone() { |
3 | print("Waiting for phone to come online..."); |
4 | S phoneIP = null; |
5 | while licensed { |
6 | L<S> possiblePhones = empBlast_findAndroidPhone(); |
7 | if (l(possiblePhones) > 1) print("Possible phones: " + struct(possiblePhones)); |
8 | phoneIP = first(possiblePhones); |
9 | if (phoneIP != null) break; |
10 | sleepSeconds(1); |
11 | } |
12 | print("Using phone: " + phoneIP); |
13 | ret phoneIP; |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008252 |
Snippet name: | waitForPhone - wait for an Android phone to come online in subnet |
Eternal ID of this version: | #1008252/1 |
Text MD5: | 9e616a18e7ef387fd8c5f86c195a2d9c |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-03 12:44:32 |
Source code size: | 425 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 457 / 499 |
Referenced in: | [show references] |