Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

82
LINES

< > BotCompany Repo | #1004078 // Android Awareness (Battery Bot + Dex Bot + File Op Bot + Proxy Bot + Public Comm Bot)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (8708L/61K/196K).

1  
!759
2  
3  
!include #1005410 // Awareness Include
4  
5  
static volatile int level = -1; // battery level
6  
7  
static int alarmIntervalMinutes = 10;
8  
9  
p {
10  
  print("Context: " + androidContext());
11  
  
12  
  if (eq("alarm", get(args, 0))) pcall {
13  
    androidCancelRepeatingAlarm("#1004078");
14  
    androidEnableRepeatingAlarm(alarmIntervalMinutes*60000, alarmIntervalMinutes*60000, "#1004078");
15  
  }
16  
  
17  
  if (match("i am aware", sendToLocalBotOpt_original("Awareness Bot", "are you aware"))) {
18  
    print("Has awareness.");
19  
    ret;
20  
  }
21  
  
22  
  pcall {
23  
    androidToast("Yo Setting Up Awareness...");
24  
  }
25  
    
26  
  androidSay_keepEngine = true;
27  
  makeBot("Battery Bot.");
28  
  makeBot("Dex Bot.");
29  
  makeBot("Awareness Bot.");
30  
  phonePublicCommBot();
31  
  findBot_timeout = 1000*60;
32  
  pingThread(r {
33  
    logQuoted("batt.log", chatTime() + " " + (level = androidGetBattery()));
34  
  });
35  
  //androidSayInEnglish(""); // init to english for quick response to say statements
36  
  
37  
  pcall {
38  
    androidToast("Awareness Set Up!");
39  
    print("Awareness Set Up!");
40  
  }
41  
  
42  
  printMyIPs();
43  
}
44  
45  
answer {
46  
  try {
47  
    if "please load this dex: *"
48  
      ret loadDex(hexToBytes(m.unq(0)), false); 
49  
    if "please load and run this dex: *"
50  
      ret loadDex(hexToBytes(m.unq(0)), true); 
51  
    if "quick run dex *"
52  
      ret quickRunDex(hexToBytes(m.unq(0)));
53  
        
54  
    try answer proxyBot(s);
55  
    
56  
    synchronized(mc()) {
57  
      if "are you aware" ret "i am aware";
58  
      if "are you android" ret "yes";
59  
      if "Ping" ret "pong";
60  
      if "battery level"
61  
        //ret level + " %";
62  
        ret androidGetBattery() + "%";
63  
      if "say in english *" {
64  
        thread "Speaking" {
65  
          androidSayInEnglish(m.unq(0));
66  
        }
67  
        ret "OK";
68  
      }
69  
      if "say in english now *" {
70  
        androidSayInEnglish(m.unq(0));
71  
        ret "OK";
72  
      }
73  
      try answer fileOpBot(s);
74  
      if "get android home"
75  
        ret ok(f2s((File) call(androidContext, "getFilesDir")));
76  
77  
      try answer awarenessBot(s);
78  
    }
79  
  } catch e {
80  
    ret "ERROR: " + getStackTrace(e);
81  
  }
82  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 171 computer(s): aoiabmzegqzx, bfooyqadtzbb, bhatertpkbcr, brfxcrgsgrhg, buifbzwrwcym, cbtggpbitkpu, cbybwowwnfue, cfunsshuasjs, connxhvfqtma, cpotljmdzwut, crvwmplrxojx, cxqxidysfkth, dbyzmesgzjrf, ddnzoavkxhuk, digkpvzjadop, dlyzodsxvbls, doutfcgsyoqy, dsbpoofgtjnx, dtyaoxivooce, dvunbatbnajs, dvxvdlhqlwwc, dyfldxrfteug, ecqjixtmvxlp, egsshdfjpivr, eozaicwrnmri, ezeddxofnljr, fhfjdzkfxlbj, flwlchajcels, fnmrsykwqckh, fqrowglitjmz, funhxakgkfno, fvctnogetyww, fwsfnrxjlvle, gavnqejikrat, gbdqvketdppm, gqhbhyymrpxx, grraasralroa, gsrwncdeurkl, gtrxugguieza, gveowxfxqtil, gwrvuhgaqvyk, gzronoodcfmh, hkknpzsgoixq, honjdlwrmtdu, htkmirzsdzmu, hvbppbdwfhjy, hzpzjwjgvcrr, idcfvzviszxn, ifxxhhcvckaw, igfbtfetlyvk, ihhfaimhzfdu, inzdgbwbursp, ipcmaqahdjtn, ishqpsrjomds, ivagervvdxrj, jaezsmbrhigw, jbarrfjkhowm, jgjqzccotruy, jhnqykpxgsbl, jlfdhaxjyrpf, jrjpqrqxafhk, jtwzfcwerbbv, jubvyydqgymk, jwlibnwemntm, kiawvgutsbre, kkwybtkpyotm, lcawhpckrzve, ldywjnwigrac, ledgnsvlgdlr, lfjgsyhgiptj, lgdvxdgcpgrv, lkrtzecmugaq, lldtbxzncybz, lnjhkqwteiwi, lpdgvwnxivlt, lqsqiistucwk, lsgdidgppwqq, lwfphbruhgtm, lzgehfbjsfkh, mdbqpbajgrux, mdefezkwdeup, meaqxkopohqc, mmaxggujatqf, mmmwsgafmleu, mnzieskfvskl, mqqgnosmbjvj, mrmohjpeebfc, mwwkogzcbmpq, nbgitpuheiab, ndavzgiapdkk, nmhwwpuvbanc, nrhsverhnpsn, nrvadtjxpxwv, odccbeesmgrc, omrbxrqoiqeh, onxytkatvevr, opsabzhijxss, owkcekpozlzc, pekvfmzvrlzt, pgppnpcqwliz, pidvqqudxurz, plbffmaqlxtr, pnmttuucjkfb, ppwwtnwhztze, projrnnbjcax, pyentgdyhuwx, pzhvpgtvlbxg, qbowdrloqspj, qdihqxvjryuq, qhcvkqotyiga, qhhqrodowzfo, qlbamcgvoztb, qmupjbhcwcol, qnhezvwmdcbn, quisjpqxfggn, recxuykagbtt, rkwmzlyryntx, rmuapfwsxktw, rnmscfuoljlp, rockneqxsfll, sksrqysvpwbz, skttnvmfkzhq, slhtubpyutdj, tcpfgdjhqqpe, tguojfckhoqc, tjmheftkjvzt, tpcbwahvpzrm, tpdfwrfxnmsq, tslmcundralx, tsuzdeebumli, tucydzhuhpyp, tvejysmllsmz, tvkpfieynkqz, twqnfdxxpuxv, txvdafyrfdei, txzhwycxdpzm, tzxuzeklshpk, ucpxxyxryupy, ulfxqbzbkqdu, umpqpbvfwjre, unkrhppcbqnk, uvkibmskjcsb, uzhyvevygbcc, uzkajkufykfo, uzolovmvtubr, vdgqpiitesmp, vgjwidwdhwnw, vouqrxazstgt, vqblocesogdc, vxshqlgoesuw, vzikmbzhlvqi, whwpvezoxzgq, winwedijdyqq, wlpgjdwojrfw, wtjuwcnefrcw, wwghvftpbobq, wxhtzmczqxde, wxzrvoaczrhr, xcaxdvrpbipu, yabhydzhqlvs, ybmhnqzijvxm, yjcobudmfboh, yjprkgrpedlo, ymicnlqhuozx, yqkyyimflwur, yuicjtqnulgz, ywixcsqzavbw, zfxpbznyxnpx, zndhoewobdyk, zrzaeipbowrh, ztgjuucfqghy

No comments. add comment

Snippet ID: #1004078
Snippet name: Android Awareness (Battery Bot + Dex Bot + File Op Bot + Proxy Bot + Public Comm Bot)
Eternal ID of this version: #1004078/2
Text MD5: 988f9a10c481ebf3bc0630359b42873d
Transpilation MD5: 7b264603e109217a57eb4d5edfddf8b1
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-03 14:59:01
Source code size: 2104 bytes / 82 lines
Pitched / IR pitched: No / No
Views / Downloads: 918 / 4047
Version history: 1 change(s)
Referenced in: [show references]