Compare commits
695 Commits
contacts-v
...
timestamp-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
13e0ad3f03 | ||
![]() |
be85ef923e | ||
![]() |
9a3383a43b | ||
![]() |
d875b6965d | ||
![]() |
bc873852c2 | ||
![]() |
b032de55dc | ||
![]() |
8fa20b56ec | ||
![]() |
1ca93a610e | ||
![]() |
6555346618 | ||
![]() |
df6633046c | ||
![]() |
7d35d5a9b8 | ||
![]() |
ddce5646bd | ||
![]() |
3607a99053 | ||
![]() |
6a101d8843 | ||
![]() |
c5e5e76bbf | ||
![]() |
6d05808a2a | ||
![]() |
2625ffe6a6 | ||
![]() |
9c4c1320aa | ||
![]() |
551b424960 | ||
![]() |
1062c7d2ee | ||
![]() |
e958556073 | ||
![]() |
466e061aa8 | ||
![]() |
2f2512cd76 | ||
![]() |
d26de8f2f7 | ||
![]() |
2e9b6ae263 | ||
![]() |
f0a29dc7a9 | ||
![]() |
125c2b4431 | ||
![]() |
03ceaf3e2a | ||
![]() |
7ff2cab615 | ||
![]() |
954139f0c9 | ||
![]() |
027dc23060 | ||
![]() |
9816167e87 | ||
![]() |
512c321b76 | ||
![]() |
482c007481 | ||
![]() |
609182f909 | ||
![]() |
eb69a473a3 | ||
![]() |
e772563fc0 | ||
![]() |
55ce968053 | ||
![]() |
502d3ad23d | ||
![]() |
103c1101ce | ||
![]() |
03d4cf2efe | ||
![]() |
15fa0ad506 | ||
![]() |
0dfc7df4b5 | ||
![]() |
f33956c872 | ||
![]() |
9283ad709f | ||
![]() |
459fff1531 | ||
![]() |
b4fb680b8c | ||
![]() |
cf933da3aa | ||
![]() |
2bd8947af1 | ||
![]() |
28f2ada31a | ||
![]() |
81669f03b3 | ||
![]() |
980eb533bf | ||
![]() |
4fcef89a10 | ||
![]() |
3127a26056 | ||
![]() |
897875b368 | ||
![]() |
e12dd5630b | ||
![]() |
23519f1ec9 | ||
![]() |
7dc2668d42 | ||
![]() |
63f424c149 | ||
![]() |
ff9f5b42b9 | ||
![]() |
077a5fc616 | ||
![]() |
62fd671f6e | ||
![]() |
3dd66d387a | ||
![]() |
dab1412bc4 | ||
![]() |
aca23ca727 | ||
![]() |
5e8070ae01 | ||
![]() |
d737766459 | ||
![]() |
f8e9afddd1 | ||
![]() |
f8bb5a7852 | ||
![]() |
5a1f1f2d73 | ||
![]() |
0e4dc85dfa | ||
![]() |
2be7e2cbaf | ||
![]() |
24f598294e | ||
![]() |
b5e918b364 | ||
![]() |
50561a2f67 | ||
![]() |
204642a5cd | ||
![]() |
daf10dd727 | ||
![]() |
2005ba6aee | ||
![]() |
6adc96449b | ||
![]() |
4d8675f1f7 | ||
![]() |
2467f3b5a8 | ||
![]() |
33726a306f | ||
![]() |
99199d445e | ||
![]() |
a629941054 | ||
![]() |
3a2274d7a2 | ||
![]() |
32a0e47c87 | ||
![]() |
82af906fed | ||
![]() |
d13a8a445e | ||
![]() |
6d02c9fc49 | ||
![]() |
10a8c2c1ed | ||
![]() |
bff0ec4e57 | ||
![]() |
aa101977f0 | ||
![]() |
a88e1b2d99 | ||
![]() |
363fa0c3b3 | ||
![]() |
ebb0df2a74 | ||
![]() |
ed193119f6 | ||
![]() |
b8834627ae | ||
![]() |
b918b04068 | ||
![]() |
f0326bc9a3 | ||
![]() |
164c00ee0d | ||
![]() |
f4a054663e | ||
![]() |
d17dd8073d | ||
![]() |
b34d777c9f | ||
![]() |
455e38ac0c | ||
![]() |
7150974d01 | ||
![]() |
c2794e7322 | ||
![]() |
2ce07bbcf3 | ||
![]() |
7932e25def | ||
![]() |
191de5c511 | ||
![]() |
d520c9ae06 | ||
![]() |
933abbc261 | ||
![]() |
14a161ab3f | ||
![]() |
248b8084dc | ||
![]() |
006cefea2a | ||
![]() |
ad1b6ca3e9 | ||
![]() |
37c93658b3 | ||
![]() |
65aae2146e | ||
![]() |
58eba26eb5 | ||
![]() |
a32b10cdec | ||
![]() |
559d41e46c | ||
![]() |
ef9c0f08ae | ||
![]() |
18b078c644 | ||
![]() |
b68d8a58e3 | ||
![]() |
9eec7060b9 | ||
![]() |
e572486b05 | ||
![]() |
4737ce92e1 | ||
![]() |
7abe096779 | ||
![]() |
839bf72eca | ||
![]() |
3f2ec872f8 | ||
![]() |
b62cbc043b | ||
![]() |
d0e7f1f56c | ||
![]() |
39fe25f34f | ||
![]() |
94f444d6c7 | ||
![]() |
33952a90de | ||
![]() |
4c1fece9f0 | ||
![]() |
b60de856ca | ||
![]() |
37d5d1efe0 | ||
![]() |
c11102d729 | ||
![]() |
6cc04f8e6f | ||
![]() |
2bc7db1dca | ||
![]() |
96f31e252c | ||
![]() |
4612593d88 | ||
![]() |
0460613aea | ||
![]() |
e1dadfa41c | ||
![]() |
6a0510e76c | ||
![]() |
f9bfdd3de8 | ||
![]() |
0f787de4d9 | ||
![]() |
c476792d7c | ||
![]() |
ee421d1019 | ||
![]() |
cd277497a3 | ||
![]() |
29300da793 | ||
![]() |
74bfb6d227 | ||
![]() |
43af33c21d | ||
![]() |
8452680514 | ||
![]() |
1338e1a6a5 | ||
![]() |
398db803cf | ||
![]() |
39cb0bfe36 | ||
![]() |
84fa0005b8 | ||
![]() |
e2bccd3a7c | ||
![]() |
0f8e66506e | ||
![]() |
d8f9545ed2 | ||
![]() |
ce75de5a68 | ||
![]() |
0ed96d6a33 | ||
![]() |
5774c1484d | ||
![]() |
f251fe5326 | ||
![]() |
5d15b11282 | ||
![]() |
f85af921d7 | ||
![]() |
3db85b9878 | ||
![]() |
489bc87959 | ||
![]() |
029d4193e1 | ||
![]() |
4cafbae077 | ||
![]() |
4b9f34b946 | ||
![]() |
5cb4f6c409 | ||
![]() |
f9e48a159d | ||
![]() |
65f182c235 | ||
![]() |
d9bf0f2297 | ||
![]() |
d025fb4f13 | ||
![]() |
58ae10f93d | ||
![]() |
2e02cd3553 | ||
![]() |
af48d36e7d | ||
![]() |
e0c754a056 | ||
![]() |
e65e184077 | ||
![]() |
4cbd57704b | ||
![]() |
09b8e9b034 | ||
![]() |
4449fe6598 | ||
![]() |
1e2661f640 | ||
![]() |
1d2b595859 | ||
![]() |
89f8404dc9 | ||
![]() |
8011456fc1 | ||
![]() |
1254c51ef8 | ||
![]() |
4ea010ab21 | ||
![]() |
f4d21d7b1a | ||
![]() |
030012476f | ||
![]() |
652cc2fb81 | ||
![]() |
4afc4aafa9 | ||
![]() |
bd6eae16e3 | ||
![]() |
5b82baead5 | ||
![]() |
a9ce480f9f | ||
![]() |
ce1a2715f9 | ||
![]() |
0052023037 | ||
![]() |
fcbe812f89 | ||
![]() |
05806ccef1 | ||
![]() |
18e1369534 | ||
![]() |
3ce6746e50 | ||
![]() |
c06b157332 | ||
![]() |
6b57d65ef4 | ||
![]() |
7fa2c658b6 | ||
![]() |
96f5a892d5 | ||
![]() |
d977b8fe28 | ||
![]() |
693f7f48a7 | ||
![]() |
8dd41a0c3a | ||
![]() |
ca4814744f | ||
![]() |
1f8f7fd405 | ||
![]() |
60ddae0950 | ||
![]() |
3d23a095fe | ||
![]() |
f13caa90ff | ||
![]() |
c7677764a3 | ||
![]() |
57114f76fe | ||
![]() |
7fd10086eb | ||
![]() |
d65dc665a0 | ||
![]() |
2f22b6602b | ||
![]() |
79b680f9f3 | ||
![]() |
f572c488e6 | ||
![]() |
a018958899 | ||
![]() |
87dfa4872d | ||
![]() |
935a663cee | ||
![]() |
5a9ee81c30 | ||
![]() |
841d526b0d | ||
![]() |
11d2db6bf9 | ||
![]() |
93d8fa15db | ||
![]() |
99ff741a22 | ||
![]() |
5bc7581db1 | ||
![]() |
fde0712439 | ||
![]() |
6a6a6ad051 | ||
![]() |
ea3f0190a8 | ||
![]() |
c47639484d | ||
![]() |
f053218932 | ||
![]() |
bec4041b87 | ||
![]() |
0d540c422e | ||
![]() |
5e4f831d00 | ||
![]() |
2a4c4be5c6 | ||
![]() |
ba2f5c4037 | ||
![]() |
62b39988fd | ||
![]() |
58a232fd48 | ||
![]() |
de1b3657f8 | ||
![]() |
6b70019208 | ||
![]() |
641cc0d828 | ||
![]() |
89ee16a69f | ||
![]() |
4f44034b72 | ||
![]() |
9d37de4bfc | ||
![]() |
619fd39a92 | ||
![]() |
d51ebbd550 | ||
![]() |
d474eb6158 | ||
![]() |
b1e2a018d8 | ||
![]() |
81d538589f | ||
![]() |
2870ca911c | ||
![]() |
d87fac0270 | ||
![]() |
4e04d022fa | ||
![]() |
ec107dfebf | ||
![]() |
141e01b4df | ||
![]() |
a3994ccd07 | ||
![]() |
2154f5e4a2 | ||
![]() |
0735783811 | ||
![]() |
156329707d | ||
![]() |
3835800d24 | ||
![]() |
b0e53d1691 | ||
![]() |
9b882d14ab | ||
![]() |
1074a47ae7 | ||
![]() |
721a4034dd | ||
![]() |
07959be091 | ||
![]() |
3e1531d356 | ||
![]() |
82d8cd7f17 | ||
![]() |
5465b8eb34 | ||
![]() |
35d7716778 | ||
![]() |
256b9ec99c | ||
![]() |
2aacb0e70d | ||
![]() |
266009de85 | ||
![]() |
1a571684ca | ||
![]() |
5d796c4aba | ||
![]() |
1891c24d4f | ||
![]() |
892f9f0d6c | ||
![]() |
a374d1aada | ||
![]() |
b9d2778e11 | ||
![]() |
9f84f8b800 | ||
![]() |
02e218ee88 | ||
![]() |
5e54f0f4c7 | ||
![]() |
4a0b58feda | ||
![]() |
28ae2631a6 | ||
![]() |
87d23829ae | ||
![]() |
43a91575d5 | ||
![]() |
f60a57237c | ||
![]() |
20b30c1337 | ||
![]() |
76dabc9ef7 | ||
![]() |
73ddef7738 | ||
![]() |
2a9ec064f9 | ||
![]() |
07bfd44c65 | ||
![]() |
32a8c0dfa1 | ||
![]() |
0a8707b02b | ||
![]() |
6e8e32c497 | ||
![]() |
abb0c1f73a | ||
![]() |
18fc20b4c5 | ||
![]() |
9ef0b0894c | ||
![]() |
3ef885e8c1 | ||
![]() |
d9b99ee371 | ||
![]() |
6f7414b576 | ||
![]() |
888e2c7a4d | ||
![]() |
2f6e297bab | ||
![]() |
e35a6b9a7f | ||
![]() |
e71e5a852d | ||
![]() |
a5324d557f | ||
![]() |
0dc38b0fa1 | ||
![]() |
4ea48a051d | ||
![]() |
ae680b5b48 | ||
![]() |
f2d8902b4c | ||
![]() |
80767ca5b5 | ||
![]() |
be5ed936df | ||
![]() |
b3075f778d | ||
![]() |
ce05d69132 | ||
![]() |
6a9434b194 | ||
![]() |
6ca7b210a6 | ||
![]() |
d83d460342 | ||
![]() |
9a53d04050 | ||
![]() |
ada664f4ab | ||
![]() |
92a9bbb455 | ||
![]() |
211eef7232 | ||
![]() |
31bad8a279 | ||
![]() |
bc0eb69edf | ||
![]() |
08f990de65 | ||
![]() |
e2b6fadd43 | ||
![]() |
2074f68ef3 | ||
![]() |
56a13b4a40 | ||
![]() |
8bdd42ce68 | ||
![]() |
d4986c6ba4 | ||
![]() |
529f420668 | ||
![]() |
b3439aa36a | ||
![]() |
7488fa7af2 | ||
![]() |
d4e4541bfd | ||
![]() |
ac627e53b1 | ||
![]() |
42a2e6d559 | ||
![]() |
0d44734c0b | ||
![]() |
e89873046b | ||
![]() |
f3ef7226d8 | ||
![]() |
9706a39f41 | ||
![]() |
ed1a1ac179 | ||
![]() |
a65829a1d2 | ||
![]() |
abb5d750c1 | ||
![]() |
dc000567cd | ||
![]() |
c3ccfd3c23 | ||
![]() |
d2c649fe65 | ||
![]() |
3b61a93402 | ||
![]() |
e85cbd803e | ||
![]() |
00a9ec1d66 | ||
![]() |
64051bb9fe | ||
![]() |
4ff54c785e | ||
![]() |
b961468e1e | ||
![]() |
575ef9aac0 | ||
![]() |
16b118f83b | ||
![]() |
1eeba4e4c6 | ||
![]() |
66eb8e06ea | ||
![]() |
0a4727966a | ||
![]() |
7271b2b531 | ||
![]() |
e9ed88b930 | ||
![]() |
a0cf87fb83 | ||
![]() |
dae32ba6cb | ||
![]() |
2818c0fd85 | ||
![]() |
8fb9ef7992 | ||
![]() |
76c9ae469f | ||
![]() |
51775620db | ||
![]() |
f1dac0c395 | ||
![]() |
2750f0faf9 | ||
![]() |
e96710e3f1 | ||
![]() |
b2ad623c9c | ||
![]() |
78c038b56b | ||
![]() |
a9bc345580 | ||
![]() |
82b54551d0 | ||
![]() |
87d8c08b5f | ||
![]() |
a9aee97e41 | ||
![]() |
6f2bfa66eb | ||
![]() |
0f5eac2a01 | ||
![]() |
eaf83a931e | ||
![]() |
3d287757a1 | ||
![]() |
f9f6ec746a | ||
![]() |
cf7bdebbb3 | ||
![]() |
737150da8d | ||
![]() |
5864b725eb | ||
![]() |
c70a43257c | ||
![]() |
0794446d34 | ||
![]() |
ac02880344 | ||
![]() |
c9980db1d5 | ||
![]() |
ec08e89418 | ||
![]() |
deaa9caadd | ||
![]() |
052c6881e5 | ||
![]() |
b0dbd1b339 | ||
![]() |
851ea8a50a | ||
![]() |
a2b216cb2c | ||
![]() |
8d7f1298f6 | ||
![]() |
803d1afc18 | ||
![]() |
a859fcb237 | ||
![]() |
e9cf4404d2 | ||
![]() |
5e42f21c9a | ||
![]() |
c394a37e0a | ||
![]() |
dd7600d617 | ||
![]() |
c203557a6a | ||
![]() |
00b619ee99 | ||
![]() |
3a6fb3e17c | ||
![]() |
75c2f6304c | ||
![]() |
83a061856a | ||
![]() |
ec6926f629 | ||
![]() |
ede6c07deb | ||
![]() |
3fe1ea7ff2 | ||
![]() |
652caf7a46 | ||
![]() |
7391091480 | ||
![]() |
133964aaf1 | ||
![]() |
a96696f261 | ||
![]() |
f96fcbfe13 | ||
![]() |
ad6e1bd51b | ||
![]() |
0fa55b0291 | ||
![]() |
32082c4dd0 | ||
![]() |
a0627d5b3b | ||
![]() |
3be42fbd59 | ||
![]() |
85f8466450 | ||
![]() |
407f2b38ae | ||
![]() |
550410d913 | ||
![]() |
6daa3bbd0f | ||
![]() |
8a29735130 | ||
![]() |
272dd15427 | ||
![]() |
5411d5e590 | ||
![]() |
facf0b001d | ||
![]() |
df58c0355c | ||
![]() |
7c7b159a80 | ||
![]() |
da23546bb4 | ||
![]() |
e657e45218 | ||
![]() |
c22946f0a5 | ||
![]() |
1363a7dcce | ||
![]() |
e0ca5725f1 | ||
![]() |
3c4988532f | ||
![]() |
b0a34579fa | ||
![]() |
fe12cf7ffe | ||
![]() |
3192ae55b1 | ||
![]() |
6bfaa7ae92 | ||
![]() |
58af5ba074 | ||
![]() |
19743d30ef | ||
![]() |
3c2b720e20 | ||
![]() |
5a052e4b22 | ||
![]() |
4ccf6824a6 | ||
![]() |
508c8b0b97 | ||
![]() |
0d21994291 | ||
![]() |
f3577c7e78 | ||
![]() |
395674d302 | ||
![]() |
5e66647495 | ||
![]() |
1113503a23 | ||
![]() |
f12496f5ad | ||
![]() |
d44d553818 | ||
![]() |
67d91aaf6c | ||
![]() |
dd08747edb | ||
![]() |
76d6e7cf46 | ||
![]() |
d2b4213e9b | ||
![]() |
44418d7618 | ||
![]() |
e91bf7d422 | ||
![]() |
a73b5a9199 | ||
![]() |
fe943fef85 | ||
![]() |
473dd627fe | ||
![]() |
dc8dcc35dd | ||
![]() |
80c00a86b0 | ||
![]() |
35c639e7c9 | ||
![]() |
05cc5c72f8 | ||
![]() |
dc1b138dd7 | ||
![]() |
b497faa0b9 | ||
![]() |
e867433f9c | ||
![]() |
33eb58f33c | ||
![]() |
915c440cdd | ||
![]() |
d21c92683d | ||
![]() |
fe7ba6d38d | ||
![]() |
b3548bf1df | ||
![]() |
d4b8b3bb35 | ||
![]() |
d6a0d86e24 | ||
![]() |
20f1c29055 | ||
![]() |
d8e7b35ec3 | ||
![]() |
ccc5a995af | ||
![]() |
b46ee47e06 | ||
![]() |
b11b06fad5 | ||
![]() |
20af88fdd2 | ||
![]() |
9a70fe7c0f | ||
![]() |
603640b3cb | ||
![]() |
5b06ce9699 | ||
![]() |
363fc6c7c1 | ||
![]() |
7f43f8b5c5 | ||
![]() |
a117e6e110 | ||
![]() |
c1f576e343 | ||
![]() |
c62f3f1bea | ||
![]() |
0e339c0f51 | ||
![]() |
c20975cfca | ||
![]() |
f43c40e317 | ||
![]() |
ed5f91f299 | ||
![]() |
0031100219 | ||
![]() |
f9e7d362b7 | ||
![]() |
8d9d308c68 | ||
![]() |
3eaec5ed73 | ||
![]() |
1dad84b65e | ||
![]() |
1ae377e665 | ||
![]() |
02fa0a4134 | ||
![]() |
a730aa3f92 | ||
![]() |
d3b12207e0 | ||
![]() |
befea40f61 | ||
![]() |
cc1ca5b092 | ||
![]() |
af77c09415 | ||
![]() |
2968d1dbfa | ||
![]() |
db96ece15f | ||
![]() |
c0347ed706 | ||
![]() |
ad408dfb53 | ||
![]() |
a2e963b53e | ||
![]() |
953da400be | ||
![]() |
165765e0eb | ||
![]() |
f5f88a61b0 | ||
![]() |
2f33574d5c | ||
![]() |
afd93d6871 | ||
![]() |
b7affa477f | ||
![]() |
4f317322fc | ||
![]() |
8ba0c3937d | ||
![]() |
4fd636090e | ||
![]() |
96332c9986 | ||
![]() |
486a17d4b2 | ||
![]() |
6cde3be042 | ||
![]() |
b3056e9d80 | ||
![]() |
cd23d625e1 | ||
![]() |
e7749cb95d | ||
![]() |
13f9f6d744 | ||
![]() |
df51422e42 | ||
![]() |
6e6540698b | ||
![]() |
445bf47e38 | ||
![]() |
322e1426d7 | ||
![]() |
9ff752b652 | ||
![]() |
95cba7166e | ||
![]() |
ba4354ad59 | ||
![]() |
69fd92f4a0 | ||
![]() |
73608ed6e6 | ||
![]() |
5a756a0f00 | ||
![]() |
b13a3d4866 | ||
![]() |
57973b7210 | ||
![]() |
f30470e46f | ||
![]() |
7c6dc87cf4 | ||
![]() |
4756226a56 | ||
![]() |
5746ef4569 | ||
![]() |
ad745a9cc1 | ||
![]() |
334da43001 | ||
![]() |
d83abd7c83 | ||
![]() |
cd24504131 | ||
![]() |
e8921350fd | ||
![]() |
3765154f60 | ||
![]() |
8be7a931eb | ||
![]() |
41c0394c4a | ||
![]() |
d2a84f554b | ||
![]() |
d1e3e27f20 | ||
![]() |
f9242bfc9a | ||
![]() |
bf37eb61bb | ||
![]() |
6fd1513d6b | ||
![]() |
394d75e5a2 | ||
![]() |
378e9168b6 | ||
![]() |
a3fa570b50 | ||
![]() |
5623d2d341 | ||
![]() |
3d9b203760 | ||
![]() |
498a8ae458 | ||
![]() |
e3571ae39f | ||
![]() |
261c87a42d | ||
![]() |
9b8d6ad46b | ||
![]() |
482f289df3 | ||
![]() |
28ab4e2859 | ||
![]() |
0db31c07ba | ||
![]() |
87dea88e36 | ||
![]() |
5779f195f8 | ||
![]() |
c55183b10c | ||
![]() |
1204f295e1 | ||
![]() |
fbd6ed9cf4 | ||
![]() |
7662d1c153 | ||
![]() |
ac7b5bb1a2 | ||
![]() |
eeae184e7e | ||
![]() |
fd0cb05812 | ||
![]() |
39b6c0ec89 | ||
![]() |
3b3ddbc8c9 | ||
![]() |
d5f34ad618 | ||
![]() |
3ad1863a5f | ||
![]() |
291080aa15 | ||
![]() |
38aee09f87 | ||
![]() |
89c4d00091 | ||
![]() |
4f57678012 | ||
![]() |
32d3960e03 | ||
![]() |
39b16318f9 | ||
![]() |
9afb1751a6 | ||
![]() |
973a0ff94f | ||
![]() |
e04ea7f035 | ||
![]() |
ecbaf639a0 | ||
![]() |
b31e55d8ca | ||
![]() |
80129470d7 | ||
![]() |
7b03e8302a | ||
![]() |
4d321dde84 | ||
![]() |
b3a495ff6a | ||
![]() |
a49b6cbfe0 | ||
![]() |
274a7135e7 | ||
![]() |
00d0871809 | ||
![]() |
bc252041d3 | ||
![]() |
48165364d1 | ||
![]() |
e98f62149d | ||
![]() |
02f2d4f0bc | ||
![]() |
f6bece28ac | ||
![]() |
559f1c58ba | ||
![]() |
4bb814308b | ||
![]() |
05a9fc5275 | ||
![]() |
74d5239898 | ||
![]() |
948141d5a9 | ||
![]() |
bca31f9079 | ||
![]() |
23892192b9 | ||
![]() |
e1b48fb6c5 | ||
![]() |
6dc042e0ec | ||
![]() |
53a74cc9ea | ||
![]() |
1ac91f5c1e | ||
![]() |
e0e001c417 | ||
![]() |
fb7017a857 | ||
![]() |
050fd46d81 | ||
![]() |
d4ea79b950 | ||
![]() |
06a40a4298 | ||
![]() |
35835d746e | ||
![]() |
5f3d03ba7d | ||
![]() |
1d372ff9ae | ||
![]() |
4a1e398755 | ||
![]() |
c01a739b9d | ||
![]() |
107be6d6ad | ||
![]() |
19db567a7d | ||
![]() |
b14add854e | ||
![]() |
104d9fa283 | ||
![]() |
dd041e5d78 | ||
![]() |
2f019ae176 | ||
![]() |
7f8ee8d6de | ||
![]() |
b5b4fbd3f5 | ||
![]() |
548dcf74ed | ||
![]() |
547bf894c6 | ||
![]() |
c90d8549b4 | ||
![]() |
f3d97fc94b | ||
![]() |
8f8c3c6c97 | ||
![]() |
61200c37be | ||
![]() |
ebee402c84 | ||
![]() |
0a7a26d3cd | ||
![]() |
09e6429726 | ||
![]() |
3ad9bb262e | ||
![]() |
15992da22f | ||
![]() |
7fb4e665f9 | ||
![]() |
6a82889926 | ||
![]() |
7272cc4e5b | ||
![]() |
1f7d112a8a | ||
![]() |
936e214015 | ||
![]() |
46e95d1b1f | ||
![]() |
6410eda84e | ||
![]() |
c91c9c9887 | ||
![]() |
6450faa556 | ||
![]() |
15173f7af3 | ||
![]() |
6f3b6c40af | ||
![]() |
42ffba69e5 | ||
![]() |
f021e8a1a3 | ||
![]() |
02ce7dedb0 | ||
![]() |
8e290cd5e6 | ||
![]() |
37f2aa5f1b | ||
![]() |
10cc69940b | ||
![]() |
bfdff9ff2f | ||
![]() |
12c6129a61 | ||
![]() |
ea10d1b540 | ||
![]() |
81f6ff592e | ||
![]() |
e6f22e9212 | ||
![]() |
8ce8f383fa | ||
![]() |
35d32b384f | ||
![]() |
85e86ddf05 | ||
![]() |
99bf804625 | ||
![]() |
261259e61e | ||
![]() |
9aaf3433bd | ||
![]() |
b739510951 | ||
![]() |
903359d9a2 | ||
![]() |
69e7e72ed8 | ||
![]() |
a96ba362b4 | ||
![]() |
6447bcf924 | ||
![]() |
18ed325731 | ||
![]() |
16e3d10b63 | ||
![]() |
8b0e8b00ae | ||
![]() |
7f61ff1470 | ||
![]() |
c4e0c23a0c | ||
![]() |
c7d26bbc3d | ||
![]() |
4968bbaeae | ||
![]() |
8e6b06e366 | ||
![]() |
ae7fb2984a | ||
![]() |
a4d009f8fb | ||
![]() |
5a549e9652 | ||
![]() |
e2d71ae088 | ||
![]() |
506d2619f2 | ||
![]() |
17fa805a7f | ||
![]() |
1dcf8cd007 | ||
![]() |
d86d50212e | ||
![]() |
af2e09c02a | ||
![]() |
de6361b19b |
1
.gitignore
vendored
@@ -96,6 +96,7 @@ local.properties
|
||||
|
||||
## 忽略模块应用编译配置
|
||||
/settings.gradle
|
||||
/gradle.properties
|
||||
|
||||
## 忽略 srv 纠结问题
|
||||
/srv/
|
||||
|
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
||||
[submodule "winboll-x"]
|
||||
path = winboll-x
|
||||
url = https://gitea.winboll.cc/Studio/WinBollX.git
|
||||
[submodule "libjc/jcc/libs"]
|
||||
path = libjc/jcc/libs
|
||||
url = https://gitea.winboll.cc/Studio/APP_libjc_jcc_libs.git
|
||||
|
@@ -1,4 +1,4 @@
|
||||
## WinBoll 主机编译事项提醒
|
||||
## WinBoLL 主机编译事项提醒
|
||||
|
||||
## 类库类型源码发布
|
||||
# 类库发布使用以下面命令
|
||||
|
@@ -37,7 +37,7 @@ fi
|
||||
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||
## 设新的 WinBoll 标签
|
||||
## 设新的 WinBoLL 标签
|
||||
# 脚本调试时使用
|
||||
#tag="v7.6.4-test1"
|
||||
# 正式设置标签时使用
|
||||
|
@@ -38,24 +38,24 @@ function askAddWorkflowsTag {
|
||||
fi
|
||||
}
|
||||
|
||||
function addWinBollTag {
|
||||
function addWinBoLLTag {
|
||||
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
||||
# 如果文件中有 publishVersion 这一项,
|
||||
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||
## 设新的 WinBoll 标签
|
||||
## 设新的 WinBoLL 标签
|
||||
# 脚本调试时使用
|
||||
#tag="projectname-v7.6.4-test1"
|
||||
# 正式设置标签时使用
|
||||
tag=$1"-v"${PUBLISH_VERSION}
|
||||
echo "< WinBoll Tag To: $tag >";
|
||||
# 检查是否已经添加了 WinBoll Tag
|
||||
echo "< WinBoLL Tag To: $tag >";
|
||||
# 检查是否已经添加了 WinBoLL Tag
|
||||
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
||||
echo -e "< WinBoll Tag ${tag} exist! >"
|
||||
return 1 # WinBoll标签重复
|
||||
echo -e "< WinBoLL Tag ${tag} exist! >"
|
||||
return 1 # WinBoLL标签重复
|
||||
fi
|
||||
# 添加WinBoll标签
|
||||
# 添加WinBoLL标签
|
||||
git tag -a ${tag} -F $1/app_update_description.txt
|
||||
return 0
|
||||
}
|
||||
@@ -119,22 +119,22 @@ if [[ $? -eq 0 ]]; then
|
||||
echo $result
|
||||
|
||||
# 发布应用
|
||||
echo "Publishing WinBoll APK ..."
|
||||
echo "Publishing WinBoLL APK ..."
|
||||
# 脚本调试时使用
|
||||
#bash gradlew :$1:assembleBetaDebug
|
||||
# 正式发布
|
||||
bash gradlew :$1:assembleStageRelease
|
||||
echo "Publishing WinBoll APK OK."
|
||||
echo "Publishing WinBoLL APK OK."
|
||||
|
||||
# 添加 WinBoll 标签
|
||||
result=$(addWinBollTag $1)
|
||||
# 添加 WinBoLL 标签
|
||||
result=$(addWinBoLLTag $1)
|
||||
echo $result
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo $result
|
||||
# WinBoll 标签添加成功
|
||||
# WinBoLL 标签添加成功
|
||||
else
|
||||
echo -e "${0}: addWinBollTag $1\n${result}\nAdd WinBoll tag cancel."
|
||||
exit 1 # addWinBollTag 异常
|
||||
echo -e "${0}: addWinBoLLTag $1\n${result}\nAdd WinBoLL tag cancel."
|
||||
exit 1 # addWinBoLLTag 异常
|
||||
fi
|
||||
|
||||
# 添加 GitHub 工作流标签
|
||||
|
@@ -38,24 +38,24 @@ function askAddWorkflowsTag {
|
||||
fi
|
||||
}
|
||||
|
||||
function addWinBollTag {
|
||||
function addWinBoLLTag {
|
||||
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
||||
# 如果文件中有 publishVersion 这一项,
|
||||
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||
## 设新的 WinBoll 标签
|
||||
## 设新的 WinBoLL 标签
|
||||
# 脚本调试时使用
|
||||
#tag="v7.6.4-test1"
|
||||
# 正式调试版设置标签时使用
|
||||
tag=$1"-v"${PUBLISH_VERSION}"-debug"
|
||||
echo "< WinBoll Tag To: $tag >";
|
||||
# 检查是否已经添加了 WinBoll Tag
|
||||
echo "< WinBoLL Tag To: $tag >";
|
||||
# 检查是否已经添加了 WinBoLL Tag
|
||||
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
||||
echo -e "< WinBoll Tag ${tag} exist! >"
|
||||
return 1 # WinBoll标签重复
|
||||
echo -e "< WinBoLL Tag ${tag} exist! >"
|
||||
return 1 # WinBoLL标签重复
|
||||
fi
|
||||
# 添加WinBoll标签
|
||||
# 添加WinBoLL标签
|
||||
git tag -a ${tag} -F $1/app_update_description.txt
|
||||
return 0
|
||||
}
|
||||
@@ -119,22 +119,22 @@ if [[ $? -eq 0 ]]; then
|
||||
echo $result
|
||||
|
||||
# 发布应用
|
||||
echo "Publishing WinBoll Debug APK ..."
|
||||
echo "Publishing WinBoLL Debug APK ..."
|
||||
# 脚本调试时使用
|
||||
#bash gradlew :$1:assembleBetaDebug
|
||||
# 正式发布调试版
|
||||
bash gradlew :$1:assembleStageDebug
|
||||
echo "Publishing WinBoll Debug APK OK."
|
||||
echo "Publishing WinBoLL Debug APK OK."
|
||||
|
||||
# 添加 WinBoll 标签
|
||||
result=$(addWinBollTag $1)
|
||||
# 添加 WinBoLL 标签
|
||||
result=$(addWinBoLLTag $1)
|
||||
echo $result
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo $result
|
||||
# WinBoll 标签添加成功
|
||||
# WinBoLL 标签添加成功
|
||||
else
|
||||
echo -e "${0}: addWinBollTag $1\n${result}\nAdd WinBoll tag cancel."
|
||||
exit 1 # addWinBollTag 异常
|
||||
echo -e "${0}: addWinBoLLTag $1\n${result}\nAdd WinBoLL tag cancel."
|
||||
exit 1 # addWinBoLLTag 异常
|
||||
fi
|
||||
|
||||
# 添加 GitHub 工作流标签
|
||||
|
@@ -8,7 +8,7 @@ if [ -z "$1" ]; then
|
||||
fi
|
||||
|
||||
## 正式发布使用
|
||||
git pull && bash gradlew :$1:publishReleasePublicationToWinBollReleaseRepository && bash .winboll/bashCommitLibReleaseBuildFlagInfo.sh $1
|
||||
git pull && bash gradlew :$1:publishReleasePublicationToWinBoLLReleaseRepository && bash .winboll/bashCommitLibReleaseBuildFlagInfo.sh $1
|
||||
|
||||
## 调试使用
|
||||
#bash gradlew :$1:publishSnapshotWinBollPublicationToWinBollSnapshotRepository && bash .winboll/bashCommitLibReleaseBuildFlagInfo.sh $1
|
||||
#bash gradlew :$1:publishSnapshotWinBoLLPublicationToWinBoLLSnapshotRepository && bash .winboll/bashCommitLibReleaseBuildFlagInfo.sh $1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// WinBoll 应用签名配置
|
||||
// WinBoLL 应用签名配置
|
||||
//
|
||||
|
||||
android {
|
||||
@@ -31,18 +31,18 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "WinBollApp"
|
||||
flavorDimensions "WinBoLLApp"
|
||||
productFlavors {
|
||||
beta {
|
||||
// 检查编译标志位配置
|
||||
assert (winbollBuildProps['buildCount'] != null)
|
||||
dimension "WinBollApp"
|
||||
dimension "WinBoLLApp"
|
||||
applicationIdSuffix ".beta"
|
||||
LocalDateTime localDateTimeNow = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
||||
versionNameSuffix "-beta" + winbollBuildProps['buildCount'] + "_" + localDateTimeNow.format('mmss')
|
||||
}
|
||||
stage {
|
||||
dimension "WinBollApp"
|
||||
dimension "WinBoLLApp"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ android {
|
||||
}
|
||||
|
||||
//
|
||||
// WinBoll 应用包输出配置
|
||||
// WinBoLL 应用包输出配置
|
||||
// 1. 配置 Stage Release 版应用包输出
|
||||
// 2. 配置 Beta Debug 版应用包输出
|
||||
//
|
||||
@@ -74,13 +74,13 @@ android {
|
||||
//def outputFileName="${rootProject.name}_${versionName}.apk"
|
||||
def outputFileName=project.rootDir.name + "_${versionName}.apk"
|
||||
|
||||
// 创建 WinBoll Studio 发布接口文件夹
|
||||
File fWinBollStudioDir = file("/sdcard/WinBollStudio/APKs");
|
||||
if(!fWinBollStudioDir.exists()) {
|
||||
//fWinBollStudioDir.mkdirs();
|
||||
// 创建 WinBoLL Studio 发布接口文件夹
|
||||
File fWinBoLLStudioDir = file("/sdcard/WinBoLLStudio/APKs");
|
||||
if(!fWinBoLLStudioDir.exists()) {
|
||||
//fWinBoLLStudioDir.mkdirs();
|
||||
// 如果没有发布接口文件就不用进行APK发布和源码管理操作
|
||||
// 当前编译环境不是 WinBoll 主机, 以下将忽略APK发布和源码管理操作。
|
||||
println 'The current compilation environment is not in WinBoll host, and the following APK publishing and source management operations will be ignore.'
|
||||
// 当前编译环境不是 WinBoLL 主机, 以下将忽略APK发布和源码管理操作。
|
||||
println 'The current compilation environment is not in WinBoLL host, and the following APK publishing and source management operations will be ignore.'
|
||||
} else {
|
||||
/// WINBOLL 主机的 APK 发布和源码管理操作 ///
|
||||
variant.getAssembleProvider().get().doFirst {
|
||||
@@ -91,15 +91,15 @@ android {
|
||||
//
|
||||
variant.getAssembleProvider().get().doLast {
|
||||
variant.outputs.forEach{ file->
|
||||
// 如果正在调试,就拷贝到 WinBoll 备份管理文件夹
|
||||
// 如果正在调试,就拷贝到 WinBoLL 备份管理文件夹
|
||||
//
|
||||
if(variant.flavorName == "beta"&&variant.buildType.name == "debug"){
|
||||
//File outBuildBckDir = new File(fWinBollStudioDir, "/${rootProject.name}/${variant.buildType.name}")
|
||||
File outBuildBckDir = new File(fWinBollStudioDir, "/" + project.rootDir.name + "/${variant.buildType.name}")
|
||||
//File outBuildBckDir = new File(fWinBoLLStudioDir, "/${rootProject.name}/${variant.buildType.name}")
|
||||
File outBuildBckDir = new File(fWinBoLLStudioDir, "/" + project.rootDir.name + "/${variant.buildType.name}")
|
||||
// 创建目标路径目录
|
||||
if(!outBuildBckDir.exists()) {
|
||||
outBuildBckDir.mkdirs();
|
||||
println "Output Folder Created.(WinBollStudio) : " + outBuildBckDir.getAbsolutePath()
|
||||
println "Output Folder Created.(WinBoLLStudio) : " + outBuildBckDir.getAbsolutePath()
|
||||
}
|
||||
if(outBuildBckDir.exists()) {
|
||||
copy{
|
||||
@@ -108,7 +108,7 @@ android {
|
||||
rename {
|
||||
String fileName -> "${outputFileName}"
|
||||
}
|
||||
println "Output APK (WinBollStudio): " + outBuildBckDir.getAbsolutePath() + "/${outputFileName}"
|
||||
println "Output APK (WinBoLLStudio): " + outBuildBckDir.getAbsolutePath() + "/${outputFileName}"
|
||||
}
|
||||
// 检查编译标志位配置
|
||||
assert (winbollBuildProps['buildCount'] != null)
|
||||
@@ -137,7 +137,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
// 如果正在发布,就拷贝到 WinBoll 标签管理文件夹
|
||||
// 如果正在发布,就拷贝到 WinBoLL 标签管理文件夹
|
||||
//
|
||||
if((variant.flavorName == "stage"&&variant.buildType.name == "debug")
|
||||
|| (variant.flavorName == "stage"&&variant.buildType.name == "release")){
|
||||
@@ -151,8 +151,8 @@ android {
|
||||
String szCommonTagAPKName = project.rootDir.name + "_" + szShortVersionName + ".apk"
|
||||
println "CommonTagAPKName is : " + szCommonTagAPKName
|
||||
|
||||
//File outTagDir = new File(fWinBollStudioDir, "/${rootProject.name}/tag/")
|
||||
File outTagDir = new File(fWinBollStudioDir, "/" + project.rootDir.name + "/tag/")
|
||||
//File outTagDir = new File(fWinBoLLStudioDir, "/${rootProject.name}/tag/")
|
||||
File outTagDir = new File(fWinBoLLStudioDir, "/" + project.rootDir.name + "/tag/")
|
||||
// 创建目标路径目录
|
||||
if(!outTagDir.exists()) {
|
||||
outTagDir.mkdirs();
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// 本机和 WinBoll Maven 仓库传输配置。
|
||||
// 本机和 WinBoLL Maven 仓库传输配置。
|
||||
//
|
||||
|
||||
def getDefaultVersion(){
|
||||
@@ -9,12 +9,12 @@ def getDefaultVersion(){
|
||||
}
|
||||
|
||||
def siteUrl = 'https://winboll.cc/?page=studio/details.php&app=${rootProject.name}' // 项目主页
|
||||
def gitUrl = 'https://gitea.winboll.cc/WinBoll/${rootProject.name}' // 项目的git地址
|
||||
def gitUrl = 'https://gitea.winboll.cc/WinBoLL/${rootProject.name}' // 项目的git地址
|
||||
def DefaultGroupId = 'cc.winboll.studio' // 类库所有者groupId
|
||||
def DefaultVersion = getDefaultVersion() // 版本号
|
||||
def DeveloperId='zhangsken' // 开发者账号
|
||||
def DeveloperName='ZhanGSKen' // 开发者名称
|
||||
def DeveloperEMail='ZhanGSKen@QQ.COM' // 开发者邮箱地址
|
||||
def DeveloperEMail='zhangsken@188.com' // 开发者邮箱地址
|
||||
def LicenseName='The Apache Software License, Version 2.0'
|
||||
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
|
||||
@@ -27,10 +27,10 @@ afterEvaluate {
|
||||
properties.load(file("${RootProjectDir}/${winbollFilePath}").newDataInputStream())
|
||||
def NexusUserName = properties.getProperty("Nexus.name")
|
||||
def NexusPassword = properties.getProperty("Nexus.password")
|
||||
// WinBoll Release 仓库
|
||||
// WinBoLL Release 仓库
|
||||
maven{
|
||||
//仓库的名字和地址
|
||||
name = "WinBollRelease"
|
||||
name = "WinBoLLRelease"
|
||||
url="https://nexus.winboll.cc/repository/maven-releases/"
|
||||
// 仓库用户名密码
|
||||
credentials {
|
||||
@@ -38,10 +38,10 @@ afterEvaluate {
|
||||
password = NexusPassword
|
||||
}
|
||||
}
|
||||
// WinBoll Snapshot 仓库
|
||||
// WinBoLL Snapshot 仓库
|
||||
maven{
|
||||
//仓库的名字和地址
|
||||
name = "WinBollSnapshot"
|
||||
name = "WinBoLLSnapshot"
|
||||
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
||||
// 仓库用户名密码
|
||||
credentials {
|
||||
@@ -101,9 +101,9 @@ afterEvaluate {
|
||||
}
|
||||
}
|
||||
|
||||
// WinBoll Maven Release 仓库传输任务
|
||||
// WinBoLL Maven Release 仓库传输任务
|
||||
//
|
||||
releaseWinBoll(MavenPublication) {
|
||||
releaseWinBoLL(MavenPublication) {
|
||||
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||
//from components.free
|
||||
|
||||
@@ -154,9 +154,9 @@ afterEvaluate {
|
||||
|
||||
} // 创建名为 release 的任务结束
|
||||
|
||||
// WinBoll Maven Snapshot 仓库传输任务
|
||||
// WinBoLL Maven Snapshot 仓库传输任务
|
||||
//
|
||||
snapshotWinBoll(MavenPublication) {
|
||||
snapshotWinBoLL(MavenPublication) {
|
||||
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||
//from components.free
|
||||
|
||||
|
127
README.md
@@ -1,23 +1,23 @@
|
||||
# ☁ ☁ ☁ WinBoll APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
# ☁ ☁ 这是 WinBoll 系列 APP 汇总项目。☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
# ☁ ☁ ☁ WinBoll 网站地址 https://www.winboll.cc/studio/app/ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
# ☁ ☁ ☁ WinBoLL APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
# ☁ ☁ WinBoLL Studio Android 应用开源项目。☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
# ☁ ☁ ☁ WinBoLL 网站地址 https://www.winboll.cc/ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||
|
||||
## WinBoll 提问
|
||||
## WinBoLL 提问
|
||||
同样是 /sdcard 目录,在开发 Android 应用时,
|
||||
能否实现手机编译与电脑编译的源码同步。
|
||||
☁因而 WinBoll 项目组诞生了。
|
||||
☁因而 WinBoLL 项目组诞生了。
|
||||
|
||||
## WinBoll 项目组研发计划
|
||||
致力于把 WinBoll-APP 应用在手机端 Android 项目开发。
|
||||
也在探索 https://gitea.winboll.cc/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP APK 分发。
|
||||
更想进阶 https://github.com/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP Beta APK 分发。
|
||||
## WinBoLL 项目组研发计划
|
||||
致力于把 WinBoLL-APP 应用在手机端 Android 项目开发。
|
||||
也在探索 https://gitea.winboll.cc/<WinBoLL 项目组>/APP.git 应用于 WinBoLL-APP APK 分发。
|
||||
更想进阶 https://github.com/<WinBoLL 项目组>/APP.git 应用于 WinBoLL-APP Beta APK 分发。
|
||||
|
||||
## WinBoll-APP 汗下...
|
||||
## WinBoLL-APP 汗下...
|
||||
#### ☁应用何置如此呢。且观用户云云。
|
||||
|
||||
#### ☁ 正当下 ☁ ###
|
||||
#### ☁ 且容傻家叙说 ☁ WinBoll-APP 应用场景
|
||||
### ☁ WinBoll 设备资源概述
|
||||
#### ☁ 且容傻家叙说 ☁ WinBoLL-APP 应用场景
|
||||
### ☁ WinBoLL 设备资源概述
|
||||
#### ☁ 1. Raid Disk.
|
||||
概述:这是一个矩阵存储类设备。
|
||||
优点:该设备具有数据容错存储功能,
|
||||
@@ -40,74 +40,79 @@
|
||||
设备位于操作系统内部文件系统。
|
||||
数据持久性与操作系统挂钩。
|
||||
|
||||
#### ☁ 4. WinBoll 用户资源概述。
|
||||
1> /home/<用户名> 位于 WinBoll 操作系统目录下。
|
||||
#### ☁ 4. WinBoLL 用户资源概述。
|
||||
1> /home/<用户名> 位于 WinBoLL 操作系统目录下。
|
||||
2> /rdisk/<用户名> 挂载用户 Raid Disk.
|
||||
3> /data/<用户名> 挂载用户 Data Disk.
|
||||
4> /sdcard/<用户名> 挂载用户 SSD Disk.
|
||||
|
||||
#### ☁ 5. WinBoll-APP 用户资源概述。
|
||||
#### ☁ 5. WinBoLL-APP 用户资源概述。
|
||||
1> /sdcard 挂载用户手机 SD 存储/storage/emulated/0
|
||||
|
||||
### ☁ 稍稍歇 ☁ ###
|
||||
### ☁ 急急停 ☁ WinBoll 应用前置条件
|
||||
☁ WinBoll 主机建立 1Panel MySQL 应用。
|
||||
☁ WinBoll 主机建立 1Panel Gitea 应用。
|
||||
☁ WinBoll 主机设置 WinBoll 应用为非登录状态。
|
||||
☁ WinBoll 主机建立 WinBoll 账户与 WinBoll 用户组。
|
||||
☁ WinBoll 账户 User ID 为: winboll。
|
||||
☁ WinBoll 用户组 Group ID 为: winboll。
|
||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 建立 WinBoll 工作组。
|
||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/<用户名>/WinBoll/app/
|
||||
☁ WinBoll 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/winboll.properties-demo"(WinBoll 项目已设置)
|
||||
☁ WinBoll 项目配置文件为 "<WinBoll 项目根目录>/.winboll/winboll.properties"
|
||||
☁ WinBoll 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
||||
☁ Gradle 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/local.properties-demo"(WinBoll 项目已设置)
|
||||
☁ Gradle 项目配置文件为 "<WinBoll 项目根目录>/local.properties"(WinBoll 项目已设置)
|
||||
☁ Gradle 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
||||
### ☁ 急急停 ☁ WinBoLL 应用前置条件
|
||||
☁ WinBoLL 主机建立 1Panel MySQL 应用。
|
||||
☁ WinBoLL 主机建立 1Panel Gitea 应用。
|
||||
☁ WinBoLL 主机设置 WinBoLL 应用为非登录状态。
|
||||
☁ WinBoLL 主机建立 WinBoLL 账户与 WinBoLL 用户组。
|
||||
☁ WinBoLL 账户 User ID 为: J。
|
||||
☁ WinBoLL 用户组 Group ID 为: Studio。
|
||||
☁ WinBoLL 主机 WinBoLL 1Panel Gitea 建立 WinBoLL 工作组。
|
||||
☁ WinBoLL 主机 WinBoLL 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/WinBoLLStudio/<用户名>/APKs/
|
||||
☁ WinBoLL 项目配置文件示例为 "<WinBoLL 项目根目录>/.winboll/winboll.properties-demo"(WinBoLL 项目已设置)
|
||||
☁ WinBoLL 项目配置文件为 "<WinBoLL 项目根目录>/.winboll/winboll.properties"
|
||||
☁ WinBoLL 项目配置文件设定为源码提交时忽略。(WinBoLL 项目已设置)
|
||||
☁ Gradle 项目配置文件示例为 "<WinBoLL 项目根目录>/.winboll/local.properties-demo"(WinBoLL 项目已设置)
|
||||
☁ Gradle 项目配置文件为 "<WinBoLL 项目根目录>/local.properties"(WinBoLL 项目已设置)
|
||||
☁ Gradle 项目配置文件设定为源码提交时忽略。(WinBoLL 项目已设置)
|
||||
|
||||
### ☁ 登高处 ☁ WinBoll 应用需求规划
|
||||
☁ WinBoll 主机建立 WinBoll 客户端用户数据库为 MySQL winbollclient 数据库。
|
||||
☁ WinBoll 主机设置 WinBoll 客户端用户信息存储在 winbollclient 数据库中。
|
||||
### ☁ 登高处 ☁ WinBoLL 应用需求规划
|
||||
☁ WinBoLL 主机建立 WinBoLL 客户端用户数据库为 MySQL winbollclient 数据库。
|
||||
☁ WinBoLL 主机设置 WinBoLL 客户端用户信息存储在 winbollclient 数据库中。
|
||||
☁ MySQL winbollclient 数据库中
|
||||
WinBoll 客户端用户信息设定为:
|
||||
WinBoLL 客户端用户信息设定为:
|
||||
<用户名, 验证密码, 验证邮箱, 验证手机, 唯一存储令牌Token, 备用验证邮箱>。
|
||||
☁ WinBoll 项目源码仓库托管在 WinBoll 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/winboll/winboll.git中。
|
||||
☁ WinBoll 主机提供 WinBoll 1Panel Gitea 应用的 WinBoll 项目源码仓库存取功能。(Gitea 应用已提供)
|
||||
☁ WinBoll 主机提供 WinBoll Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
||||
☁ 提供 WinBoll 客户端用户登录功能。(Gitea 应用已提供)
|
||||
☁ WinBoLL 项目源码仓库托管在 WinBoLL 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/studio/app.git中。
|
||||
☁ WinBoLL 主机提供 WinBoLL 1Panel Gitea 应用的 WinBoLL 项目源码仓库存取功能。(Gitea 应用已提供)
|
||||
☁ WinBoLL 主机提供 WinBoLL Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
||||
☁ 提供 WinBoLL 客户端用户登录功能。(Gitea 应用已提供)
|
||||
|
||||
### ☁ 看远方 ☁ ###
|
||||
### ☁ 心忧虑 ☁ WinBoll-APP 应用前置需求
|
||||
☁ WinBoll-APP WinBoll 项目根目录设定为手机的 /sdcard/WinBoll 目录。(需要用户手动建立文件夹)
|
||||
☁ WinBoll-APP 具有手机 /sdcard/WinBoll 目录的存储权限。(需要手机操作系统授权)
|
||||
☁ WinBoll-APP WinBoll 项目仓库源码存储路径为 /sdcard/WinBoll/repositories/winboll.git(需要用户手动建立文件夹)
|
||||
☁ WinBoll-APP 项目 APK 编译输出目录为 /sdcard/WinBoll/app/
|
||||
☁ WinBoll-APP 应用签名验证可定制化。(WinBoll 项目已提供)
|
||||
☁ WinBoll-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoll 项目已提供)
|
||||
☁ WinBoll-APP 用户客户端信息存储在命名空间为 WinBoll APP MySQLLite 应用的 winbollappclient 数据库中。
|
||||
☁ WinBoll-APP MySQLLite 应用的 winbollappclient 数据库中,
|
||||
WinBoll 用户客户端信息设定为:
|
||||
### ☁ 心忧虑 ☁ WinBoLL-APP 应用前置需求
|
||||
☁ WinBoLL-APP WinBoLL 项目根目录设定为手机的 /sdcard/WinBoLLStudio/Sources 目录。(需要用户手动建立文件夹)
|
||||
☁ WinBoLL-APP 具有手机 /sdcard/WinBoLL 目录的存储权限。(需要手机操作系统授权)
|
||||
☁ WinBoLL-APP WinBoLL 项目仓库源码存储路径为 /sdcard/WinBoLLStudio/Sources/APP.git(需要用户手动建立文件夹)
|
||||
☁ WinBoLL-APP 项目 APK 编译输出目录为 /sdcard/WinBoLLStudio/APKs/
|
||||
☁ WinBoLL-APP 应用签名验证可定制化。(WinBoLL 项目已提供)
|
||||
☁ WinBoLL-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoLL 项目已提供)
|
||||
☁ WinBoLL-APP 用户客户端信息存储在命名空间为 WinBoLL APP MySQLLite 应用的 winbollappclient 数据库中。
|
||||
☁ WinBoLL-APP MySQLLite 应用的 winbollappclient 数据库中,
|
||||
WinBoLL 用户客户端信息设定为:
|
||||
<用户名, 唯一存储令牌Token>。
|
||||
|
||||
### ☁ 云游四方 ☁ ###
|
||||
### ☁ 呔! ☁ WinBoll-APP 应用需求规划
|
||||
☁ WinBoll-APP 提供手机目录 /sdcard/WinBoll 的 WinBoll 项目源码管理功能。
|
||||
### ☁ 呔! ☁ WinBoLL-APP 应用需求规划
|
||||
☁ 如要使用 WinBoLL Android 项目的 Gradle 编译功能,则需要设置以下两个文件夹。
|
||||
☁ 1. 则需要建立数据存储目录 /sdcard/WinBoLLStudio/APKs。
|
||||
WinBoLL 项目源码编译出来的安装包会拷贝一份到 /sdcard/WinBoLLStudio/APKs 目录下。
|
||||
☁ 2. 则需要建立数据存储目录 /sdcard/AppProjects。
|
||||
WinBoLL 项目源码编译出来的安装包会拷贝一份并命名 "app.apk" 的安装文件为到 /sdcard/AppProjects 目录下。
|
||||
|
||||
### ☁ 吁! ☁ WinBoll-APP 共享计划前景
|
||||
☁ WinBoll-APP 将会实现 https://winboll.cc/api 访问功能。
|
||||
☁ WinBoll-APP 将会实现手机端 Android 应用的开发与管理功能。
|
||||
|
||||
## ☁ WinBoll ☁ WinBoll 主机忧虑
|
||||
☁ WinBoll 将会提供 gitea.winboll.cc 域名用户注册登录功能。
|
||||
☁ WinBoll 将会提供 WinBoll-APP 及其衍生应用的 Gitea 仓库管理服务。
|
||||
☁ WinBoll 将会提供 winboll.cc 域名 WinBoll 项目组注册登录功能。
|
||||
### ☁ 吁! ☁ WinBoLL-APP 共享计划前景
|
||||
☁ WinBoLL-APP 将会实现 https://winboll.cc/api 访问功能。
|
||||
☁ WinBoLL-APP 将会实现手机端 Android 应用的开发与管理功能。
|
||||
|
||||
## ☁ WinBoLL ☁ WinBoLL 主机忧虑
|
||||
☁ WinBoLL 将会提供 gitea.winboll.cc 域名用户注册登录功能。
|
||||
☁ WinBoLL 将会提供 WinBoLL-APP 及其衍生应用的 Gitea 仓库管理服务。
|
||||
☁ WinBoLL 将会提供 winboll.cc 域名 WinBoLL 项目组注册登录功能。
|
||||
|
||||
# 本项目要实际运用需要注意以下几个步骤:
|
||||
# 在项目根目录下:
|
||||
## 1. 项目模块编译环境设置(必须),settings.gradle-demo 要复制为 settings.gradle,并取消相应项目模块的注释。
|
||||
## 2. 项目 Android SDK 编译环境设置(可选),local.properties-demo 要复制为 local.properties,并按需要设置 Android SDK 目录。
|
||||
## 3. 类库型模块编译环境设置(可选),winboll.properties-demo 要复制为 winboll.properties,并按需要设置 WinBoll Maven 库登录用户信息。
|
||||
## 3. 类库型模块编译环境设置(可选),winboll.properties-demo 要复制为 winboll.properties,并按需要设置 WinBoLL Maven 库登录用户信息。
|
||||
|
||||
|
||||
# ☆类库型项目编译方法
|
||||
@@ -116,12 +121,12 @@
|
||||
设置属性 libraryProject=<类库项目模块文件夹名称>
|
||||
### 再编译测试项目
|
||||
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
||||
#### 测试项目编译后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBollStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||
#### 测试项目编译后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBoLLStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||
### 最后编译类库项目
|
||||
$ bash .winboll/bashPublishLIBAddTag.sh <类库项目模块文件夹名称>
|
||||
#### 类库模块编译命令执行后,编译器会发布到 WinBoll Nexus Maven 库:Maven 库地址可以参阅根项目目录配置 build.gradle 文件。
|
||||
#### 类库模块编译命令执行后,编译器会发布到 WinBoLL Nexus Maven 库:Maven 库地址可以参阅根项目目录配置 build.gradle 文件。
|
||||
|
||||
# ☆应用型项目编译方法
|
||||
## 直接调用以下命令编译应用型项目
|
||||
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
||||
#### 应用模块编译命令执行后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBollStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||
#### 应用模块编译命令执行后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBoLLStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||
|
@@ -19,7 +19,7 @@ def genVersionName(def versionName){
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "33.0.3"
|
||||
buildToolsVersion "32.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cc.winboll.studio.aes"
|
||||
@@ -29,7 +29,7 @@ android {
|
||||
// versionName 更新后需要手动设置
|
||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "7.6"
|
||||
versionName "15.6"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
@@ -41,29 +41,9 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':libaes')
|
||||
|
||||
//api 'cc.winboll.studio:winboll-shared:1.6.5'
|
||||
api 'io.github.medyo:android-about-page:2.0.0'
|
||||
api 'com.github.getActivity:ToastUtils:10.5'
|
||||
api 'com.jcraft:jsch:0.1.55'
|
||||
api 'org.jsoup:jsoup:1.13.1'
|
||||
api 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
|
||||
api 'androidx.appcompat:appcompat:1.0.0'
|
||||
api 'androidx.fragment:fragment:1.0.0'
|
||||
api 'com.google.android.material:material:1.0.0'
|
||||
|
||||
api 'cc.winboll.studio:libapputils:9.2.1'
|
||||
api 'cc.winboll.studio:libappbase:1.0.3'
|
||||
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sun Jan 19 04:58:59 GMT 2025
|
||||
stageCount=3
|
||||
#Sun May 04 06:42:28 GMT 2025
|
||||
stageCount=1
|
||||
libraryProject=libaes
|
||||
baseVersion=7.6
|
||||
publishVersion=7.6.2
|
||||
buildCount=4
|
||||
baseBetaVersion=7.6.3
|
||||
baseVersion=15.6
|
||||
publishVersion=15.6.0
|
||||
buildCount=10
|
||||
baseBetaVersion=15.6.1
|
||||
|
@@ -8,9 +8,10 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/WinBoll.SupportThemeNoActionBar"
|
||||
android:theme="@style/MyAESTheme"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true">
|
||||
android:supportsRtl="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
@@ -30,6 +31,8 @@
|
||||
android:name="android.max_aspect"
|
||||
android:value="4.0"/>
|
||||
|
||||
<activity android:name=".AboutActivity"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
93
aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java
Normal file
@@ -0,0 +1,93 @@
|
||||
package cc.winboll.studio.aes;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/24 23:52:29
|
||||
* @Describe AES应用介绍窗口
|
||||
*/
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import cc.winboll.studio.libaes.winboll.APPInfo;
|
||||
import cc.winboll.studio.libaes.winboll.AboutView;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
|
||||
public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "AboutActivity";
|
||||
|
||||
Context mContext;
|
||||
Toolbar mToolbar;
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mContext = this;
|
||||
setContentView(R.layout.activity_about);
|
||||
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(mToolbar);
|
||||
mToolbar.setSubtitle(TAG);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
AboutView aboutView = CreateAboutView();
|
||||
// 在 Activity 的 onCreate 或其他生命周期方法中调用
|
||||
// LinearLayout layout = new LinearLayout(this);
|
||||
// layout.setOrientation(LinearLayout.VERTICAL);
|
||||
// // 创建布局参数(宽度和高度)
|
||||
// ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
|
||||
// ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
// ViewGroup.LayoutParams.MATCH_PARENT
|
||||
// );
|
||||
// addContentView(aboutView, params);
|
||||
|
||||
LinearLayout layout = findViewById(R.id.aboutviewroot_ll);
|
||||
// 创建布局参数(宽度和高度)
|
||||
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
layout.addView(aboutView, params);
|
||||
|
||||
GlobalApplication.getWinBoLLActivityManager().add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
GlobalApplication.getWinBoLLActivityManager().registeRemove(this);
|
||||
}
|
||||
|
||||
public AboutView CreateAboutView() {
|
||||
String szBranchName = "aes";
|
||||
APPInfo appInfo = new APPInfo();
|
||||
appInfo.setAppName("AES");
|
||||
appInfo.setAppIcon(cc.winboll.studio.libaes.R.drawable.ic_winboll);
|
||||
appInfo.setAppDescription("AES Description");
|
||||
appInfo.setAppGitName("APP");
|
||||
appInfo.setAppGitOwner("Studio");
|
||||
appInfo.setAppGitAPPBranch(szBranchName);
|
||||
appInfo.setAppGitAPPSubProjectFolder(szBranchName);
|
||||
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=AES");
|
||||
appInfo.setAppAPKName("AES");
|
||||
appInfo.setAppAPKFolderName("AES");
|
||||
//appInfo.setIsAddDebugTools(false);
|
||||
appInfo.setIsAddDebugTools(BuildConfig.DEBUG);
|
||||
return new AboutView(mContext, appInfo);
|
||||
}
|
||||
}
|
@@ -5,16 +5,27 @@ package cc.winboll.studio.aes;
|
||||
* @Date 2024/06/13 19:03:58
|
||||
* @Describe AES应用类
|
||||
*/
|
||||
import android.view.Gravity;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.hjq.toast.style.WhiteToastStyle;
|
||||
|
||||
|
||||
public class App extends GlobalApplication {
|
||||
|
||||
|
||||
public static final String TAG = "App";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//setIsDebug(BuildConfig.DEBUG);
|
||||
|
||||
// 初始化 Toast 框架
|
||||
ToastUtils.init(this);
|
||||
// 设置 Toast 布局样式
|
||||
//ToastUtils.setView(R.layout.view_toast);
|
||||
ToastUtils.setStyle(new WhiteToastStyle());
|
||||
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -5,12 +5,193 @@ package cc.winboll.studio.aes;
|
||||
* @Date 2024/06/13 19:05:52
|
||||
* @Describe 应用主窗口
|
||||
*/
|
||||
import cc.winboll.studio.libaes.unittests.LibraryActivity;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Toast;
|
||||
import cc.winboll.studio.aes.R;
|
||||
import cc.winboll.studio.libaes.activitys.DrawerFragmentActivity;
|
||||
import cc.winboll.studio.libaes.beans.DrawerMenuBean;
|
||||
import cc.winboll.studio.libaes.dialogs.LocalFileSelectDialog;
|
||||
import cc.winboll.studio.libaes.dialogs.StoragePathDialog;
|
||||
import cc.winboll.studio.libaes.unittests.SecondaryLibraryActivity;
|
||||
import cc.winboll.studio.libaes.unittests.TestAButtonFragment;
|
||||
import cc.winboll.studio.libaes.unittests.TestASupportToolbarActivity;
|
||||
import cc.winboll.studio.libaes.unittests.TestAToolbarActivity;
|
||||
import cc.winboll.studio.libaes.unittests.TestDrawerFragmentActivity;
|
||||
import cc.winboll.studio.libaes.unittests.TestViewPageFragment;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
import com.a4455jkjh.colorpicker.ColorPickerDialog;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MainActivity extends DrawerFragmentActivity implements IWinBoLLActivity {
|
||||
|
||||
|
||||
public class MainActivity extends LibraryActivity {
|
||||
|
||||
public static final String TAG = "MainActivity";
|
||||
|
||||
TestAButtonFragment mTestAButtonFragment;
|
||||
TestViewPageFragment mTestViewPageFragment;
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (mTestAButtonFragment == null) {
|
||||
mTestAButtonFragment = new TestAButtonFragment();
|
||||
addFragment(mTestAButtonFragment);
|
||||
}
|
||||
showFragment(mTestAButtonFragment);
|
||||
//setSubtitle(TAG);
|
||||
//ToastUtils.show("onCreate");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initDrawerMenuItemList(ArrayList<DrawerMenuBean> listDrawerMenu) {
|
||||
super.initDrawerMenuItemList(listDrawerMenu);
|
||||
LogUtils.d(TAG, "initDrawerMenuItemList");
|
||||
//listDrawerMenu.clear();
|
||||
// 添加抽屉菜单项
|
||||
listDrawerMenu.add(new DrawerMenuBean(R.drawable.ic_launcher, TestAButtonFragment.TAG));
|
||||
listDrawerMenu.add(new DrawerMenuBean(R.drawable.ic_launcher, TestViewPageFragment.TAG));
|
||||
notifyDrawerMenuDataChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reinitDrawerMenuItemList(ArrayList<DrawerMenuBean> listDrawerMenu) {
|
||||
super.reinitDrawerMenuItemList(listDrawerMenu);
|
||||
LogUtils.d(TAG, "reinitDrawerMenuItemList");
|
||||
//listDrawerMenu.clear();
|
||||
// 添加抽屉菜单项
|
||||
listDrawerMenu.add(new DrawerMenuBean(R.drawable.ic_launcher, TestAButtonFragment.TAG));
|
||||
listDrawerMenu.add(new DrawerMenuBean(R.drawable.ic_launcher, TestViewPageFragment.TAG));
|
||||
notifyDrawerMenuDataChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrawerFragmentActivity.ActivityType initActivityType() {
|
||||
return DrawerFragmentActivity.ActivityType.Main;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_library, menu);
|
||||
if(App.isDebuging()) {
|
||||
getMenuInflater().inflate(cc.winboll.studio.libapputils.R.menu.toolbar_studio_debug, menu);
|
||||
}
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
super.onItemClick(parent, view, position, id);
|
||||
switch (position) {
|
||||
case 0 : {
|
||||
if (mTestAButtonFragment == null) {
|
||||
mTestAButtonFragment = new TestAButtonFragment();
|
||||
addFragment(mTestAButtonFragment);
|
||||
}
|
||||
showFragment(mTestAButtonFragment);
|
||||
break;
|
||||
}
|
||||
case 1 : {
|
||||
if (mTestViewPageFragment == null) {
|
||||
mTestViewPageFragment = new TestViewPageFragment();
|
||||
addFragment(mTestViewPageFragment);
|
||||
}
|
||||
showFragment(mTestViewPageFragment);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int nItemId = item.getItemId();
|
||||
// if (item.getItemId() == R.id.item_log) {
|
||||
// WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(getApplicationContext(), LogActivity.class);
|
||||
// } else
|
||||
if (nItemId == R.id.item_atoast) {
|
||||
Toast.makeText(getApplication(), "item_testatoast", Toast.LENGTH_SHORT).show();
|
||||
} else if (nItemId == R.id.item_atoolbar) {
|
||||
Intent intent = new Intent(this, TestAToolbarActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
} else if (nItemId == R.id.item_asupporttoolbar) {
|
||||
Intent intent = new Intent(this, TestASupportToolbarActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
} else if (nItemId == R.id.item_colordialog) {
|
||||
ColorPickerDialog dlg = new ColorPickerDialog(this, getResources().getColor(R.color.colorPrimary));
|
||||
dlg.setOnColorChangedListener(new com.a4455jkjh.colorpicker.view.OnColorChangedListener() {
|
||||
|
||||
@Override
|
||||
public void beforeColorChanged() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onColorChanged(int color) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterColorChanged() {
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
dlg.show();
|
||||
|
||||
} else if (nItemId == R.id.item_dialogstoragepath) {
|
||||
final StoragePathDialog dialog = new StoragePathDialog(this, 0);
|
||||
dialog.setOnOKClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
|
||||
} else if (nItemId == R.id.item_localfileselectdialog) {
|
||||
final LocalFileSelectDialog dialog = new LocalFileSelectDialog(this);
|
||||
dialog.setOnOKClickListener(new LocalFileSelectDialog.OKClickListener() {
|
||||
@Override
|
||||
public void onOKClick(String sz) {
|
||||
Toast.makeText(getApplication(), sz, Toast.LENGTH_SHORT).show();
|
||||
//dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.open();
|
||||
|
||||
} else if (nItemId == R.id.item_secondarylibraryactivity) {
|
||||
Intent intent = new Intent(this, SecondaryLibraryActivity.class);
|
||||
startActivity(intent);
|
||||
} else if (nItemId == R.id.item_drawerfragmentactivity) {
|
||||
Intent intent = new Intent(this, TestDrawerFragmentActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
else if (nItemId == R.id.item_about) {
|
||||
Intent intent = new Intent(this, AboutActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -6,16 +6,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<cc.winboll.studio.libaes.views.ASupportToolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/activityassetshtmlToolbar1"/>
|
||||
android:id="@+id/toolbar"/>
|
||||
|
||||
<cc.winboll.studio.libapputils.view.SimpleWebView
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0"
|
||||
android:id="@+id/activityassetshtmlSimpleWebView1"/>
|
||||
android:id="@+id/aboutviewroot_ll"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<item
|
||||
android:id="@+id/item_localfileselectdialog"
|
||||
android:title="LocalFileSelectDialog"/>
|
||||
|
||||
|
||||
<item
|
||||
android:id="@+id/item_atoolbar"
|
||||
android:title="Test AToolbar"/>
|
7
aes/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#FF00B322</color>
|
||||
<color name="colorPrimaryDark">#FF005C12</color>
|
||||
<color name="colorAccent">#FF8DFFA2</color>
|
||||
<color name="colorText">#FFFFFB8D</color>
|
||||
</resources>
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<style name="MyAESTheme" parent="AESTheme">
|
||||
</style>
|
||||
</resources>
|
||||
|
6
aes/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">winboll.cc</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
1
androiddemo/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
72
androiddemo/build.gradle
Normal file
@@ -0,0 +1,72 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: '../.winboll/winboll_app_build.gradle'
|
||||
apply from: '../.winboll/winboll_lint_build.gradle'
|
||||
|
||||
def genVersionName(def versionName){
|
||||
// 检查编译标志位配置
|
||||
assert (winbollBuildProps['stageCount'] != null)
|
||||
assert (winbollBuildProps['baseVersion'] != null)
|
||||
// 保存基础版本号
|
||||
winbollBuildProps.setProperty("baseVersion", "${versionName}");
|
||||
//保存编译标志配置
|
||||
FileOutputStream fos = new FileOutputStream(winbollBuildPropsFile)
|
||||
winbollBuildProps.store(fos, "${winbollBuildPropsDesc}");
|
||||
fos.close();
|
||||
|
||||
// 返回编译版本号
|
||||
return "${versionName}." + winbollBuildProps['stageCount']
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "32.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cc.winboll.studio.androiddemo"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "15.0"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
// Android 类库
|
||||
//api 'com.android.support:appcompat-v7:28.0.0'
|
||||
api('com.android.support:appcompat-v7:28.0.0'){
|
||||
//exclude group: "com.android.support", module: "support-vector-drawable"
|
||||
exclude group: "com.android.support:animated-vector-drawable:28.0.0"
|
||||
}
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-compat
|
||||
api 'com.android.support:support-compat:28.0.0' // 保留原有依赖(可选)
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-v4
|
||||
api 'com.android.support:support-v4:28.0.0'
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-media-compat
|
||||
api 'com.android.support:support-media-compat:28.0.0'
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-core-utils
|
||||
api 'com.android.support:support-core-utils:28.0.0'
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
|
||||
api 'com.android.support:support-core-ui:28.0.0'
|
||||
// https://mvnrepository.com/artifact/com.android.support/support-fragment
|
||||
api 'com.android.support:support-fragment:28.0.0'
|
||||
// https://mvnrepository.com/artifact/com.android.support/recyclerview-v7
|
||||
api 'com.android.support:recyclerview-v7:28.0.0'
|
||||
|
||||
api 'cc.winboll.studio:libapputils:15.2.2'
|
||||
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||
}
|
8
androiddemo/build.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu Apr 03 03:17:18 GMT 2025
|
||||
stageCount=0
|
||||
libraryProject=
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.0
|
||||
buildCount=21
|
||||
baseBetaVersion=15.0.1
|
@@ -1,41 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-dontwarn com.tencent.bugly.**
|
||||
-keep public class com.tencent.bugly.**{*;}
|
||||
|
||||
-dontwarn com.tencent.tmsqmsp.**
|
||||
-keep public class com.tencent.tmsqmsp.**{*;}
|
||||
|
||||
-dontwarn com.tencent.tmsbeacon.**
|
||||
-keep public class com.tencent.tmsbeacon.**{*;}
|
||||
|
||||
-dontwarn com.tencent.map.**
|
||||
-keep public class com.tencent.map.** {*;}
|
||||
|
||||
-dontwarn com.tencent.mapsdk.**
|
||||
-keep public class com.tencent.mapsdk.** {*;}
|
||||
|
||||
-dontwarn com.tencent.tencentmap.**
|
||||
-keep public class com.tencent.tencentmap.** {*;}
|
||||
|
||||
-dontwarn com.tencent.lbssearch.**
|
||||
-keep public class com.tencent.lbssearch.** {*;}
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">WinBoll-APP+</string>
|
||||
|
||||
<string name="app_name">Android Demo +</string>
|
||||
|
||||
</resources>
|
@@ -1,24 +1,21 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.demo"
|
||||
android:sharedUserId="cc.winboll.studio">
|
||||
|
||||
<!-- 拥有完全的网络访问权限 -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="cc.winboll.studio.androiddemo">
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_winboll"
|
||||
tools:replace="android:appComponentFactory"
|
||||
android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/WinBoll.SupportThemeNoActionBar"
|
||||
android:supportsRtl="true">
|
||||
android:theme="@style/AppTheme"
|
||||
android:resizeableActivity="true"
|
||||
android:name=".App">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="standard"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
@@ -31,8 +28,11 @@
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".activities.AboutActivity"
|
||||
android:label="AboutActivity"/>
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="4.0"/>
|
||||
|
||||
<activity android:name=".GlobalApplication$CrashActivity"/>
|
||||
|
||||
</application>
|
||||
|
334
androiddemo/src/main/java/cc/winboll/studio/androiddemo/App.java
Normal file
@@ -0,0 +1,334 @@
|
||||
package cc.winboll.studio.androiddemo;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class App extends GlobalApplication {
|
||||
|
||||
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//CrashHandler.getInstance().registerGlobal(this);
|
||||
//CrashHandler.getInstance().registerPart(this);
|
||||
}
|
||||
|
||||
public static void write(InputStream input, OutputStream output) throws IOException {
|
||||
byte[] buf = new byte[1024 * 8];
|
||||
int len;
|
||||
while ((len = input.read(buf)) != -1) {
|
||||
output.write(buf, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
public static void write(File file, byte[] data) throws IOException {
|
||||
File parent = file.getParentFile();
|
||||
if (parent != null && !parent.exists()) parent.mkdirs();
|
||||
|
||||
ByteArrayInputStream input = new ByteArrayInputStream(data);
|
||||
FileOutputStream output = new FileOutputStream(file);
|
||||
try {
|
||||
write(input, output);
|
||||
} finally {
|
||||
closeIO(input, output);
|
||||
}
|
||||
}
|
||||
|
||||
public static String toString(InputStream input) throws IOException {
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
write(input, output);
|
||||
try {
|
||||
return output.toString("UTF-8");
|
||||
} finally {
|
||||
closeIO(input, output);
|
||||
}
|
||||
}
|
||||
|
||||
public static void closeIO(Closeable... closeables) {
|
||||
for (Closeable closeable : closeables) {
|
||||
try {
|
||||
if (closeable != null) closeable.close();
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
public static class CrashHandler {
|
||||
|
||||
public static final UncaughtExceptionHandler DEFAULT_UNCAUGHT_EXCEPTION_HANDLER = Thread.getDefaultUncaughtExceptionHandler();
|
||||
|
||||
private static CrashHandler sInstance;
|
||||
|
||||
private PartCrashHandler mPartCrashHandler;
|
||||
|
||||
public static CrashHandler getInstance() {
|
||||
if (sInstance == null) {
|
||||
sInstance = new CrashHandler();
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void registerGlobal(Context context) {
|
||||
registerGlobal(context, null);
|
||||
}
|
||||
|
||||
public void registerGlobal(Context context, String crashDir) {
|
||||
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandlerImpl(context.getApplicationContext(), crashDir));
|
||||
}
|
||||
|
||||
public void unregister() {
|
||||
Thread.setDefaultUncaughtExceptionHandler(DEFAULT_UNCAUGHT_EXCEPTION_HANDLER);
|
||||
}
|
||||
|
||||
public void registerPart(Context context) {
|
||||
unregisterPart(context);
|
||||
mPartCrashHandler = new PartCrashHandler(context.getApplicationContext());
|
||||
MAIN_HANDLER.postAtFrontOfQueue(mPartCrashHandler);
|
||||
}
|
||||
|
||||
public void unregisterPart(Context context) {
|
||||
if (mPartCrashHandler != null) {
|
||||
mPartCrashHandler.isRunning.set(false);
|
||||
mPartCrashHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PartCrashHandler implements Runnable {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
public AtomicBoolean isRunning = new AtomicBoolean(true);
|
||||
|
||||
public PartCrashHandler(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (isRunning.get()) {
|
||||
try {
|
||||
Looper.loop();
|
||||
} catch (final Throwable e) {
|
||||
e.printStackTrace();
|
||||
if (isRunning.get()) {
|
||||
MAIN_HANDLER.post(new Runnable(){
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mContext, e.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (e instanceof RuntimeException) {
|
||||
throw (RuntimeException)e;
|
||||
} else {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class UncaughtExceptionHandlerImpl implements UncaughtExceptionHandler {
|
||||
|
||||
private static DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss");
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
private final File mCrashDir;
|
||||
|
||||
public UncaughtExceptionHandlerImpl(Context context, String crashDir) {
|
||||
this.mContext = context;
|
||||
this.mCrashDir = TextUtils.isEmpty(crashDir) ? new File(mContext.getExternalCacheDir(), "crash") : new File(crashDir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable throwable) {
|
||||
try {
|
||||
|
||||
String log = buildLog(throwable);
|
||||
writeLog(log);
|
||||
|
||||
try {
|
||||
Intent intent = new Intent(mContext, CrashActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, log);
|
||||
mContext.startActivity(intent);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
writeLog(e.toString());
|
||||
}
|
||||
|
||||
throwable.printStackTrace();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(0);
|
||||
|
||||
} catch (Throwable e) {
|
||||
if (DEFAULT_UNCAUGHT_EXCEPTION_HANDLER != null) DEFAULT_UNCAUGHT_EXCEPTION_HANDLER.uncaughtException(thread, throwable);
|
||||
}
|
||||
}
|
||||
|
||||
private String buildLog(Throwable throwable) {
|
||||
String time = DATE_FORMAT.format(new Date());
|
||||
|
||||
String versionName = "unknown";
|
||||
long versionCode = 0;
|
||||
try {
|
||||
PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0);
|
||||
versionName = packageInfo.versionName;
|
||||
versionCode = Build.VERSION.SDK_INT >= 28 ? packageInfo.getLongVersionCode() : packageInfo.versionCode;
|
||||
} catch (Throwable ignored) {}
|
||||
|
||||
LinkedHashMap<String, String> head = new LinkedHashMap<String, String>();
|
||||
head.put("Time Of Crash", time);
|
||||
head.put("Device", String.format("%s, %s", Build.MANUFACTURER, Build.MODEL));
|
||||
head.put("Android Version", String.format("%s (%d)", Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
|
||||
head.put("App Version", String.format("%s (%d)", versionName, versionCode));
|
||||
head.put("Kernel", getKernel());
|
||||
head.put("Support Abis", Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_ABIS != null ? Arrays.toString(Build.SUPPORTED_ABIS): "unknown");
|
||||
head.put("Fingerprint", Build.FINGERPRINT);
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
for (String key : head.keySet()) {
|
||||
if (builder.length() != 0) builder.append("\n");
|
||||
builder.append(key);
|
||||
builder.append(" : ");
|
||||
builder.append(head.get(key));
|
||||
}
|
||||
|
||||
builder.append("\n\n");
|
||||
builder.append(Log.getStackTraceString(throwable));
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
private void writeLog(String log) {
|
||||
String time = DATE_FORMAT.format(new Date());
|
||||
File file = new File(mCrashDir, "crash_" + time + ".txt");
|
||||
try {
|
||||
write(file, log.getBytes("UTF-8"));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static String getKernel() {
|
||||
try {
|
||||
return App.toString(new FileInputStream("/proc/version")).trim();
|
||||
} catch (Throwable e) {
|
||||
return e.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final class CrashActivity extends Activity {
|
||||
|
||||
private String mLog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setTheme(android.R.style.Theme_DeviceDefault);
|
||||
setTitle("App Crash");
|
||||
|
||||
mLog = getIntent().getStringExtra(Intent.EXTRA_TEXT);
|
||||
|
||||
ScrollView contentView = new ScrollView(this);
|
||||
contentView.setFillViewport(true);
|
||||
|
||||
HorizontalScrollView horizontalScrollView = new HorizontalScrollView(this);
|
||||
|
||||
TextView textView = new TextView(this);
|
||||
int padding = dp2px(16);
|
||||
textView.setPadding(padding, padding, padding, padding);
|
||||
textView.setText(mLog);
|
||||
textView.setTextIsSelectable(true);
|
||||
textView.setTypeface(Typeface.DEFAULT);
|
||||
textView.setLinksClickable(true);
|
||||
|
||||
horizontalScrollView.addView(textView);
|
||||
contentView.addView(horizontalScrollView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
|
||||
setContentView(contentView);
|
||||
}
|
||||
|
||||
private void restart() {
|
||||
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||
if (intent != null) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
finish();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
private static int dp2px(float dpValue) {
|
||||
final float scale = Resources.getSystem().getDisplayMetrics().density;
|
||||
return (int) (dpValue * scale + 0.5f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
menu.add(0, android.R.id.copy, 0, android.R.string.copy)
|
||||
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.copy:
|
||||
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
cm.setPrimaryClip(ClipData.newPlainText(getPackageName(), mLog));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package cc.winboll.studio.androiddemo;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import cc.winboll.studio.libappbase.LogView;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
|
||||
LogView mLogView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
mLogView = findViewById(R.id.logview);
|
||||
mLogView.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mLogView.start();
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
37
androiddemo/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Android Demo"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<cc.winboll.studio.libappbase.LogView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Text"
|
||||
android:id="@+id/logview"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
9
androiddemo/src/main/res/values-v21/styles.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Material.Light.DarkActionBar">
|
||||
<item name="android:colorPrimary">@color/colorPrimary</item>
|
||||
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="android:colorAccent">@color/colorAccent</item>
|
||||
<item name="android:navigationBarColor">?android:colorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
6
androiddemo/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#009688</color>
|
||||
<color name="colorPrimaryDark">#00796B</color>
|
||||
<color name="colorAccent">#FF9800</color>
|
||||
</resources>
|
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Android Demo</string>
|
||||
</resources>
|
5
androiddemo/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
|
||||
</style>
|
||||
</resources>
|
1
androidxdemo/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
73
androidxdemo/build.gradle
Normal file
@@ -0,0 +1,73 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: '../.winboll/winboll_app_build.gradle'
|
||||
apply from: '../.winboll/winboll_lint_build.gradle'
|
||||
|
||||
def genVersionName(def versionName){
|
||||
// 检查编译标志位配置
|
||||
assert (winbollBuildProps['stageCount'] != null)
|
||||
assert (winbollBuildProps['baseVersion'] != null)
|
||||
// 保存基础版本号
|
||||
winbollBuildProps.setProperty("baseVersion", "${versionName}");
|
||||
//保存编译标志配置
|
||||
FileOutputStream fos = new FileOutputStream(winbollBuildPropsFile)
|
||||
winbollBuildProps.store(fos, "${winbollBuildPropsDesc}");
|
||||
fos.close();
|
||||
|
||||
// 返回编译版本号
|
||||
return "${versionName}." + winbollBuildProps['stageCount']
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "32.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cc.winboll.studio.androidxdemo"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "15.0"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
// SSH
|
||||
api 'com.jcraft:jsch:0.1.55'
|
||||
// Html 解析
|
||||
api 'org.jsoup:jsoup:1.13.1'
|
||||
// 二维码类库
|
||||
api 'com.google.zxing:core:3.4.1'
|
||||
api 'com.journeyapps:zxing-android-embedded:3.6.0'
|
||||
// 应用介绍页类库
|
||||
api 'io.github.medyo:android-about-page:2.0.0'
|
||||
// 吐司类库
|
||||
api 'com.github.getActivity:ToastUtils:10.5'
|
||||
// 网络连接类库
|
||||
api 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
// AndroidX 类库
|
||||
api 'androidx.appcompat:appcompat:1.1.0'
|
||||
api 'com.google.android.material:material:1.4.0'
|
||||
//api 'androidx.viewpager:viewpager:1.0.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||
//api 'androidx.fragment:fragment:1.1.0'
|
||||
|
||||
api 'cc.winboll.studio:libaes:15.2.6'
|
||||
api 'cc.winboll.studio:libapputils:15.2.2'
|
||||
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||
}
|
8
androidxdemo/build.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Thu Apr 03 03:15:55 GMT 2025
|
||||
stageCount=0
|
||||
libraryProject=
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.0
|
||||
buildCount=18
|
||||
baseBetaVersion=15.0.1
|
21
androidxdemo/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">WinBoll-Demo+</string>
|
||||
<string name="app_name">AndroidX Demo +</string>
|
||||
|
||||
</resources>
|
37
androidxdemo/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.androidxdemo">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/MyAppTheme"
|
||||
android:resizeableActivity="true"
|
||||
android:name=".App">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="4.0"/>
|
||||
|
||||
<activity android:name=".GlobalApplication$CrashActivity"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@@ -0,0 +1,345 @@
|
||||
package cc.winboll.studio.androidxdemo;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import cc.winboll.studio.androidxdemo.R;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class App extends GlobalApplication {
|
||||
|
||||
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
// 初始化 Toast 框架
|
||||
ToastUtils.init(this);
|
||||
// 设置 Toast 布局样式
|
||||
ToastUtils.setView(R.layout.view_toast);
|
||||
//ToastUtils.setStyle(new WhiteToastStyle());
|
||||
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
||||
|
||||
//CrashHandler.getInstance().registerGlobal(this);
|
||||
//CrashHandler.getInstance().registerPart(this);
|
||||
}
|
||||
|
||||
public static void write(InputStream input, OutputStream output) throws IOException {
|
||||
byte[] buf = new byte[1024 * 8];
|
||||
int len;
|
||||
while ((len = input.read(buf)) != -1) {
|
||||
output.write(buf, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
public static void write(File file, byte[] data) throws IOException {
|
||||
File parent = file.getParentFile();
|
||||
if (parent != null && !parent.exists()) parent.mkdirs();
|
||||
|
||||
ByteArrayInputStream input = new ByteArrayInputStream(data);
|
||||
FileOutputStream output = new FileOutputStream(file);
|
||||
try {
|
||||
write(input, output);
|
||||
} finally {
|
||||
closeIO(input, output);
|
||||
}
|
||||
}
|
||||
|
||||
public static String toString(InputStream input) throws IOException {
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
write(input, output);
|
||||
try {
|
||||
return output.toString("UTF-8");
|
||||
} finally {
|
||||
closeIO(input, output);
|
||||
}
|
||||
}
|
||||
|
||||
public static void closeIO(Closeable... closeables) {
|
||||
for (Closeable closeable : closeables) {
|
||||
try {
|
||||
if (closeable != null) closeable.close();
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
public static class CrashHandler {
|
||||
|
||||
public static final UncaughtExceptionHandler DEFAULT_UNCAUGHT_EXCEPTION_HANDLER = Thread.getDefaultUncaughtExceptionHandler();
|
||||
|
||||
private static CrashHandler sInstance;
|
||||
|
||||
private PartCrashHandler mPartCrashHandler;
|
||||
|
||||
public static CrashHandler getInstance() {
|
||||
if (sInstance == null) {
|
||||
sInstance = new CrashHandler();
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void registerGlobal(Context context) {
|
||||
registerGlobal(context, null);
|
||||
}
|
||||
|
||||
public void registerGlobal(Context context, String crashDir) {
|
||||
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandlerImpl(context.getApplicationContext(), crashDir));
|
||||
}
|
||||
|
||||
public void unregister() {
|
||||
Thread.setDefaultUncaughtExceptionHandler(DEFAULT_UNCAUGHT_EXCEPTION_HANDLER);
|
||||
}
|
||||
|
||||
public void registerPart(Context context) {
|
||||
unregisterPart(context);
|
||||
mPartCrashHandler = new PartCrashHandler(context.getApplicationContext());
|
||||
MAIN_HANDLER.postAtFrontOfQueue(mPartCrashHandler);
|
||||
}
|
||||
|
||||
public void unregisterPart(Context context) {
|
||||
if (mPartCrashHandler != null) {
|
||||
mPartCrashHandler.isRunning.set(false);
|
||||
mPartCrashHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PartCrashHandler implements Runnable {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
public AtomicBoolean isRunning = new AtomicBoolean(true);
|
||||
|
||||
public PartCrashHandler(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (isRunning.get()) {
|
||||
try {
|
||||
Looper.loop();
|
||||
} catch (final Throwable e) {
|
||||
e.printStackTrace();
|
||||
if (isRunning.get()) {
|
||||
MAIN_HANDLER.post(new Runnable(){
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mContext, e.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (e instanceof RuntimeException) {
|
||||
throw (RuntimeException)e;
|
||||
} else {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class UncaughtExceptionHandlerImpl implements UncaughtExceptionHandler {
|
||||
|
||||
private static DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss");
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
private final File mCrashDir;
|
||||
|
||||
public UncaughtExceptionHandlerImpl(Context context, String crashDir) {
|
||||
this.mContext = context;
|
||||
this.mCrashDir = TextUtils.isEmpty(crashDir) ? new File(mContext.getExternalCacheDir(), "crash") : new File(crashDir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable throwable) {
|
||||
try {
|
||||
|
||||
String log = buildLog(throwable);
|
||||
writeLog(log);
|
||||
|
||||
try {
|
||||
Intent intent = new Intent(mContext, CrashActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, log);
|
||||
mContext.startActivity(intent);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
writeLog(e.toString());
|
||||
}
|
||||
|
||||
throwable.printStackTrace();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(0);
|
||||
|
||||
} catch (Throwable e) {
|
||||
if (DEFAULT_UNCAUGHT_EXCEPTION_HANDLER != null) DEFAULT_UNCAUGHT_EXCEPTION_HANDLER.uncaughtException(thread, throwable);
|
||||
}
|
||||
}
|
||||
|
||||
private String buildLog(Throwable throwable) {
|
||||
String time = DATE_FORMAT.format(new Date());
|
||||
|
||||
String versionName = "unknown";
|
||||
long versionCode = 0;
|
||||
try {
|
||||
PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0);
|
||||
versionName = packageInfo.versionName;
|
||||
versionCode = Build.VERSION.SDK_INT >= 28 ? packageInfo.getLongVersionCode() : packageInfo.versionCode;
|
||||
} catch (Throwable ignored) {}
|
||||
|
||||
LinkedHashMap<String, String> head = new LinkedHashMap<String, String>();
|
||||
head.put("Time Of Crash", time);
|
||||
head.put("Device", String.format("%s, %s", Build.MANUFACTURER, Build.MODEL));
|
||||
head.put("Android Version", String.format("%s (%d)", Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
|
||||
head.put("App Version", String.format("%s (%d)", versionName, versionCode));
|
||||
head.put("Kernel", getKernel());
|
||||
head.put("Support Abis", Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_ABIS != null ? Arrays.toString(Build.SUPPORTED_ABIS): "unknown");
|
||||
head.put("Fingerprint", Build.FINGERPRINT);
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
for (String key : head.keySet()) {
|
||||
if (builder.length() != 0) builder.append("\n");
|
||||
builder.append(key);
|
||||
builder.append(" : ");
|
||||
builder.append(head.get(key));
|
||||
}
|
||||
|
||||
builder.append("\n\n");
|
||||
builder.append(Log.getStackTraceString(throwable));
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
private void writeLog(String log) {
|
||||
String time = DATE_FORMAT.format(new Date());
|
||||
File file = new File(mCrashDir, "crash_" + time + ".txt");
|
||||
try {
|
||||
write(file, log.getBytes("UTF-8"));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static String getKernel() {
|
||||
try {
|
||||
return App.toString(new FileInputStream("/proc/version")).trim();
|
||||
} catch (Throwable e) {
|
||||
return e.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final class CrashActivity extends Activity {
|
||||
|
||||
private String mLog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setTheme(android.R.style.Theme_DeviceDefault);
|
||||
setTitle("App Crash");
|
||||
|
||||
mLog = getIntent().getStringExtra(Intent.EXTRA_TEXT);
|
||||
|
||||
ScrollView contentView = new ScrollView(this);
|
||||
contentView.setFillViewport(true);
|
||||
|
||||
HorizontalScrollView horizontalScrollView = new HorizontalScrollView(this);
|
||||
|
||||
TextView textView = new TextView(this);
|
||||
int padding = dp2px(16);
|
||||
textView.setPadding(padding, padding, padding, padding);
|
||||
textView.setText(mLog);
|
||||
textView.setTextIsSelectable(true);
|
||||
textView.setTypeface(Typeface.DEFAULT);
|
||||
textView.setLinksClickable(true);
|
||||
|
||||
horizontalScrollView.addView(textView);
|
||||
contentView.addView(horizontalScrollView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
|
||||
setContentView(contentView);
|
||||
}
|
||||
|
||||
private void restart() {
|
||||
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||
if (intent != null) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
finish();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
private static int dp2px(float dpValue) {
|
||||
final float scale = Resources.getSystem().getDisplayMetrics().density;
|
||||
return (int) (dpValue * scale + 0.5f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
menu.add(0, android.R.id.copy, 0, android.R.string.copy)
|
||||
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.copy:
|
||||
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
cm.setPrimaryClip(ClipData.newPlainText(getPackageName(), mLog));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package cc.winboll.studio.androidxdemo;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import cc.winboll.studio.libappbase.LogView;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
LogView mLogView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
mLogView = findViewById(R.id.logview);
|
||||
|
||||
ToastUtils.show("onCreate");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mLogView.start();
|
||||
}
|
||||
}
|
51
androidxdemo/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical|center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="AndroidX Demo"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<cc.winboll.studio.libappbase.LogView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/logview"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
BIN
androidxdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
6
androidxdemo/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#009688</color>
|
||||
<color name="colorPrimaryDark">#00796B</color>
|
||||
<color name="colorAccent">#FF9800</color>
|
||||
</resources>
|
4
androidxdemo/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">AndroidX Demo</string>
|
||||
|
||||
</resources>
|
11
androidxdemo/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@@ -2,11 +2,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" >
|
||||
|
||||
<application
|
||||
tools:replace="android:icon"
|
||||
android:icon="@drawable/ic_winbollbeta">
|
||||
<application>
|
||||
|
||||
<!-- Put flavor specific code here -->
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@@ -1,8 +0,0 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sun Jan 05 07:55:24 HKT 2025
|
||||
stageCount=17
|
||||
libraryProject=winboll-shared
|
||||
baseVersion=1.8
|
||||
publishVersion=1.8.16
|
||||
buildCount=0
|
||||
baseBetaVersion=1.8.17
|
@@ -1,48 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.app">
|
||||
|
||||
<!-- BIND_AUTOFILL_SERVICE -->
|
||||
<uses-permission android:name="android.permission.BIND_AUTOFILL_SERVICE"/>
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_winboll"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/WinBoll.SupportThemeNoActionBar"
|
||||
android:supportsRtl="true">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/studio_provider"/>
|
||||
|
||||
</provider>
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@@ -1,24 +0,0 @@
|
||||
package cc.winboll.studio.app;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@QQ.COM
|
||||
* @Date 2024/12/08 15:10:51
|
||||
* @Describe 全局应用类
|
||||
*/
|
||||
import cc.winboll.studio.shared.app.WinBollApplication;
|
||||
import cc.winboll.studio.shared.log.LogUtils;
|
||||
|
||||
public class App extends WinBollApplication {
|
||||
|
||||
public static final String TAG = "App";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
// 必须在调用基类前设置应用调试标志,
|
||||
// 这样可以预先设置日志与数据的存储根目录。
|
||||
//setIsDebug(BuildConfig.DEBUG);
|
||||
super.onCreate();
|
||||
LogUtils.d(TAG, "onCreate");
|
||||
}
|
||||
|
||||
}
|
@@ -1,168 +0,0 @@
|
||||
package cc.winboll.studio.app;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import cc.winboll.studio.shared.app.WinBollActivity;
|
||||
import cc.winboll.studio.shared.app.WinBollActivityManager;
|
||||
import cc.winboll.studio.shared.app.WinBollApplication;
|
||||
import cc.winboll.studio.shared.log.LogUtils;
|
||||
import cc.winboll.studio.shared.util.UriUtils;
|
||||
import cc.winboll.studio.shared.view.StringToQrCodeView;
|
||||
import cc.winboll.studio.shared.view.YesNoAlertDialog;
|
||||
import cc.winboll.studio.unittest.UnitTestActivity;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.UUID;
|
||||
|
||||
final public class MainActivity extends WinBollActivity {
|
||||
|
||||
public static final String TAG = "MainActivity";
|
||||
|
||||
public static final int REQUEST_HOME_ACTIVITY = 0;
|
||||
public static final int REQUEST_ABOUT_ACTIVITY = 1;
|
||||
|
||||
@Override
|
||||
protected boolean isEnableDisplayHomeAsUp() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// 接收并处理 Intent 数据,函数 Intent 处理接收就直接返回
|
||||
if (prosessIntents(getIntent())) return;
|
||||
// 以下正常创建主窗口
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
// 设置 WinBoll 应用 UI 类型
|
||||
WinBollApplication.setWinBollUI_TYPE(WinBollApplication.WinBollUI_TYPE.Aplication);
|
||||
//ToastUtils.show("WinBollUI_TYPE " + WinBollApplication.getWinBollUI_TYPE());
|
||||
LogUtils.d(TAG, "BuildConfig.DEBUG : " + Boolean.toString(BuildConfig.DEBUG));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
setSubTitle("");
|
||||
}
|
||||
|
||||
//
|
||||
// 处理传入的 Intent 数据
|
||||
//
|
||||
boolean prosessIntents(Intent intent) {
|
||||
if (intent == null
|
||||
|| intent.getAction() == null
|
||||
|| intent.getAction().equals(""))
|
||||
return false;
|
||||
|
||||
if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
||||
try {
|
||||
WinBollActivity clazzActivity = UnitTestActivity.class.newInstance();
|
||||
String tag = clazzActivity.getTag();
|
||||
LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
||||
Intent subIntent = new Intent(this, UnitTestActivity.class);
|
||||
subIntent.setAction(intent.getAction());
|
||||
File file = new File(getCacheDir(), UUID.randomUUID().toString());
|
||||
//取出文件uri
|
||||
Uri uri = intent.getData();
|
||||
if (uri == null) {
|
||||
uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||
}
|
||||
//获取文件真实地址
|
||||
String szSrcPath = UriUtils.getFileFromUri(getApplication(), uri);
|
||||
if (TextUtils.isEmpty(szSrcPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
||||
//startWinBollActivity(subIntent, tag);
|
||||
WinBollActivityManager.getInstance(this).startWinBollActivity(this, subIntent, UnitTestActivity.class);
|
||||
} catch (IllegalAccessException | InstantiationException | IOException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
// 函数处理异常返回失败
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
LogUtils.d(TAG, "prosessIntents|" + intent.getAction() + "|yet");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isAddWinBollToolBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
exit();
|
||||
}
|
||||
|
||||
void exit() {
|
||||
YesNoAlertDialog.OnDialogResultListener listener = new YesNoAlertDialog.OnDialogResultListener(){
|
||||
|
||||
@Override
|
||||
public void onYes() {
|
||||
WinBollActivityManager.getInstance(getApplicationContext()).finishAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNo() {
|
||||
}
|
||||
};
|
||||
YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Toolbar initToolBar() {
|
||||
return findViewById(R.id.activitymainToolbar1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_winboll_app_main, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == R.id.item_unittest) {
|
||||
WinBollActivityManager.getInstance(this).startWinBollActivity(this, UnitTestActivity.class);
|
||||
} else if (item.getItemId() == R.id.item_exit) {
|
||||
exit();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
switch (resultCode) {
|
||||
case REQUEST_HOME_ACTIVITY : {
|
||||
LogUtils.d(TAG, "REQUEST_HOME_ACTIVITY");
|
||||
break;
|
||||
}
|
||||
case REQUEST_ABOUT_ACTIVITY : {
|
||||
LogUtils.d(TAG, "REQUEST_ABOUT_ACTIVITY");
|
||||
break;
|
||||
}
|
||||
default : {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/activitymainToolbar1"/>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1.0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello, WinBoll!"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_gradient"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_launcher"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:textColor="#FF000000"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- WinBoll 默认方案 -->
|
||||
<color name="colorPrimary">#FF196ABC</color>
|
||||
<color name="colorPrimaryDark">#FF002B57</color>
|
||||
<color name="colorAccent">#FF80BFFF</color>
|
||||
<color name="colorToastFrame">#FFA9A9A9</color>
|
||||
<color name="colorToastShadow">#FF000000</color>
|
||||
<color name="colorToastBackgroung">#FFFFFFFF</color>
|
||||
</resources>
|
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<external-path
|
||||
name="external_storage_root"
|
||||
path="." />
|
||||
<files-path
|
||||
name="files_path"
|
||||
path="." />
|
||||
<cache-path
|
||||
name="cache_path"
|
||||
path="." />
|
||||
<!--/storage/emulated/0/Android/data/...-->
|
||||
<external-files-path
|
||||
name="external_file_path"
|
||||
path="." />
|
||||
<!--代表app 外部存储区域根目录下的文件 Context.getExternalCacheDir目录下的目录-->
|
||||
<external-cache-path
|
||||
name="external_cache_path"
|
||||
path="." />
|
||||
<!--配置root-path。这样子可以读取到sd卡和一些应用分身的目录,否则微信分身保存的图片,就会导致 java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/999/tencent/MicroMsg/WeiXin/export1544062754693.jpg,在小米6的手机上微信分身有这个crash,华为没有
|
||||
-->
|
||||
<root-path
|
||||
name="root_path"
|
||||
path="" />
|
||||
</paths>
|
@@ -18,18 +18,19 @@ def genVersionName(def versionName){
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
compileSdkVersion 32
|
||||
buildToolsVersion "32.0.0"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cc.winboll.studio.appbase"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 29
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
// versionName 更新后需要手动设置
|
||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||
versionName "2.0"
|
||||
versionName "15.7"
|
||||
if(true) {
|
||||
versionName = genVersionName("${versionName}")
|
||||
}
|
||||
@@ -45,5 +46,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
api project(':libappbase')
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue Feb 25 16:51:17 HKT 2025
|
||||
stageCount=3
|
||||
#Sat May 03 10:32:21 GMT 2025
|
||||
stageCount=7
|
||||
libraryProject=libappbase
|
||||
baseVersion=2.0
|
||||
publishVersion=2.0.2
|
||||
buildCount=0
|
||||
baseBetaVersion=2.0.3
|
||||
baseVersion=15.7
|
||||
publishVersion=15.7.6
|
||||
buildCount=4
|
||||
baseBetaVersion=15.7.7
|
||||
|
@@ -5,15 +5,18 @@
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:icon="@drawable/ic_miapp"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme"
|
||||
android:resizeableActivity="true">
|
||||
android:theme="@style/MyAPPBaseTheme"
|
||||
android:resizeableActivity="true"
|
||||
android:process=":App">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:resizeableActivity="true"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
@@ -29,10 +32,22 @@
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".GlobalApplication$CrashActivity"/>
|
||||
<activity
|
||||
android:name=".activities.NewActivity"
|
||||
android:label="NewActivity"
|
||||
android:exported="true"
|
||||
android:resizeableActivity="true"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>
|
||||
|
||||
<activity android:name=".activities.New2Activity"
|
||||
android:label="New2Activity"
|
||||
android:exported="true"
|
||||
android:resizeableActivity="true"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"/>
|
||||
|
||||
<service
|
||||
android:name=".MyTileService"
|
||||
android:exported="true"
|
||||
android:label="@string/tileservice_name"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||
@@ -49,24 +64,39 @@
|
||||
android:name=".services.MainService"
|
||||
android:exported="true"/>
|
||||
|
||||
<service
|
||||
android:name="cc.winboll.studio.appbase.services.TestDemoBindService"
|
||||
android:exported="true"/>
|
||||
|
||||
<service
|
||||
android:name="cc.winboll.studio.appbase.services.TestDemoService"
|
||||
android:exported="true"/>
|
||||
|
||||
<service android:name=".services.AssistantService"/>
|
||||
|
||||
<receiver android:name="cc.winboll.studio.appbase.receivers.MainReceiver">
|
||||
<receiver android:name="cc.winboll.studio.appbase.receivers.MainReceiver"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="cc.winboll.studio.appbase.receivers.MainReceiver"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
</receiver>
|
||||
|
||||
<receiver
|
||||
android:name=".widgets.SOSWidget"
|
||||
android:name=".widgets.APPNewsWidget"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.SOSWidget.ACTION_WAKEUP_SERVICE"/>
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.SOSWidget.ACTION_RELOAD_REPORT"/>
|
||||
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidget.ACTION_WAKEUP_SERVICE"/>
|
||||
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidget.ACTION_RELOAD_REPORT"/>
|
||||
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
@@ -75,13 +105,14 @@
|
||||
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".widgets.SOSWidgetClickListener">
|
||||
<receiver android:name=".receivers.APPNewsWidgetClickListener"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.SOSWidgetClickListener.ACTION_PRE"/>
|
||||
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_PRE"/>
|
||||
|
||||
<action android:name="cc.winboll.studio.appbase.widgets.SOSWidgetClickListener.ACTION_NEXT"/>
|
||||
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_NEXT"/>
|
||||
|
||||
</intent-filter>
|
||||
|
||||
|
@@ -6,22 +6,22 @@ package cc.winboll.studio.appbase;
|
||||
* @Describe APPbase 应用类
|
||||
*/
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.SOSCSBroadcastReceiver;
|
||||
import android.content.IntentFilter;
|
||||
import cc.winboll.studio.libappbase.sos.SOSCenterServiceReceiver;
|
||||
import cc.winboll.studio.libappbase.sos.SOS;
|
||||
|
||||
public class App extends GlobalApplication {
|
||||
|
||||
public static final String TAG = "App";
|
||||
|
||||
SOSCSBroadcastReceiver mSOSCSBroadcastReceiver;
|
||||
SOSCenterServiceReceiver mSOSCenterServiceReceiver;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
GlobalApplication.setIsDebuging(this, BuildConfig.DEBUG);
|
||||
mSOSCSBroadcastReceiver = new SOSCSBroadcastReceiver();
|
||||
mSOSCenterServiceReceiver = new SOSCenterServiceReceiver();
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(SOSCSBroadcastReceiver.ACTION_SOS);
|
||||
registerReceiver(mSOSCSBroadcastReceiver, intentFilter);
|
||||
intentFilter.addAction(SOS.ACTION_SOS);
|
||||
registerReceiver(mSOSCenterServiceReceiver, intentFilter);
|
||||
}
|
||||
}
|
||||
|
@@ -1,29 +1,44 @@
|
||||
package cc.winboll.studio.appbase;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.widget.Toolbar;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
import cc.winboll.studio.appbase.activities.NewActivity;
|
||||
import cc.winboll.studio.appbase.services.MainService;
|
||||
import cc.winboll.studio.appbase.services.TestDemoBindService;
|
||||
import cc.winboll.studio.appbase.services.TestDemoService;
|
||||
import cc.winboll.studio.libappbase.CrashHandler;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.GlobalCrashActivity;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.LogView;
|
||||
import cc.winboll.studio.libappbase.SOS;
|
||||
import cc.winboll.studio.libappbase.SimpleOperateSignalCenterService;
|
||||
import cc.winboll.studio.libappbase.bean.APPSOSBean;
|
||||
import cc.winboll.studio.libappbase.services.TestService;
|
||||
import cc.winboll.studio.libappbase.sos.SOS;
|
||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
||||
import cc.winboll.studio.libappbase.widgets.StatusWidget;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "MainActivity";
|
||||
|
||||
LogView mLogView;
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
Toolbar mToolbar;
|
||||
//LogView mLogView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -31,16 +46,34 @@ public class MainActivity extends AppCompatActivity {
|
||||
ToastUtils.show("onCreate");
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Toolbar toolbar = findViewById(R.id.activitymainToolbar1);
|
||||
setSupportActionBar(toolbar);
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
setActionBar(mToolbar);
|
||||
|
||||
CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1);
|
||||
cbIsDebugMode.setChecked(GlobalApplication.isDebuging());
|
||||
mLogView = findViewById(R.id.activitymainLogView1);
|
||||
//mLogView = findViewById(R.id.activitymainLogView1);
|
||||
|
||||
if (GlobalApplication.isDebuging()) { mLogView.start(); }
|
||||
// if (GlobalApplication.isDebuging()) {
|
||||
// mLogView.start();
|
||||
// ToastUtils.show("LogView start.");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -49,15 +82,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
sendBroadcast(intentAPPWidget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
LogUtils.d(TAG, "onResume");
|
||||
super.onResume();
|
||||
mLogView.start();
|
||||
}
|
||||
|
||||
public void onSwitchDebugMode(View view) {
|
||||
GlobalApplication.setIsDebuging(this, ((CheckBox)view).isChecked());
|
||||
boolean isDebuging = ((CheckBox)view).isChecked();
|
||||
GlobalApplication.setIsDebuging(isDebuging);
|
||||
GlobalApplication.saveDebugStatus();
|
||||
}
|
||||
|
||||
public void onPreviewGlobalCrashActivity(View view) {
|
||||
Intent intent = new Intent(this, GlobalCrashActivity.class);
|
||||
intent.putExtra(CrashHandler.EXTRA_CRASH_INFO, "Demo log...");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void onStartCenter(View view) {
|
||||
@@ -68,17 +102,17 @@ public class MainActivity extends AppCompatActivity {
|
||||
MainService.stopMainService(this);
|
||||
}
|
||||
|
||||
public void onTestStopWithoutSettingEnable(View view) {
|
||||
LogUtils.d(TAG, "onTestStopWithoutSettingEnable");
|
||||
stopService(new Intent(this, SimpleOperateSignalCenterService.class));
|
||||
public void onTestStopMainServiceWithoutSettingEnable(View view) {
|
||||
LogUtils.d(TAG, "onTestStopMainServiceWithoutSettingEnable");
|
||||
stopService(new Intent(this, MainService.class));
|
||||
}
|
||||
|
||||
public void onTestStartWithString(View view) {
|
||||
LogUtils.d(TAG, "onTestStartWithString");
|
||||
public void onTestUseComponentStartService(View view) {
|
||||
LogUtils.d(TAG, "onTestUseComponentStartService");
|
||||
|
||||
// 目标服务的包名和类名
|
||||
String packageName = this.getPackageName();
|
||||
String serviceClassName = SimpleOperateSignalCenterService.class.getName();
|
||||
String serviceClassName = TestDemoService.class.getName();
|
||||
|
||||
// 构建Intent
|
||||
Intent intentService = new Intent();
|
||||
@@ -87,30 +121,63 @@ public class MainActivity extends AppCompatActivity {
|
||||
startService(intentService);
|
||||
}
|
||||
|
||||
public void onSOS(View view) {
|
||||
Intent intent = new Intent(this, TestService.class);
|
||||
public void onTestDemoServiceSOS(View view) {
|
||||
Intent intent = new Intent(this, TestDemoService.class);
|
||||
stopService(intent);
|
||||
SOS.sosWinBollService(this, new APPSOSBean(getPackageName(), TestService.class.getName()));
|
||||
if (App.isDebuging()) {
|
||||
SOS.sosToAppBaseBeta(this, TestDemoService.class.getName());
|
||||
} else {
|
||||
SOS.sosToAppBase(this, TestDemoService.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
public void onStartTestService(View view) {
|
||||
Intent intent = new Intent(this, TestService.class);
|
||||
intent.setAction(SOS.ACTION_SERVICE_ENABLE);
|
||||
public void onSartTestDemoService(View view) {
|
||||
Intent intent = new Intent(this, TestDemoService.class);
|
||||
intent.setAction(TestDemoService.ACTION_ENABLE);
|
||||
startService(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void onStopTestService(View view) {
|
||||
Intent intent = new Intent(this, TestService.class);
|
||||
intent.setAction(SOS.ACTION_SERVICE_DISABLE);
|
||||
public void onStopTestDemoService(View view) {
|
||||
Intent intent = new Intent(this, TestDemoService.class);
|
||||
intent.setAction(TestDemoService.ACTION_DISABLE);
|
||||
startService(intent);
|
||||
|
||||
Intent intentStop = new Intent(this, TestService.class);
|
||||
|
||||
Intent intentStop = new Intent(this, TestDemoService.class);
|
||||
stopService(intentStop);
|
||||
}
|
||||
|
||||
public void onStopTestServiceNoSettings(View view) {
|
||||
Intent intent = new Intent(this, TestService.class);
|
||||
public void onStopTestDemoServiceNoSettings(View view) {
|
||||
Intent intent = new Intent(this, TestDemoService.class);
|
||||
stopService(intent);
|
||||
}
|
||||
|
||||
public void onSartTestDemoBindService(View view) {
|
||||
Intent intent = new Intent(this, TestDemoBindService.class);
|
||||
intent.setAction(TestDemoBindService.ACTION_ENABLE);
|
||||
startService(intent);
|
||||
|
||||
}
|
||||
|
||||
public void onStopTestDemoBindService(View view) {
|
||||
Intent intent = new Intent(this, TestDemoBindService.class);
|
||||
intent.setAction(TestDemoBindService.ACTION_DISABLE);
|
||||
startService(intent);
|
||||
|
||||
Intent intentStop = new Intent(this, TestDemoBindService.class);
|
||||
stopService(intentStop);
|
||||
}
|
||||
|
||||
public void onStopTestDemoBindServiceNoSettings(View view) {
|
||||
Intent intent = new Intent(this, TestDemoBindService.class);
|
||||
stopService(intent);
|
||||
}
|
||||
|
||||
public void onTestOpenNewActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(this, NewActivity.class);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ package cc.winboll.studio.appbase;
|
||||
import android.content.Context;
|
||||
import android.service.quicksettings.Tile;
|
||||
import android.service.quicksettings.TileService;
|
||||
import cc.winboll.studio.appbase.beans.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.models.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.services.MainService;
|
||||
|
||||
public class MyTileService extends TileService {
|
||||
|
@@ -0,0 +1,81 @@
|
||||
package cc.winboll.studio.appbase;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/28 15:34:16
|
||||
* @Describe 应用活动窗口基类
|
||||
*/
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.os.PersistableBundle;
|
||||
import android.view.MenuItem;
|
||||
import cc.winboll.studio.appbase.App;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.dialogs.YesNoAlertDialog;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager;
|
||||
|
||||
public class WinBoLLActivityBase extends Activity implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "WinBoLLActivityBase";
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
WinBoLLActivityManager getWinBoLLActivityManager() {
|
||||
return WinBoLLActivityManager.getInstance(GlobalApplication.getInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWinBoLLActivityManager().add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
|
||||
super.onPostCreate(savedInstanceState, persistentState);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
|
||||
return true;
|
||||
} else if(item.getItemId() == cc.winboll.studio.appbase.R.id.item_minimal) {
|
||||
//moveTaskToBack(true);
|
||||
exit();
|
||||
}
|
||||
// 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
void exit() {
|
||||
YesNoAlertDialog.show(this, "Exit " + getString(R.string.app_name), "Close all activity and exit?", new YesNoAlertDialog.OnDialogResultListener(){
|
||||
|
||||
@Override
|
||||
public void onYes() {
|
||||
App.getWinBoLLActivityManager().finishAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNo() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
getWinBoLLActivityManager().registeRemove(this);
|
||||
}
|
||||
}
|
@@ -0,0 +1,83 @@
|
||||
package cc.winboll.studio.appbase.activities;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/25 11:46:40
|
||||
* @Describe 测试窗口2
|
||||
*/
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toolbar;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
import cc.winboll.studio.appbase.WinBoLLActivityBase;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
|
||||
public class New2Activity extends WinBoLLActivityBase implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "New2Activity";
|
||||
|
||||
Toolbar mToolbar;
|
||||
//LogView mLogView;
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_new2);
|
||||
|
||||
// mLogView = findViewById(R.id.logview);
|
||||
// mLogView.start();
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
setActionBar(mToolbar);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//mLogView.start();
|
||||
}
|
||||
|
||||
public void onCloseThisActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().finish(this);
|
||||
}
|
||||
|
||||
public void onCloseAllActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().finishAll();
|
||||
}
|
||||
|
||||
public void onNewActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(this, NewActivity.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
|
||||
return true;
|
||||
}
|
||||
// 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
package cc.winboll.studio.appbase.activities;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/25 05:04:22
|
||||
*/
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toolbar;
|
||||
import cc.winboll.studio.appbase.R;
|
||||
import cc.winboll.studio.appbase.WinBoLLActivityBase;
|
||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||
|
||||
public class NewActivity extends WinBoLLActivityBase implements IWinBoLLActivity {
|
||||
|
||||
public static final String TAG = "NewActivity";
|
||||
|
||||
Toolbar mToolbar;
|
||||
//LogView mLogView;
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_new);
|
||||
// mLogView = findViewById(R.id.logview);
|
||||
// mLogView.start();
|
||||
mToolbar = findViewById(R.id.toolbar);
|
||||
setActionBar(mToolbar);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
//mLogView.start();
|
||||
}
|
||||
|
||||
public void onCloseThisActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().finish(this);
|
||||
}
|
||||
|
||||
public void onCloseAllActivity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().finishAll();
|
||||
}
|
||||
|
||||
public void onNew2Activity(View view) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(this, New2Activity.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||
getMenuInflater().inflate(R.menu.toolbar_appbase, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == cc.winboll.studio.appbase.R.id.item_log) {
|
||||
GlobalApplication.getWinBoLLActivityManager().startLogActivity(this);
|
||||
return true;
|
||||
}
|
||||
// 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package cc.winboll.studio.appbase.beans;
|
||||
package cc.winboll.studio.appbase.models;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
@@ -35,8 +35,7 @@ public class MainServiceBean extends BaseBean {
|
||||
@Override
|
||||
public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException {
|
||||
super.writeThisToJsonWriter(jsonWriter);
|
||||
MainServiceBean bean = this;
|
||||
jsonWriter.name("isEnable").value(bean.isEnable());
|
||||
jsonWriter.name("isEnable").value(isEnable());
|
||||
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package cc.winboll.studio.libappbase.bean;
|
||||
package cc.winboll.studio.appbase.models;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/02/19 13:34:52
|
||||
* @Date 2025/03/07 12:47:22
|
||||
* @Describe TestServiceBean
|
||||
*/
|
||||
import android.util.JsonReader;
|
||||
@@ -10,13 +10,13 @@ import android.util.JsonWriter;
|
||||
import cc.winboll.studio.libappbase.BaseBean;
|
||||
import java.io.IOException;
|
||||
|
||||
public class TestServiceBean extends BaseBean {
|
||||
public class TestDemoBindServiceBean extends BaseBean {
|
||||
|
||||
public static final String TAG = "TestServiceBean";
|
||||
|
||||
boolean isEnable;
|
||||
|
||||
public TestServiceBean() {
|
||||
public TestDemoBindServiceBean() {
|
||||
this.isEnable = false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TestServiceBean extends BaseBean {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return TestServiceBean.class.getName();
|
||||
return TestDemoBindServiceBean.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
@@ -1,20 +1,22 @@
|
||||
package cc.winboll.studio.libappbase.bean;
|
||||
package cc.winboll.studio.appbase.models;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/07 12:49:21
|
||||
* @Describe TestDemoServiceBean
|
||||
*/
|
||||
import android.util.JsonReader;
|
||||
import android.util.JsonWriter;
|
||||
import cc.winboll.studio.libappbase.BaseBean;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/02/13 04:27:42
|
||||
*/
|
||||
public class SimpleOperateSignalCenterServiceBean extends BaseBean {
|
||||
public class TestDemoServiceBean extends BaseBean {
|
||||
|
||||
public static final String TAG = "SimpleOperateSignalCenterServiceBean";
|
||||
public static final String TAG = "TestDemoServiceBean";
|
||||
|
||||
boolean isEnable;
|
||||
|
||||
public SimpleOperateSignalCenterServiceBean() {
|
||||
|
||||
public TestDemoServiceBean() {
|
||||
this.isEnable = false;
|
||||
}
|
||||
|
||||
@@ -28,7 +30,7 @@ public class SimpleOperateSignalCenterServiceBean extends BaseBean {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return SimpleOperateSignalCenterServiceBean.class.getName();
|
||||
return TestDemoServiceBean.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
@@ -1,4 +1,4 @@
|
||||
package cc.winboll.studio.appbase.beans;
|
||||
package cc.winboll.studio.appbase.models;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
@@ -10,45 +10,45 @@ import android.util.JsonWriter;
|
||||
import cc.winboll.studio.libappbase.BaseBean;
|
||||
import java.io.IOException;
|
||||
|
||||
public class SOSReportBean extends BaseBean {
|
||||
public class WinBoLLNewsBean extends BaseBean {
|
||||
|
||||
public static final String TAG = "APPSOSReportBean";
|
||||
public static final String TAG = "WinBoLLNewsBean";
|
||||
|
||||
protected String sosReport;
|
||||
protected String message;
|
||||
|
||||
public SOSReportBean() {
|
||||
this.sosReport = "";
|
||||
public WinBoLLNewsBean() {
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
public SOSReportBean(String sosReport) {
|
||||
this.sosReport = sosReport;
|
||||
public WinBoLLNewsBean(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setSosReport(String sosReport) {
|
||||
this.sosReport = sosReport;
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getSosReport() {
|
||||
return sosReport;
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return SOSReportBean.class.getName();
|
||||
return WinBoLLNewsBean.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException {
|
||||
super.writeThisToJsonWriter(jsonWriter);
|
||||
jsonWriter.name("sosReport").value(getSosReport());
|
||||
jsonWriter.name("message").value(getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean initObjectsFromJsonReader(JsonReader jsonReader, String name) throws IOException {
|
||||
if (super.initObjectsFromJsonReader(jsonReader, name)) { return true; } else {
|
||||
if (name.equals("sosReport")) {
|
||||
setSosReport(jsonReader.nextString());
|
||||
if (name.equals("message")) {
|
||||
setMessage(jsonReader.nextString());
|
||||
} else {
|
||||
return false;
|
||||
}
|
@@ -1,20 +1,20 @@
|
||||
package cc.winboll.studio.appbase.widgets;
|
||||
package cc.winboll.studio.appbase.receivers;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/02/15 17:20:46
|
||||
* @Describe WidgetButtonClickListener
|
||||
* @Date 2025/03/24 07:11:44
|
||||
*/
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
|
||||
public class SOSWidgetClickListener extends BroadcastReceiver {
|
||||
public class APPNewsWidgetClickListener extends BroadcastReceiver {
|
||||
|
||||
public static final String TAG = "SOSWidgetClickListener";
|
||||
public static final String ACTION_PRE = "cc.winboll.studio.appbase.widgets.SOSWidgetClickListener.ACTION_PRE";
|
||||
public static final String ACTION_NEXT = "cc.winboll.studio.appbase.widgets.SOSWidgetClickListener.ACTION_NEXT";
|
||||
public static final String TAG = "APPNewsWidgetClickListener";
|
||||
public static final String ACTION_PRE = APPNewsWidgetClickListener.class.getName() + ".ACTION_PRE";
|
||||
public static final String ACTION_NEXT = APPNewsWidgetClickListener.class.getName() + ".ACTION_NEXT";
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@@ -25,10 +25,10 @@ public class SOSWidgetClickListener extends BroadcastReceiver {
|
||||
}
|
||||
if (action.equals(ACTION_PRE)) {
|
||||
LogUtils.d(TAG, "ACTION_PRE");
|
||||
SOSWidget.prePage(context);
|
||||
APPNewsWidget.prePage(context);
|
||||
} else if (action.equals(ACTION_NEXT)) {
|
||||
LogUtils.d(TAG, "ACTION_NEXT");
|
||||
SOSWidget.nextPage(context);
|
||||
APPNewsWidget.nextPage(context);
|
||||
} else {
|
||||
LogUtils.d(TAG, String.format("action %s", action));
|
||||
}
|
@@ -5,20 +5,21 @@ package cc.winboll.studio.appbase.receivers;
|
||||
* @Date 2025/02/13 06:58:04
|
||||
* @Describe 主要广播接收器
|
||||
*/
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import cc.winboll.studio.appbase.beans.SOSReportBean;
|
||||
import cc.winboll.studio.appbase.models.WinBoLLNewsBean;
|
||||
import cc.winboll.studio.appbase.services.MainService;
|
||||
import cc.winboll.studio.appbase.widgets.SOSWidget;
|
||||
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
||||
import cc.winboll.studio.libappbase.AppUtils;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.SOS;
|
||||
import cc.winboll.studio.libappbase.bean.APPSOSBean;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import cc.winboll.studio.libappbase.sos.APPModel;
|
||||
import cc.winboll.studio.libappbase.sos.SOS;
|
||||
import cc.winboll.studio.libappbase.sos.SOSObject;
|
||||
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -27,12 +28,10 @@ import java.util.Date;
|
||||
public class MainReceiver extends BroadcastReceiver {
|
||||
|
||||
public static final String TAG = "MainReceiver";
|
||||
|
||||
public static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
|
||||
|
||||
WeakReference<MainService> mwrService;
|
||||
// 存储电量指示值,
|
||||
// 用于校验电量消息时的电量变化
|
||||
static volatile int _mnTheQuantityOfElectricityOld = -1;
|
||||
static volatile boolean _mIsCharging = false;
|
||||
|
||||
public MainReceiver(MainService service) {
|
||||
mwrService = new WeakReference<MainService>(service);
|
||||
@@ -43,74 +42,62 @@ public class MainReceiver extends BroadcastReceiver {
|
||||
String szAction = intent.getAction();
|
||||
if (szAction.equals(ACTION_BOOT_COMPLETED)) {
|
||||
ToastUtils.show("ACTION_BOOT_COMPLETED");
|
||||
} else if (szAction.equals(SOS.ACTION_BIND)) {
|
||||
} else if (szAction.equals(WinBoLL.ACTION_BIND)) {
|
||||
LogUtils.d(TAG, "ACTION_BIND");
|
||||
LogUtils.d(TAG, String.format("context.getPackageName() %s", context.getPackageName()));
|
||||
LogUtils.d(TAG, String.format("intent.getAction() %s", intent.getAction()));
|
||||
String SOS = intent.getStringExtra("SOS");
|
||||
LogUtils.d(TAG, String.format("SOS %s", SOS));
|
||||
if (SOS != null && SOS.equals("Service")) {
|
||||
String szAPPSOSBean = intent.getStringExtra("APPSOSBean");
|
||||
LogUtils.d(TAG, String.format("szAPPSOSBean %s", szAPPSOSBean));
|
||||
if (szAPPSOSBean != null && !szAPPSOSBean.equals("")) {
|
||||
try {
|
||||
APPSOSBean bean = APPSOSBean.parseStringToBean(szAPPSOSBean, APPSOSBean.class);
|
||||
if (bean != null) {
|
||||
String sosPackage = bean.getSosPackage();
|
||||
LogUtils.d(TAG, String.format("sosPackage %s", sosPackage));
|
||||
String sosClassName = bean.getSosClassName();
|
||||
LogUtils.d(TAG, String.format("sosClassName %s", sosClassName));
|
||||
mwrService.get().bindSOSConnection(bean);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
String szAPPModel = intent.getStringExtra(WinBoLL.EXTRA_APPMODEL);
|
||||
LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel));
|
||||
if (szAPPModel != null && !szAPPModel.equals("")) {
|
||||
try {
|
||||
APPModel bean = APPModel.parseStringToBean(szAPPModel, APPModel.class);
|
||||
if (bean != null) {
|
||||
String szAppPackageName = bean.getAppPackageName();
|
||||
LogUtils.d(TAG, String.format("szAppPackageName %s", szAppPackageName));
|
||||
String szAppMainServiveName = bean.getAppMainServiveName();
|
||||
LogUtils.d(TAG, String.format("szAppMainServiveName %s", szAppMainServiveName));
|
||||
mwrService.get().bindAPPModelConnection(bean);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
}
|
||||
} else if (intent.getAction().equals(SOS.ACTION_SOS)) {
|
||||
LogUtils.d(TAG, "ACTION_SOS");
|
||||
LogUtils.d(TAG, String.format("context.getPackageName() %s", context.getPackageName()));
|
||||
LogUtils.d(TAG, String.format("intent.getAction() %s", intent.getAction()));
|
||||
String SOS = intent.getStringExtra("SOS");
|
||||
LogUtils.d(TAG, String.format("SOS %s", SOS));
|
||||
if (SOS != null && SOS.equals("Service")) {
|
||||
String szAPPSOSBean = intent.getStringExtra("APPSOSBean");
|
||||
LogUtils.d(TAG, String.format("szAPPSOSBean %s", szAPPSOSBean));
|
||||
if (szAPPSOSBean != null && !szAPPSOSBean.equals("")) {
|
||||
try {
|
||||
APPSOSBean bean = APPSOSBean.parseStringToBean(szAPPSOSBean, APPSOSBean.class);
|
||||
if (bean != null) {
|
||||
String sosPackage = bean.getSosPackage();
|
||||
LogUtils.d(TAG, String.format("sosPackage %s", sosPackage));
|
||||
String sosClassName = bean.getSosClassName();
|
||||
LogUtils.d(TAG, String.format("sosClassName %s", sosClassName));
|
||||
String sos = intent.getStringExtra(SOS.EXTRA_OBJECT);
|
||||
LogUtils.d(TAG, String.format("SOS %s", sos));
|
||||
if (sos != null && !sos.equals("")) {
|
||||
SOSObject bean = SOS.parseSOSObject(sos);
|
||||
if (bean != null) {
|
||||
String szObjectPackageName = bean.getObjectPackageName();
|
||||
LogUtils.d(TAG, String.format("szObjectPackageName %s", szObjectPackageName));
|
||||
String szObjectServiveName = bean.getObjectServiveName();
|
||||
LogUtils.d(TAG, String.format("szObjectServiveName %s", szObjectServiveName));
|
||||
|
||||
Intent intentService = new Intent();
|
||||
intentService.setComponent(new ComponentName(sosPackage, sosClassName));
|
||||
context.startService(intentService);
|
||||
Intent intentService = new Intent();
|
||||
intentService.setComponent(new ComponentName(szObjectPackageName, szObjectServiveName));
|
||||
context.startService(intentService);
|
||||
|
||||
String appName = AppUtils.getAppNameByPackageName(context, sosPackage);
|
||||
LogUtils.d(TAG, String.format("appName %s", appName));
|
||||
SOSReportBean appSOSReportBean = new SOSReportBean(appName);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
StringBuilder sbLine = new StringBuilder();
|
||||
sbLine.append("[");
|
||||
sbLine.append(currentTime);
|
||||
sbLine.append("] Power to ");
|
||||
sbLine.append(appName);
|
||||
appSOSReportBean.setSosReport(sbLine.toString());
|
||||
String appName = AppUtils.getAppNameByPackageName(context, szObjectPackageName);
|
||||
LogUtils.d(TAG, String.format("appName %s", appName));
|
||||
WinBoLLNewsBean appWinBoLLNewsBean = new WinBoLLNewsBean(appName);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
String currentTime = sdf.format(new Date());
|
||||
StringBuilder sbLine = new StringBuilder();
|
||||
sbLine.append("[");
|
||||
sbLine.append(currentTime);
|
||||
sbLine.append("] Power to ");
|
||||
sbLine.append(appName);
|
||||
appWinBoLLNewsBean.setMessage(sbLine.toString());
|
||||
|
||||
SOSWidget.addAPPSOSReportBean(context, appSOSReportBean);
|
||||
|
||||
Intent intentWidget = new Intent(context, SOSWidget.class);
|
||||
intentWidget.setAction(SOSWidget.ACTION_RELOAD_REPORT);
|
||||
context.sendBroadcast(intentWidget);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
APPNewsWidget.addWinBoLLNewsBean(context, appWinBoLLNewsBean);
|
||||
|
||||
Intent intentWidget = new Intent(context, APPNewsWidget.class);
|
||||
intentWidget.setAction(APPNewsWidget.ACTION_RELOAD_REPORT);
|
||||
context.sendBroadcast(intentWidget);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show(szAction);
|
||||
@@ -123,9 +110,7 @@ public class MainReceiver extends BroadcastReceiver {
|
||||
IntentFilter filter=new IntentFilter();
|
||||
filter.addAction(ACTION_BOOT_COMPLETED);
|
||||
filter.addAction(SOS.ACTION_SOS);
|
||||
filter.addAction(SOS.ACTION_BIND);
|
||||
filter.addAction(SOS.ACTION_SERVICE_ENABLE);
|
||||
filter.addAction(SOS.ACTION_SERVICE_DISABLE);
|
||||
filter.addAction(WinBoLL.ACTION_BIND);
|
||||
//filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
service.registerReceiver(this, filter);
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.IBinder;
|
||||
import cc.winboll.studio.appbase.beans.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.models.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.services.AssistantService;
|
||||
import cc.winboll.studio.appbase.services.MainService;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
|
@@ -18,15 +18,15 @@ import android.content.ServiceConnection;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import cc.winboll.studio.appbase.MyTileService;
|
||||
import cc.winboll.studio.appbase.beans.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.models.MainServiceBean;
|
||||
import cc.winboll.studio.appbase.handlers.MainServiceHandler;
|
||||
import cc.winboll.studio.appbase.receivers.MainReceiver;
|
||||
import cc.winboll.studio.appbase.services.AssistantService;
|
||||
import cc.winboll.studio.appbase.threads.MainServiceThread;
|
||||
import cc.winboll.studio.appbase.widgets.SOSWidget;
|
||||
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.bean.APPSOSBean;
|
||||
import java.util.ArrayList;
|
||||
import cc.winboll.studio.libappbase.sos.APPModel;
|
||||
|
||||
public class MainService extends Service {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MainService extends Service {
|
||||
AssistantService mAssistantService;
|
||||
boolean isBound = false;
|
||||
MainReceiver mMainReceiver;
|
||||
ArrayList<SOSConnection> mSOSConnectionList;
|
||||
ArrayList<APPConnection> mAPPModelConnectionList;
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
@@ -60,7 +60,7 @@ public class MainService extends Service {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
LogUtils.d(TAG, "onCreate()");
|
||||
mSOSConnectionList = new ArrayList<SOSConnection>();
|
||||
mAPPModelConnectionList = new ArrayList<APPConnection>();
|
||||
|
||||
_mControlCenterService = MainService.this;
|
||||
isServiceRunning = false;
|
||||
@@ -101,8 +101,8 @@ public class MainService extends Service {
|
||||
}
|
||||
|
||||
// 启动小部件
|
||||
Intent intentTimeWidget = new Intent(this, SOSWidget.class);
|
||||
intentTimeWidget.setAction(SOSWidget.ACTION_RELOAD_REPORT);
|
||||
Intent intentTimeWidget = new Intent(this, APPNewsWidget.class);
|
||||
intentTimeWidget.setAction(APPNewsWidget.ACTION_RELOAD_REPORT);
|
||||
this.sendBroadcast(intentTimeWidget);
|
||||
|
||||
startMainServiceThread();
|
||||
@@ -117,21 +117,11 @@ public class MainService extends Service {
|
||||
//
|
||||
void wakeupAndBindAssistant() {
|
||||
LogUtils.d(TAG, "wakeupAndBindAssistant()");
|
||||
// if (ServiceUtils.isServiceAlive(getApplicationContext(), AssistantService.class.getName()) == false) {
|
||||
// startService(new Intent(MainService.this, AssistantService.class));
|
||||
// //LogUtils.d(TAG, "call wakeupAndBindAssistant() : Binding... AssistantService");
|
||||
// bindService(new Intent(MainService.this, AssistantService.class), mMyServiceConnection, Context.BIND_IMPORTANT);
|
||||
// }
|
||||
|
||||
Intent intent = new Intent(this, AssistantService.class);
|
||||
startService(intent);
|
||||
// 绑定服务的Intent
|
||||
//Intent intent = new Intent(this, AssistantService.class);
|
||||
bindService(intent, mMyServiceConnection, Context.BIND_IMPORTANT);
|
||||
|
||||
// Intent intent = new Intent(this, AssistantService.class);
|
||||
// startService(intent);
|
||||
// LogUtils.d(TAG, "startService(intent)");
|
||||
// bindService(new Intent(this, AssistantService.class), mMyServiceConnection, Context.BIND_IMPORTANT);
|
||||
}
|
||||
|
||||
// 开启提醒铃声线程
|
||||
@@ -192,40 +182,40 @@ public class MainService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
public void bindSOSConnection(APPSOSBean bean) {
|
||||
LogUtils.d(TAG, "bindSOSConnection(...)");
|
||||
public void bindAPPModelConnection(APPModel bean) {
|
||||
LogUtils.d(TAG, "bindAPPModelConnection(...)");
|
||||
// 清理旧的绑定链接
|
||||
for (int i = mSOSConnectionList.size() - 1; i > -1; i--) {
|
||||
SOSConnection item = mSOSConnectionList.get(i);
|
||||
if (item.isBindToAPPSOSBean(bean)) {
|
||||
for (int i = mAPPModelConnectionList.size() - 1; i > -1; i--) {
|
||||
APPConnection item = mAPPModelConnectionList.get(i);
|
||||
if (item.isBindToAPP(bean)) {
|
||||
LogUtils.d(TAG, "Bind Servive exist.");
|
||||
unbindService(item);
|
||||
mSOSConnectionList.remove(i);
|
||||
mAPPModelConnectionList.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
// 绑定服务
|
||||
SOSConnection sosConnection = new SOSConnection();
|
||||
APPConnection appConnection = new APPConnection();
|
||||
Intent intentService = new Intent();
|
||||
intentService.setComponent(new ComponentName(bean.getSosPackage(), bean.getSosClassName()));
|
||||
bindService(intentService, sosConnection, Context.BIND_IMPORTANT);
|
||||
mSOSConnectionList.add(sosConnection);
|
||||
intentService.setComponent(new ComponentName(bean.getAppPackageName(), bean.getAppMainServiveName()));
|
||||
bindService(intentService, appConnection, Context.BIND_IMPORTANT);
|
||||
mAPPModelConnectionList.add(appConnection);
|
||||
|
||||
Intent intentWidget = new Intent(this, SOSWidget.class);
|
||||
intentWidget.setAction(SOSWidget.ACTION_WAKEUP_SERVICE);
|
||||
APPSOSBean appSOSBean = new APPSOSBean(bean.getSosPackage(), bean.getSosClassName());
|
||||
Intent intentWidget = new Intent(this, APPNewsWidget.class);
|
||||
intentWidget.setAction(APPNewsWidget.ACTION_WAKEUP_SERVICE);
|
||||
APPModel appSOSBean = new APPModel(bean.getAppPackageName(), bean.getAppMainServiveName());
|
||||
intentWidget.putExtra("APPSOSBean", appSOSBean.toString());
|
||||
sendBroadcast(intentWidget);
|
||||
}
|
||||
|
||||
public class SOSConnection implements ServiceConnection {
|
||||
public class APPConnection implements ServiceConnection {
|
||||
|
||||
ComponentName mComponentName;
|
||||
|
||||
boolean isBindToAPPSOSBean(APPSOSBean bean) {
|
||||
boolean isBindToAPP(APPModel bean) {
|
||||
return mComponentName != null
|
||||
&& mComponentName.getClassName().equals(bean.getSosClassName())
|
||||
&& mComponentName.getPackageName().equals(bean.getSosPackage());
|
||||
&& mComponentName.getClassName().equals(bean.getAppMainServiveName())
|
||||
&& mComponentName.getPackageName().equals(bean.getAppPackageName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -241,13 +231,13 @@ public class MainService extends Service {
|
||||
LogUtils.d(TAG, String.format("onServiceDisconnected : \ngetClassName %s\ngetPackageName %s", name.getClassName(), name.getPackageName()));
|
||||
|
||||
// 尝试无参数启动一下服务
|
||||
String sosPackage = mComponentName.getPackageName();
|
||||
LogUtils.d(TAG, String.format("sosPackage %s", sosPackage));
|
||||
String sosClassName = mComponentName.getClassName();
|
||||
LogUtils.d(TAG, String.format("sosClassName %s", sosClassName));
|
||||
String appPackage = mComponentName.getPackageName();
|
||||
LogUtils.d(TAG, String.format("appPackage %s", appPackage));
|
||||
String appMainServiceClassName = mComponentName.getClassName();
|
||||
LogUtils.d(TAG, String.format("appMainServiceClassName %s", appMainServiceClassName));
|
||||
|
||||
Intent intentService = new Intent();
|
||||
intentService.setComponent(new ComponentName(sosPackage, sosClassName));
|
||||
intentService.setComponent(new ComponentName(appPackage, appMainServiceClassName));
|
||||
startService(intentService);
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,178 @@
|
||||
package cc.winboll.studio.appbase.services;
|
||||
|
||||
/**
|
||||
* @Author ZhanGSKen@AliYun.Com
|
||||
* @Date 2025/03/07 12:45:49
|
||||
* @Describe 启动时申请绑定到APPBase主服务的服务示例
|
||||
*/
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import cc.winboll.studio.appbase.models.TestDemoBindServiceBean;
|
||||
import cc.winboll.studio.libappbase.LogUtils;
|
||||
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||
import cc.winboll.studio.appbase.App;
|
||||
import cc.winboll.studio.libappbase.sos.SOS;
|
||||
|
||||
public class TestDemoBindService extends Service {
|
||||
|
||||
public static final String TAG = "TestDemoBindService";
|
||||
|
||||
public static final String ACTION_ENABLE = TestDemoBindService.class.getName() + ".ACTION_ENABLE";
|
||||
public static final String ACTION_DISABLE = TestDemoBindService.class.getName() + ".ACTION_DISABLE";
|
||||
|
||||
volatile static TestThread _TestThread;
|
||||
|
||||
volatile static boolean _IsRunning;
|
||||
|
||||
public synchronized static void setIsRunning(boolean isRunning) {
|
||||
_IsRunning = isRunning;
|
||||
}
|
||||
|
||||
public static boolean isRunning() {
|
||||
return _IsRunning;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return new MyBinder();
|
||||
}
|
||||
|
||||
public class MyBinder extends Binder {
|
||||
public TestDemoBindService getService() {
|
||||
return TestDemoBindService.this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
LogUtils.d(TAG, "onCreate()");
|
||||
|
||||
run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
LogUtils.d(TAG, "onStartCommand(...)");
|
||||
TestDemoBindServiceBean bean = TestDemoBindServiceBean.loadBean(this, TestDemoBindServiceBean.class);
|
||||
if (bean == null) {
|
||||
bean = new TestDemoBindServiceBean();
|
||||
}
|
||||
|
||||
if (intent.getAction() != null) {
|
||||
if (intent.getAction().equals(ACTION_ENABLE)) {
|
||||
bean.setIsEnable(true);
|
||||
LogUtils.d(TAG, "setIsEnable(true);");
|
||||
TestDemoBindServiceBean.saveBean(this, bean);
|
||||
} else if (intent.getAction().equals(ACTION_DISABLE)) {
|
||||
bean.setIsEnable(false);
|
||||
LogUtils.d(TAG, "setIsEnable(false);");
|
||||
TestDemoBindServiceBean.saveBean(this, bean);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
return (bean.isEnable()) ? START_STICKY : super.onStartCommand(intent, flags, startId);
|
||||
//return super.onStartCommand(intent, flags, startId);
|
||||
}
|
||||
|
||||
void run() {
|
||||
LogUtils.d(TAG, "run()");
|
||||
TestDemoBindServiceBean bean = TestDemoBindServiceBean.loadBean(this, TestDemoBindServiceBean.class);
|
||||
if (bean == null) {
|
||||
bean = new TestDemoBindServiceBean();
|
||||
TestDemoBindServiceBean.saveBean(this, bean);
|
||||
}
|
||||
if (bean.isEnable()) {
|
||||
LogUtils.d(TAG, "run() bean.isEnable()");
|
||||
TestThread.getInstance(this).start();
|
||||
LogUtils.d(TAG, "_TestThread.start()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
LogUtils.d(TAG, "onDestroy()");
|
||||
TestDemoBindServiceBean bean = TestDemoBindServiceBean.loadBean(this, TestDemoBindServiceBean.class);
|
||||
if (bean == null) {
|
||||
bean = new TestDemoBindServiceBean();
|
||||
}
|
||||
|
||||
TestThread.getInstance(this).setIsExit(true);
|
||||
|
||||
// 预防 APPBase 应用重启绑定失效。
|
||||
// 所以退出时检查本服务是否配置启用,如果启用就发送一个 SOS 信号。
|
||||
// 这样 APPBase 就会用组件方式启动本服务。
|
||||
if (bean.isEnable()) {
|
||||
if (App.isDebuging()) {
|
||||
SOS.sosToAppBaseBeta(this, TestDemoBindService.class.getName());
|
||||
} else {
|
||||
SOS.sosToAppBase(this, TestDemoBindService.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
_IsRunning = false;
|
||||
}
|
||||
|
||||
static class TestThread extends Thread {
|
||||
|
||||
volatile static TestThread _TestThread;
|
||||
Context mContext;
|
||||
volatile boolean isStarted = false;
|
||||
volatile boolean isExit = false;
|
||||
|
||||
TestThread(Context context) {
|
||||
super();
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public static synchronized TestThread getInstance(Context context) {
|
||||
if (_TestThread != null) {
|
||||
_TestThread.setIsExit(true);
|
||||
}
|
||||
_TestThread = new TestThread(context);
|
||||
|
||||
return _TestThread;
|
||||
}
|
||||
|
||||
public synchronized void setIsExit(boolean isExit) {
|
||||
this.isExit = isExit;
|
||||
}
|
||||
|
||||
public boolean isExit() {
|
||||
return isExit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (isStarted == false) {
|
||||
isStarted = true;
|
||||
super.run();
|
||||
LogUtils.d(TAG, "run() start");
|
||||
if (App.isDebuging()) {
|
||||
WinBoLL.bindToAPPBaseBeta(mContext, TestDemoBindService.class.getName());
|
||||
} else {
|
||||
WinBoLL.bindToAPPBase(mContext, TestDemoBindService.class.getName());
|
||||
}
|
||||
|
||||
while (!isExit()) {
|
||||
LogUtils.d(TAG, "run()");
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
LogUtils.d(TAG, "run() exit");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|