1 | import java.text.SimpleDateFormat; |
2 | |
3 | static void androidLifecycle(O line) ctex { |
4 | if (line instanceof Throwable) line = getStackTrace((Throwable) line); |
5 | |
6 | line = "[" + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()) + "] " + line; |
7 | String path = "/storage/sdcard0/JavaX_System/lifecycle.txt"; |
8 | new File(path).getParentFile().mkdirs(); |
9 | RandomAccessFile raf = new RandomAccessFile(path, "rw"); |
10 | raf.seek(raf.length()); |
11 | raf.write((line + "\n").getBytes("UTF-8")); |
12 | raf.close(); |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004190 |
Snippet name: | androidLifecycle - log to lifecycle.txt |
Eternal ID of this version: | #1004190/1 |
Text MD5: | db31391afda37a6591d77cc64903eb60 |
Author: | stefan |
Category: | javax / android |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-09 17:24:42 |
Source code size: | 514 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 623 / 614 |
Referenced in: | [show references] |