Compare commits
569 Commits
apputils-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 | ||
![]() |
473dd627fe | ||
![]() |
dc8dcc35dd | ||
![]() |
80c00a86b0 | ||
![]() |
35c639e7c9 | ||
![]() |
05cc5c72f8 | ||
![]() |
b497faa0b9 | ||
![]() |
603640b3cb | ||
![]() |
5b06ce9699 | ||
![]() |
363fc6c7c1 | ||
![]() |
7f43f8b5c5 | ||
![]() |
a117e6e110 | ||
![]() |
c1f576e343 | ||
![]() |
f43c40e317 | ||
![]() |
3eaec5ed73 | ||
![]() |
1dad84b65e | ||
![]() |
1ae377e665 | ||
![]() |
02fa0a4134 | ||
![]() |
a730aa3f92 | ||
![]() |
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 | ||
![]() |
e3571ae39f | ||
![]() |
261c87a42d | ||
![]() |
0db31c07ba | ||
![]() |
87dea88e36 | ||
![]() |
5779f195f8 | ||
![]() |
c55183b10c | ||
![]() |
1204f295e1 | ||
![]() |
fbd6ed9cf4 | ||
![]() |
32d3960e03 | ||
![]() |
39b16318f9 | ||
![]() |
9afb1751a6 | ||
![]() |
48165364d1 | ||
![]() |
e98f62149d | ||
![]() |
02f2d4f0bc | ||
![]() |
f6bece28ac | ||
![]() |
559f1c58ba | ||
![]() |
4bb814308b | ||
![]() |
05a9fc5275 | ||
![]() |
74d5239898 | ||
![]() |
948141d5a9 | ||
![]() |
3535df8b3e | ||
![]() |
bd4ba7b291 | ||
![]() |
9ff8b1ed80 | ||
![]() |
859238a173 | ||
![]() |
53eced104e | ||
![]() |
b45119b487 | ||
![]() |
fdddde33b5 | ||
![]() |
f263733609 | ||
![]() |
51a1cf1e26 | ||
![]() |
093772c824 | ||
![]() |
bf3e9bdc91 | ||
![]() |
0f72817b50 | ||
![]() |
c827b2cbad | ||
![]() |
23892192b9 | ||
![]() |
e1b48fb6c5 | ||
![]() |
6dc042e0ec | ||
![]() |
53a74cc9ea | ||
![]() |
1ac91f5c1e | ||
![]() |
e0e001c417 | ||
![]() |
02673d19dd | ||
![]() |
38884d3457 | ||
![]() |
ecb56df773 | ||
![]() |
a15f6bad8f | ||
![]() |
2f0293103c | ||
![]() |
d4135f0104 | ||
![]() |
bdb9bc7637 | ||
![]() |
e7633e53ed | ||
![]() |
3734a659ff | ||
![]() |
b9f740c386 | ||
![]() |
c01a739b9d | ||
![]() |
7f8ee8d6de | ||
![]() |
c90d8549b4 | ||
![]() |
f3d97fc94b | ||
![]() |
8f8c3c6c97 | ||
![]() |
61200c37be | ||
![]() |
ebee402c84 | ||
![]() |
0a7a26d3cd | ||
![]() |
6410eda84e | ||
![]() |
c91c9c9887 | ||
![]() |
6450faa556 |
3
.gitmodules
vendored
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"]
|
[submodule "libjc/jcc/libs"]
|
||||||
path = libjc/jcc/libs
|
path = libjc/jcc/libs
|
||||||
url = https://gitea.winboll.cc/Studio/APP_libjc_jcc_libs.git
|
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提取其后的值
|
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||||
## 设新的 WinBoll 标签
|
## 设新的 WinBoLL 标签
|
||||||
# 脚本调试时使用
|
# 脚本调试时使用
|
||||||
#tag="v7.6.4-test1"
|
#tag="v7.6.4-test1"
|
||||||
# 正式设置标签时使用
|
# 正式设置标签时使用
|
||||||
|
@@ -38,24 +38,24 @@ function askAddWorkflowsTag {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function addWinBollTag {
|
function addWinBoLLTag {
|
||||||
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
||||||
# 如果文件中有 publishVersion 这一项,
|
# 如果文件中有 publishVersion 这一项,
|
||||||
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||||
## 设新的 WinBoll 标签
|
## 设新的 WinBoLL 标签
|
||||||
# 脚本调试时使用
|
# 脚本调试时使用
|
||||||
#tag="projectname-v7.6.4-test1"
|
#tag="projectname-v7.6.4-test1"
|
||||||
# 正式设置标签时使用
|
# 正式设置标签时使用
|
||||||
tag=$1"-v"${PUBLISH_VERSION}
|
tag=$1"-v"${PUBLISH_VERSION}
|
||||||
echo "< WinBoll Tag To: $tag >";
|
echo "< WinBoLL Tag To: $tag >";
|
||||||
# 检查是否已经添加了 WinBoll Tag
|
# 检查是否已经添加了 WinBoLL Tag
|
||||||
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
||||||
echo -e "< WinBoll Tag ${tag} exist! >"
|
echo -e "< WinBoLL Tag ${tag} exist! >"
|
||||||
return 1 # WinBoll标签重复
|
return 1 # WinBoLL标签重复
|
||||||
fi
|
fi
|
||||||
# 添加WinBoll标签
|
# 添加WinBoLL标签
|
||||||
git tag -a ${tag} -F $1/app_update_description.txt
|
git tag -a ${tag} -F $1/app_update_description.txt
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -119,22 +119,22 @@ if [[ $? -eq 0 ]]; then
|
|||||||
echo $result
|
echo $result
|
||||||
|
|
||||||
# 发布应用
|
# 发布应用
|
||||||
echo "Publishing WinBoll APK ..."
|
echo "Publishing WinBoLL APK ..."
|
||||||
# 脚本调试时使用
|
# 脚本调试时使用
|
||||||
#bash gradlew :$1:assembleBetaDebug
|
#bash gradlew :$1:assembleBetaDebug
|
||||||
# 正式发布
|
# 正式发布
|
||||||
bash gradlew :$1:assembleStageRelease
|
bash gradlew :$1:assembleStageRelease
|
||||||
echo "Publishing WinBoll APK OK."
|
echo "Publishing WinBoLL APK OK."
|
||||||
|
|
||||||
# 添加 WinBoll 标签
|
# 添加 WinBoLL 标签
|
||||||
result=$(addWinBollTag $1)
|
result=$(addWinBoLLTag $1)
|
||||||
echo $result
|
echo $result
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo $result
|
echo $result
|
||||||
# WinBoll 标签添加成功
|
# WinBoLL 标签添加成功
|
||||||
else
|
else
|
||||||
echo -e "${0}: addWinBollTag $1\n${result}\nAdd WinBoll tag cancel."
|
echo -e "${0}: addWinBoLLTag $1\n${result}\nAdd WinBoLL tag cancel."
|
||||||
exit 1 # addWinBollTag 异常
|
exit 1 # addWinBoLLTag 异常
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 添加 GitHub 工作流标签
|
# 添加 GitHub 工作流标签
|
||||||
|
@@ -38,24 +38,24 @@ function askAddWorkflowsTag {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function addWinBollTag {
|
function addWinBoLLTag {
|
||||||
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
# 就读取脚本 .winboll/winboll_app_build.gradle 生成的 publishVersion。
|
||||||
# 如果文件中有 publishVersion 这一项,
|
# 如果文件中有 publishVersion 这一项,
|
||||||
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
# 使用grep找到包含"publishVersion="的那一行,然后用awk提取其后的值
|
||||||
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
PUBLISH_VERSION=$(grep -o "publishVersion=.*" $1/build.properties | awk -F '=' '{print $2}')
|
||||||
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
echo "< $1/build.properties publishVersion : ${PUBLISH_VERSION} >"
|
||||||
## 设新的 WinBoll 标签
|
## 设新的 WinBoLL 标签
|
||||||
# 脚本调试时使用
|
# 脚本调试时使用
|
||||||
#tag="v7.6.4-test1"
|
#tag="v7.6.4-test1"
|
||||||
# 正式调试版设置标签时使用
|
# 正式调试版设置标签时使用
|
||||||
tag=$1"-v"${PUBLISH_VERSION}"-debug"
|
tag=$1"-v"${PUBLISH_VERSION}"-debug"
|
||||||
echo "< WinBoll Tag To: $tag >";
|
echo "< WinBoLL Tag To: $tag >";
|
||||||
# 检查是否已经添加了 WinBoll Tag
|
# 检查是否已经添加了 WinBoLL Tag
|
||||||
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
if [ "$(git tag -l ${tag})" == "${tag}" ]; then
|
||||||
echo -e "< WinBoll Tag ${tag} exist! >"
|
echo -e "< WinBoLL Tag ${tag} exist! >"
|
||||||
return 1 # WinBoll标签重复
|
return 1 # WinBoLL标签重复
|
||||||
fi
|
fi
|
||||||
# 添加WinBoll标签
|
# 添加WinBoLL标签
|
||||||
git tag -a ${tag} -F $1/app_update_description.txt
|
git tag -a ${tag} -F $1/app_update_description.txt
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -119,22 +119,22 @@ if [[ $? -eq 0 ]]; then
|
|||||||
echo $result
|
echo $result
|
||||||
|
|
||||||
# 发布应用
|
# 发布应用
|
||||||
echo "Publishing WinBoll Debug APK ..."
|
echo "Publishing WinBoLL Debug APK ..."
|
||||||
# 脚本调试时使用
|
# 脚本调试时使用
|
||||||
#bash gradlew :$1:assembleBetaDebug
|
#bash gradlew :$1:assembleBetaDebug
|
||||||
# 正式发布调试版
|
# 正式发布调试版
|
||||||
bash gradlew :$1:assembleStageDebug
|
bash gradlew :$1:assembleStageDebug
|
||||||
echo "Publishing WinBoll Debug APK OK."
|
echo "Publishing WinBoLL Debug APK OK."
|
||||||
|
|
||||||
# 添加 WinBoll 标签
|
# 添加 WinBoLL 标签
|
||||||
result=$(addWinBollTag $1)
|
result=$(addWinBoLLTag $1)
|
||||||
echo $result
|
echo $result
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo $result
|
echo $result
|
||||||
# WinBoll 标签添加成功
|
# WinBoLL 标签添加成功
|
||||||
else
|
else
|
||||||
echo -e "${0}: addWinBollTag $1\n${result}\nAdd WinBoll tag cancel."
|
echo -e "${0}: addWinBoLLTag $1\n${result}\nAdd WinBoLL tag cancel."
|
||||||
exit 1 # addWinBollTag 异常
|
exit 1 # addWinBoLLTag 异常
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 添加 GitHub 工作流标签
|
# 添加 GitHub 工作流标签
|
||||||
|
@@ -8,7 +8,7 @@ if [ -z "$1" ]; then
|
|||||||
fi
|
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 {
|
android {
|
||||||
@@ -31,18 +31,18 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "WinBollApp"
|
flavorDimensions "WinBoLLApp"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
beta {
|
beta {
|
||||||
// 检查编译标志位配置
|
// 检查编译标志位配置
|
||||||
assert (winbollBuildProps['buildCount'] != null)
|
assert (winbollBuildProps['buildCount'] != null)
|
||||||
dimension "WinBollApp"
|
dimension "WinBoLLApp"
|
||||||
applicationIdSuffix ".beta"
|
applicationIdSuffix ".beta"
|
||||||
LocalDateTime localDateTimeNow = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
LocalDateTime localDateTimeNow = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
||||||
versionNameSuffix "-beta" + winbollBuildProps['buildCount'] + "_" + localDateTimeNow.format('mmss')
|
versionNameSuffix "-beta" + winbollBuildProps['buildCount'] + "_" + localDateTimeNow.format('mmss')
|
||||||
}
|
}
|
||||||
stage {
|
stage {
|
||||||
dimension "WinBollApp"
|
dimension "WinBoLLApp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// WinBoll 应用包输出配置
|
// WinBoLL 应用包输出配置
|
||||||
// 1. 配置 Stage Release 版应用包输出
|
// 1. 配置 Stage Release 版应用包输出
|
||||||
// 2. 配置 Beta Debug 版应用包输出
|
// 2. 配置 Beta Debug 版应用包输出
|
||||||
//
|
//
|
||||||
@@ -74,13 +74,13 @@ android {
|
|||||||
//def outputFileName="${rootProject.name}_${versionName}.apk"
|
//def outputFileName="${rootProject.name}_${versionName}.apk"
|
||||||
def outputFileName=project.rootDir.name + "_${versionName}.apk"
|
def outputFileName=project.rootDir.name + "_${versionName}.apk"
|
||||||
|
|
||||||
// 创建 WinBoll Studio 发布接口文件夹
|
// 创建 WinBoLL Studio 发布接口文件夹
|
||||||
File fWinBollStudioDir = file("/sdcard/WinBollStudio/APKs");
|
File fWinBoLLStudioDir = file("/sdcard/WinBoLLStudio/APKs");
|
||||||
if(!fWinBollStudioDir.exists()) {
|
if(!fWinBoLLStudioDir.exists()) {
|
||||||
//fWinBollStudioDir.mkdirs();
|
//fWinBoLLStudioDir.mkdirs();
|
||||||
// 如果没有发布接口文件就不用进行APK发布和源码管理操作
|
// 如果没有发布接口文件就不用进行APK发布和源码管理操作
|
||||||
// 当前编译环境不是 WinBoll 主机, 以下将忽略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.'
|
println 'The current compilation environment is not in WinBoLL host, and the following APK publishing and source management operations will be ignore.'
|
||||||
} else {
|
} else {
|
||||||
/// WINBOLL 主机的 APK 发布和源码管理操作 ///
|
/// WINBOLL 主机的 APK 发布和源码管理操作 ///
|
||||||
variant.getAssembleProvider().get().doFirst {
|
variant.getAssembleProvider().get().doFirst {
|
||||||
@@ -91,15 +91,15 @@ android {
|
|||||||
//
|
//
|
||||||
variant.getAssembleProvider().get().doLast {
|
variant.getAssembleProvider().get().doLast {
|
||||||
variant.outputs.forEach{ file->
|
variant.outputs.forEach{ file->
|
||||||
// 如果正在调试,就拷贝到 WinBoll 备份管理文件夹
|
// 如果正在调试,就拷贝到 WinBoLL 备份管理文件夹
|
||||||
//
|
//
|
||||||
if(variant.flavorName == "beta"&&variant.buildType.name == "debug"){
|
if(variant.flavorName == "beta"&&variant.buildType.name == "debug"){
|
||||||
//File outBuildBckDir = new File(fWinBollStudioDir, "/${rootProject.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}")
|
File outBuildBckDir = new File(fWinBoLLStudioDir, "/" + project.rootDir.name + "/${variant.buildType.name}")
|
||||||
// 创建目标路径目录
|
// 创建目标路径目录
|
||||||
if(!outBuildBckDir.exists()) {
|
if(!outBuildBckDir.exists()) {
|
||||||
outBuildBckDir.mkdirs();
|
outBuildBckDir.mkdirs();
|
||||||
println "Output Folder Created.(WinBollStudio) : " + outBuildBckDir.getAbsolutePath()
|
println "Output Folder Created.(WinBoLLStudio) : " + outBuildBckDir.getAbsolutePath()
|
||||||
}
|
}
|
||||||
if(outBuildBckDir.exists()) {
|
if(outBuildBckDir.exists()) {
|
||||||
copy{
|
copy{
|
||||||
@@ -108,7 +108,7 @@ android {
|
|||||||
rename {
|
rename {
|
||||||
String fileName -> "${outputFileName}"
|
String fileName -> "${outputFileName}"
|
||||||
}
|
}
|
||||||
println "Output APK (WinBollStudio): " + outBuildBckDir.getAbsolutePath() + "/${outputFileName}"
|
println "Output APK (WinBoLLStudio): " + outBuildBckDir.getAbsolutePath() + "/${outputFileName}"
|
||||||
}
|
}
|
||||||
// 检查编译标志位配置
|
// 检查编译标志位配置
|
||||||
assert (winbollBuildProps['buildCount'] != null)
|
assert (winbollBuildProps['buildCount'] != null)
|
||||||
@@ -137,7 +137,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果正在发布,就拷贝到 WinBoll 标签管理文件夹
|
// 如果正在发布,就拷贝到 WinBoLL 标签管理文件夹
|
||||||
//
|
//
|
||||||
if((variant.flavorName == "stage"&&variant.buildType.name == "debug")
|
if((variant.flavorName == "stage"&&variant.buildType.name == "debug")
|
||||||
|| (variant.flavorName == "stage"&&variant.buildType.name == "release")){
|
|| (variant.flavorName == "stage"&&variant.buildType.name == "release")){
|
||||||
@@ -151,8 +151,8 @@ android {
|
|||||||
String szCommonTagAPKName = project.rootDir.name + "_" + szShortVersionName + ".apk"
|
String szCommonTagAPKName = project.rootDir.name + "_" + szShortVersionName + ".apk"
|
||||||
println "CommonTagAPKName is : " + szCommonTagAPKName
|
println "CommonTagAPKName is : " + szCommonTagAPKName
|
||||||
|
|
||||||
//File outTagDir = new File(fWinBollStudioDir, "/${rootProject.name}/tag/")
|
//File outTagDir = new File(fWinBoLLStudioDir, "/${rootProject.name}/tag/")
|
||||||
File outTagDir = new File(fWinBollStudioDir, "/" + project.rootDir.name + "/tag/")
|
File outTagDir = new File(fWinBoLLStudioDir, "/" + project.rootDir.name + "/tag/")
|
||||||
// 创建目标路径目录
|
// 创建目标路径目录
|
||||||
if(!outTagDir.exists()) {
|
if(!outTagDir.exists()) {
|
||||||
outTagDir.mkdirs();
|
outTagDir.mkdirs();
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// 本机和 WinBoll Maven 仓库传输配置。
|
// 本机和 WinBoLL Maven 仓库传输配置。
|
||||||
//
|
//
|
||||||
|
|
||||||
def getDefaultVersion(){
|
def getDefaultVersion(){
|
||||||
@@ -9,12 +9,12 @@ def getDefaultVersion(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
def siteUrl = 'https://winboll.cc/?page=studio/details.php&app=${rootProject.name}' // 项目主页
|
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 DefaultGroupId = 'cc.winboll.studio' // 类库所有者groupId
|
||||||
def DefaultVersion = getDefaultVersion() // 版本号
|
def DefaultVersion = getDefaultVersion() // 版本号
|
||||||
def DeveloperId='zhangsken' // 开发者账号
|
def DeveloperId='zhangsken' // 开发者账号
|
||||||
def DeveloperName='ZhanGSKen' // 开发者名称
|
def DeveloperName='ZhanGSKen' // 开发者名称
|
||||||
def DeveloperEMail='ZhanGSKen@QQ.COM' // 开发者邮箱地址
|
def DeveloperEMail='zhangsken@188.com' // 开发者邮箱地址
|
||||||
def LicenseName='The Apache Software License, Version 2.0'
|
def LicenseName='The Apache Software License, Version 2.0'
|
||||||
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
|
||||||
@@ -27,10 +27,10 @@ afterEvaluate {
|
|||||||
properties.load(file("${RootProjectDir}/${winbollFilePath}").newDataInputStream())
|
properties.load(file("${RootProjectDir}/${winbollFilePath}").newDataInputStream())
|
||||||
def NexusUserName = properties.getProperty("Nexus.name")
|
def NexusUserName = properties.getProperty("Nexus.name")
|
||||||
def NexusPassword = properties.getProperty("Nexus.password")
|
def NexusPassword = properties.getProperty("Nexus.password")
|
||||||
// WinBoll Release 仓库
|
// WinBoLL Release 仓库
|
||||||
maven{
|
maven{
|
||||||
//仓库的名字和地址
|
//仓库的名字和地址
|
||||||
name = "WinBollRelease"
|
name = "WinBoLLRelease"
|
||||||
url="https://nexus.winboll.cc/repository/maven-releases/"
|
url="https://nexus.winboll.cc/repository/maven-releases/"
|
||||||
// 仓库用户名密码
|
// 仓库用户名密码
|
||||||
credentials {
|
credentials {
|
||||||
@@ -38,10 +38,10 @@ afterEvaluate {
|
|||||||
password = NexusPassword
|
password = NexusPassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// WinBoll Snapshot 仓库
|
// WinBoLL Snapshot 仓库
|
||||||
maven{
|
maven{
|
||||||
//仓库的名字和地址
|
//仓库的名字和地址
|
||||||
name = "WinBollSnapshot"
|
name = "WinBoLLSnapshot"
|
||||||
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
||||||
// 仓库用户名密码
|
// 仓库用户名密码
|
||||||
credentials {
|
credentials {
|
||||||
@@ -101,9 +101,9 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WinBoll Maven Release 仓库传输任务
|
// WinBoLL Maven Release 仓库传输任务
|
||||||
//
|
//
|
||||||
releaseWinBoll(MavenPublication) {
|
releaseWinBoLL(MavenPublication) {
|
||||||
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
//from components.free
|
//from components.free
|
||||||
|
|
||||||
@@ -154,9 +154,9 @@ afterEvaluate {
|
|||||||
|
|
||||||
} // 创建名为 release 的任务结束
|
} // 创建名为 release 的任务结束
|
||||||
|
|
||||||
// WinBoll Maven Snapshot 仓库传输任务
|
// WinBoLL Maven Snapshot 仓库传输任务
|
||||||
//
|
//
|
||||||
snapshotWinBoll(MavenPublication) {
|
snapshotWinBoLL(MavenPublication) {
|
||||||
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
//from components.free
|
//from components.free
|
||||||
|
|
||||||
|
127
README.md
127
README.md
@@ -1,23 +1,23 @@
|
|||||||
# ☁ ☁ ☁ WinBoll APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
# ☁ ☁ ☁ WinBoLL APP ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||||
# ☁ ☁ 这是 WinBoll 系列 APP 汇总项目。☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
# ☁ ☁ WinBoLL Studio Android 应用开源项目。☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||||
# ☁ ☁ ☁ WinBoll 网站地址 https://www.winboll.cc/studio/app/ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
# ☁ ☁ ☁ WinBoLL 网站地址 https://www.winboll.cc/ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
|
||||||
|
|
||||||
## WinBoll 提问
|
## WinBoLL 提问
|
||||||
同样是 /sdcard 目录,在开发 Android 应用时,
|
同样是 /sdcard 目录,在开发 Android 应用时,
|
||||||
能否实现手机编译与电脑编译的源码同步。
|
能否实现手机编译与电脑编译的源码同步。
|
||||||
☁因而 WinBoll 项目组诞生了。
|
☁因而 WinBoLL 项目组诞生了。
|
||||||
|
|
||||||
## WinBoll 项目组研发计划
|
## WinBoLL 项目组研发计划
|
||||||
致力于把 WinBoll-APP 应用在手机端 Android 项目开发。
|
致力于把 WinBoLL-APP 应用在手机端 Android 项目开发。
|
||||||
也在探索 https://gitea.winboll.cc/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP APK 分发。
|
也在探索 https://gitea.winboll.cc/<WinBoLL 项目组>/APP.git 应用于 WinBoLL-APP APK 分发。
|
||||||
更想进阶 https://github.com/<WinBoll 项目组>/WinBoll-APP.git 应用于 WinBoll-APP Beta APK 分发。
|
更想进阶 https://github.com/<WinBoLL 项目组>/APP.git 应用于 WinBoLL-APP Beta APK 分发。
|
||||||
|
|
||||||
## WinBoll-APP 汗下...
|
## WinBoLL-APP 汗下...
|
||||||
#### ☁应用何置如此呢。且观用户云云。
|
#### ☁应用何置如此呢。且观用户云云。
|
||||||
|
|
||||||
#### ☁ 正当下 ☁ ###
|
#### ☁ 正当下 ☁ ###
|
||||||
#### ☁ 且容傻家叙说 ☁ WinBoll-APP 应用场景
|
#### ☁ 且容傻家叙说 ☁ WinBoLL-APP 应用场景
|
||||||
### ☁ WinBoll 设备资源概述
|
### ☁ WinBoLL 设备资源概述
|
||||||
#### ☁ 1. Raid Disk.
|
#### ☁ 1. Raid Disk.
|
||||||
概述:这是一个矩阵存储类设备。
|
概述:这是一个矩阵存储类设备。
|
||||||
优点:该设备具有数据容错存储功能,
|
优点:该设备具有数据容错存储功能,
|
||||||
@@ -40,74 +40,79 @@
|
|||||||
设备位于操作系统内部文件系统。
|
设备位于操作系统内部文件系统。
|
||||||
数据持久性与操作系统挂钩。
|
数据持久性与操作系统挂钩。
|
||||||
|
|
||||||
#### ☁ 4. WinBoll 用户资源概述。
|
#### ☁ 4. WinBoLL 用户资源概述。
|
||||||
1> /home/<用户名> 位于 WinBoll 操作系统目录下。
|
1> /home/<用户名> 位于 WinBoLL 操作系统目录下。
|
||||||
2> /rdisk/<用户名> 挂载用户 Raid Disk.
|
2> /rdisk/<用户名> 挂载用户 Raid Disk.
|
||||||
3> /data/<用户名> 挂载用户 Data Disk.
|
3> /data/<用户名> 挂载用户 Data Disk.
|
||||||
4> /sdcard/<用户名> 挂载用户 SSD Disk.
|
4> /sdcard/<用户名> 挂载用户 SSD Disk.
|
||||||
|
|
||||||
#### ☁ 5. WinBoll-APP 用户资源概述。
|
#### ☁ 5. WinBoLL-APP 用户资源概述。
|
||||||
1> /sdcard 挂载用户手机 SD 存储/storage/emulated/0
|
1> /sdcard 挂载用户手机 SD 存储/storage/emulated/0
|
||||||
|
|
||||||
### ☁ 稍稍歇 ☁ ###
|
### ☁ 稍稍歇 ☁ ###
|
||||||
### ☁ 急急停 ☁ WinBoll 应用前置条件
|
### ☁ 急急停 ☁ WinBoLL 应用前置条件
|
||||||
☁ WinBoll 主机建立 1Panel MySQL 应用。
|
☁ WinBoLL 主机建立 1Panel MySQL 应用。
|
||||||
☁ WinBoll 主机建立 1Panel Gitea 应用。
|
☁ WinBoLL 主机建立 1Panel Gitea 应用。
|
||||||
☁ WinBoll 主机设置 WinBoll 应用为非登录状态。
|
☁ WinBoLL 主机设置 WinBoLL 应用为非登录状态。
|
||||||
☁ WinBoll 主机建立 WinBoll 账户与 WinBoll 用户组。
|
☁ WinBoLL 主机建立 WinBoLL 账户与 WinBoLL 用户组。
|
||||||
☁ WinBoll 账户 User ID 为: winboll。
|
☁ WinBoLL 账户 User ID 为: J。
|
||||||
☁ WinBoll 用户组 Group ID 为: winboll。
|
☁ WinBoLL 用户组 Group ID 为: Studio。
|
||||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 建立 WinBoll 工作组。
|
☁ WinBoLL 主机 WinBoLL 1Panel Gitea 建立 WinBoLL 工作组。
|
||||||
☁ WinBoll 主机 WinBoll 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/<用户名>/WinBoll/app/
|
☁ WinBoLL 主机 WinBoLL 1Panel Gitea 用户项目 APK 编译输出目录为 /sdcard/WinBoLLStudio/<用户名>/APKs/
|
||||||
☁ WinBoll 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/winboll.properties-demo"(WinBoll 项目已设置)
|
☁ WinBoLL 项目配置文件示例为 "<WinBoLL 项目根目录>/.winboll/winboll.properties-demo"(WinBoLL 项目已设置)
|
||||||
☁ WinBoll 项目配置文件为 "<WinBoll 项目根目录>/.winboll/winboll.properties"
|
☁ WinBoLL 项目配置文件为 "<WinBoLL 项目根目录>/.winboll/winboll.properties"
|
||||||
☁ WinBoll 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
☁ WinBoLL 项目配置文件设定为源码提交时忽略。(WinBoLL 项目已设置)
|
||||||
☁ Gradle 项目配置文件示例为 "<WinBoll 项目根目录>/.winboll/local.properties-demo"(WinBoll 项目已设置)
|
☁ Gradle 项目配置文件示例为 "<WinBoLL 项目根目录>/.winboll/local.properties-demo"(WinBoLL 项目已设置)
|
||||||
☁ Gradle 项目配置文件为 "<WinBoll 项目根目录>/local.properties"(WinBoll 项目已设置)
|
☁ Gradle 项目配置文件为 "<WinBoLL 项目根目录>/local.properties"(WinBoLL 项目已设置)
|
||||||
☁ Gradle 项目配置文件设定为源码提交时忽略。(WinBoll 项目已设置)
|
☁ Gradle 项目配置文件设定为源码提交时忽略。(WinBoLL 项目已设置)
|
||||||
|
|
||||||
### ☁ 登高处 ☁ WinBoll 应用需求规划
|
### ☁ 登高处 ☁ WinBoLL 应用需求规划
|
||||||
☁ WinBoll 主机建立 WinBoll 客户端用户数据库为 MySQL winbollclient 数据库。
|
☁ WinBoLL 主机建立 WinBoLL 客户端用户数据库为 MySQL winbollclient 数据库。
|
||||||
☁ WinBoll 主机设置 WinBoll 客户端用户信息存储在 winbollclient 数据库中。
|
☁ WinBoLL 主机设置 WinBoLL 客户端用户信息存储在 winbollclient 数据库中。
|
||||||
☁ MySQL winbollclient 数据库中
|
☁ MySQL winbollclient 数据库中
|
||||||
WinBoll 客户端用户信息设定为:
|
WinBoLL 客户端用户信息设定为:
|
||||||
<用户名, 验证密码, 验证邮箱, 验证手机, 唯一存储令牌Token, 备用验证邮箱>。
|
<用户名, 验证密码, 验证邮箱, 验证手机, 唯一存储令牌Token, 备用验证邮箱>。
|
||||||
☁ WinBoll 项目源码仓库托管在 WinBoll 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/winboll/winboll.git中。
|
☁ WinBoLL 项目源码仓库托管在 WinBoLL 1Panel Gitea 目录 /opt/1panel/apps/gitea/gitea/data/git/repositories/studio/app.git中。
|
||||||
☁ WinBoll 主机提供 WinBoll 1Panel Gitea 应用的 WinBoll 项目源码仓库存取功能。(Gitea 应用已提供)
|
☁ WinBoLL 主机提供 WinBoLL 1Panel Gitea 应用的 WinBoLL 项目源码仓库存取功能。(Gitea 应用已提供)
|
||||||
☁ WinBoll 主机提供 WinBoll Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
☁ WinBoLL 主机提供 WinBoLL Gitea 项目仓库存档功能。(Gitea 应用已提供)
|
||||||
☁ 提供 WinBoll 客户端用户登录功能。(Gitea 应用已提供)
|
☁ 提供 WinBoLL 客户端用户登录功能。(Gitea 应用已提供)
|
||||||
|
|
||||||
### ☁ 看远方 ☁ ###
|
### ☁ 看远方 ☁ ###
|
||||||
### ☁ 心忧虑 ☁ WinBoll-APP 应用前置需求
|
### ☁ 心忧虑 ☁ WinBoLL-APP 应用前置需求
|
||||||
☁ WinBoll-APP WinBoll 项目根目录设定为手机的 /sdcard/WinBoll 目录。(需要用户手动建立文件夹)
|
☁ WinBoLL-APP WinBoLL 项目根目录设定为手机的 /sdcard/WinBoLLStudio/Sources 目录。(需要用户手动建立文件夹)
|
||||||
☁ WinBoll-APP 具有手机 /sdcard/WinBoll 目录的存储权限。(需要手机操作系统授权)
|
☁ WinBoLL-APP 具有手机 /sdcard/WinBoLL 目录的存储权限。(需要手机操作系统授权)
|
||||||
☁ WinBoll-APP WinBoll 项目仓库源码存储路径为 /sdcard/WinBoll/repositories/winboll.git(需要用户手动建立文件夹)
|
☁ WinBoLL-APP WinBoLL 项目仓库源码存储路径为 /sdcard/WinBoLLStudio/Sources/APP.git(需要用户手动建立文件夹)
|
||||||
☁ WinBoll-APP 项目 APK 编译输出目录为 /sdcard/WinBoll/app/
|
☁ WinBoLL-APP 项目 APK 编译输出目录为 /sdcard/WinBoLLStudio/APKs/
|
||||||
☁ WinBoll-APP 应用签名验证可定制化。(WinBoll 项目已提供)
|
☁ WinBoLL-APP 应用签名验证可定制化。(WinBoLL 项目已提供)
|
||||||
☁ WinBoll-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoll 项目已提供)
|
☁ WinBoLL-APP 与系列衍生 APP 应用共享 cc.winboll.studio 命名空间资源。(WinBoLL 项目已提供)
|
||||||
☁ WinBoll-APP 用户客户端信息存储在命名空间为 WinBoll APP MySQLLite 应用的 winbollappclient 数据库中。
|
☁ WinBoLL-APP 用户客户端信息存储在命名空间为 WinBoLL APP MySQLLite 应用的 winbollappclient 数据库中。
|
||||||
☁ WinBoll-APP MySQLLite 应用的 winbollappclient 数据库中,
|
☁ WinBoLL-APP MySQLLite 应用的 winbollappclient 数据库中,
|
||||||
WinBoll 用户客户端信息设定为:
|
WinBoLL 用户客户端信息设定为:
|
||||||
<用户名, 唯一存储令牌Token>。
|
<用户名, 唯一存储令牌Token>。
|
||||||
|
|
||||||
### ☁ 云游四方 ☁ ###
|
### ☁ 云游四方 ☁ ###
|
||||||
### ☁ 呔! ☁ WinBoll-APP 应用需求规划
|
### ☁ 呔! ☁ WinBoLL-APP 应用需求规划
|
||||||
☁ WinBoll-APP 提供手机目录 /sdcard/WinBoll 的 WinBoll 项目源码管理功能。
|
☁ 如要使用 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-APP 共享计划前景
|
||||||
☁ WinBoll 将会提供 gitea.winboll.cc 域名用户注册登录功能。
|
☁ WinBoLL-APP 将会实现 https://winboll.cc/api 访问功能。
|
||||||
☁ WinBoll 将会提供 WinBoll-APP 及其衍生应用的 Gitea 仓库管理服务。
|
☁ WinBoLL-APP 将会实现手机端 Android 应用的开发与管理功能。
|
||||||
☁ WinBoll 将会提供 winboll.cc 域名 WinBoll 项目组注册登录功能。
|
|
||||||
|
## ☁ WinBoLL ☁ WinBoLL 主机忧虑
|
||||||
|
☁ WinBoLL 将会提供 gitea.winboll.cc 域名用户注册登录功能。
|
||||||
|
☁ WinBoLL 将会提供 WinBoLL-APP 及其衍生应用的 Gitea 仓库管理服务。
|
||||||
|
☁ WinBoLL 将会提供 winboll.cc 域名 WinBoLL 项目组注册登录功能。
|
||||||
|
|
||||||
# 本项目要实际运用需要注意以下几个步骤:
|
# 本项目要实际运用需要注意以下几个步骤:
|
||||||
# 在项目根目录下:
|
# 在项目根目录下:
|
||||||
## 1. 项目模块编译环境设置(必须),settings.gradle-demo 要复制为 settings.gradle,并取消相应项目模块的注释。
|
## 1. 项目模块编译环境设置(必须),settings.gradle-demo 要复制为 settings.gradle,并取消相应项目模块的注释。
|
||||||
## 2. 项目 Android SDK 编译环境设置(可选),local.properties-demo 要复制为 local.properties,并按需要设置 Android SDK 目录。
|
## 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=<类库项目模块文件夹名称>
|
设置属性 libraryProject=<类库项目模块文件夹名称>
|
||||||
### 再编译测试项目
|
### 再编译测试项目
|
||||||
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
||||||
#### 测试项目编译后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBollStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
#### 测试项目编译后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBoLLStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||||
### 最后编译类库项目
|
### 最后编译类库项目
|
||||||
$ bash .winboll/bashPublishLIBAddTag.sh <类库项目模块文件夹名称>
|
$ bash .winboll/bashPublishLIBAddTag.sh <类库项目模块文件夹名称>
|
||||||
#### 类库模块编译命令执行后,编译器会发布到 WinBoll Nexus Maven 库:Maven 库地址可以参阅根项目目录配置 build.gradle 文件。
|
#### 类库模块编译命令执行后,编译器会发布到 WinBoLL Nexus Maven 库:Maven 库地址可以参阅根项目目录配置 build.gradle 文件。
|
||||||
|
|
||||||
# ☆应用型项目编译方法
|
# ☆应用型项目编译方法
|
||||||
## 直接调用以下命令编译应用型项目
|
## 直接调用以下命令编译应用型项目
|
||||||
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
$ bash .winboll/bashPublishAPKAddTag.sh <应用项目模块文件夹名称>
|
||||||
#### 应用模块编译命令执行后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBollStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
#### 应用模块编译命令执行后,编译器会复制一份 APK 到以下路径:"/sdcard/WinBoLLStudio/APKs/<项目根目录名称>/tag/" 文件夹。
|
||||||
|
@@ -19,7 +19,7 @@ def genVersionName(def versionName){
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 32
|
||||||
buildToolsVersion "33.0.3"
|
buildToolsVersion "32.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.aes"
|
applicationId "cc.winboll.studio.aes"
|
||||||
@@ -29,7 +29,7 @@ android {
|
|||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "7.6"
|
versionName "15.6"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -41,29 +41,9 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':libaes')
|
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'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Sun Jan 19 04:58:59 GMT 2025
|
#Sun May 04 06:42:28 GMT 2025
|
||||||
stageCount=3
|
stageCount=1
|
||||||
libraryProject=libaes
|
libraryProject=libaes
|
||||||
baseVersion=7.6
|
baseVersion=15.6
|
||||||
publishVersion=7.6.2
|
publishVersion=15.6.0
|
||||||
buildCount=4
|
buildCount=10
|
||||||
baseBetaVersion=7.6.3
|
baseBetaVersion=15.6.1
|
||||||
|
@@ -8,9 +8,10 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/WinBoll.SupportThemeNoActionBar"
|
android:theme="@style/MyAESTheme"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="true">
|
android:supportsRtl="true"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@@ -30,6 +31,8 @@
|
|||||||
android:name="android.max_aspect"
|
android:name="android.max_aspect"
|
||||||
android:value="4.0"/>
|
android:value="4.0"/>
|
||||||
|
|
||||||
|
<activity android:name=".AboutActivity"/>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
93
aes/src/main/java/cc/winboll/studio/aes/AboutActivity.java
Normal file
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
|
* @Date 2024/06/13 19:03:58
|
||||||
* @Describe AES应用类
|
* @Describe AES应用类
|
||||||
*/
|
*/
|
||||||
|
import android.view.Gravity;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.hjq.toast.style.WhiteToastStyle;
|
||||||
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
public static final String TAG = "App";
|
public static final String TAG = "App";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.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
|
* @Date 2024/06/13 19:05:52
|
||||||
* @Describe 应用主窗口
|
* @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";
|
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,17 +6,17 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.widget.Toolbar
|
<cc.winboll.studio.libaes.views.ASupportToolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activityaboutToolbar1"/>
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:id="@+id/activityaboutLinearLayout1"/>
|
android:id="@+id/aboutviewroot_ll"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
@@ -13,7 +13,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/item_localfileselectdialog"
|
android:id="@+id/item_localfileselectdialog"
|
||||||
android:title="LocalFileSelectDialog"/>
|
android:title="LocalFileSelectDialog"/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/item_atoolbar"
|
android:id="@+id/item_atoolbar"
|
||||||
android:title="Test AToolbar"/>
|
android:title="Test AToolbar"/>
|
7
aes/src/main/res/values/colors.xml
Normal file
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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="MyAESTheme" parent="AESTheme">
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
6
aes/src/main/res/xml/network_security_config.xml
Normal file
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>
|
@@ -18,25 +18,18 @@ def genVersionName(def versionName){
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
productFlavors {
|
compileSdkVersion 32
|
||||||
beta {
|
buildToolsVersion "32.0.0"
|
||||||
}
|
|
||||||
stage {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.3"
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.androiddemo"
|
applicationId "cc.winboll.studio.androiddemo"
|
||||||
minSdkVersion 26
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "1.0"
|
versionName "15.0"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -53,22 +46,27 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
// 吐司类库
|
|
||||||
implementation 'com.github.getActivity:ToastUtils:10.5'
|
|
||||||
|
|
||||||
// Android 类库
|
// Android 类库
|
||||||
// https://mvnrepository.com/artifact/com.android.support/support-v4
|
//api 'com.android.support:appcompat-v7:28.0.0'
|
||||||
implementation 'com.android.support:support-v4: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
|
// https://mvnrepository.com/artifact/com.android.support/support-compat
|
||||||
implementation 'com.android.support:support-compat:28.0.0'
|
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
|
// https://mvnrepository.com/artifact/com.android.support/support-media-compat
|
||||||
implementation 'com.android.support:support-media-compat:28.0.0'
|
api 'com.android.support:support-media-compat:28.0.0'
|
||||||
// https://mvnrepository.com/artifact/com.android.support/support-core-utils
|
// https://mvnrepository.com/artifact/com.android.support/support-core-utils
|
||||||
implementation 'com.android.support:support-core-utils:28.0.0'
|
api 'com.android.support:support-core-utils:28.0.0'
|
||||||
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
|
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
|
||||||
implementation 'com.android.support:support-core-ui:28.0.0'
|
api 'com.android.support:support-core-ui:28.0.0'
|
||||||
// https://mvnrepository.com/artifact/com.android.support/support-fragment
|
// https://mvnrepository.com/artifact/com.android.support/support-fragment
|
||||||
implementation 'com.android.support:support-fragment:28.0.0'
|
api 'com.android.support:support-fragment:28.0.0'
|
||||||
// https://mvnrepository.com/artifact/com.android.support/recyclerview-v7
|
// https://mvnrepository.com/artifact/com.android.support/recyclerview-v7
|
||||||
implementation 'com.android.support:recyclerview-v7:28.0.0'
|
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'
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Mar 11 18:02:14 GMT 2025
|
#Thu Apr 03 03:17:18 GMT 2025
|
||||||
stageCount=0
|
stageCount=0
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=1.0
|
baseVersion=15.0
|
||||||
publishVersion=1.0.0
|
publishVersion=15.0.0
|
||||||
buildCount=1
|
buildCount=21
|
||||||
baseBetaVersion=1.0.1
|
baseBetaVersion=15.0.1
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:resizeableActivity="true"
|
android:resizeableActivity="true"
|
||||||
android:name=".GlobalApplication">
|
android:name=".App">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package cc.winboll.studio.androiddemo;
|
package cc.winboll.studio.androiddemo;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Application;
|
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -22,6 +21,7 @@ import android.widget.HorizontalScrollView;
|
|||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
@@ -39,15 +39,15 @@ import java.util.Date;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
public class GlobalApplication extends Application {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
CrashHandler.getInstance().registerGlobal(this);
|
//CrashHandler.getInstance().registerGlobal(this);
|
||||||
CrashHandler.getInstance().registerPart(this);
|
//CrashHandler.getInstance().registerPart(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void write(InputStream input, OutputStream output) throws IOException {
|
public static void write(InputStream input, OutputStream output) throws IOException {
|
||||||
@@ -252,7 +252,7 @@ public class GlobalApplication extends Application {
|
|||||||
|
|
||||||
private static String getKernel() {
|
private static String getKernel() {
|
||||||
try {
|
try {
|
||||||
return GlobalApplication.toString(new FileInputStream("/proc/version")).trim();
|
return App.toString(new FileInputStream("/proc/version")).trim();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
return e.getMessage();
|
return e.getMessage();
|
||||||
}
|
}
|
||||||
@@ -331,4 +331,4 @@ public class GlobalApplication extends Application {
|
|||||||
restart();
|
restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,15 +1,25 @@
|
|||||||
package cc.winboll.studio.androiddemo;
|
package cc.winboll.studio.androiddemo;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import cc.winboll.studio.libappbase.LogView;
|
||||||
public class MainActivity extends Activity {
|
|
||||||
|
public class MainActivity extends Activity {
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
LogView mLogView;
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
@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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -4,13 +4,34 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_vertical|center_horizontal">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:text="Android Demo"
|
android:gravity="center_vertical|center_horizontal"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@@ -18,25 +18,18 @@ def genVersionName(def versionName){
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
productFlavors {
|
compileSdkVersion 32
|
||||||
beta {
|
buildToolsVersion "32.0.0"
|
||||||
}
|
|
||||||
stage {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.3"
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.androidxdemo"
|
applicationId "cc.winboll.studio.androidxdemo"
|
||||||
minSdkVersion 26
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "1.0"
|
versionName "15.0"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -54,23 +47,27 @@ dependencies {
|
|||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
// SSH
|
// SSH
|
||||||
implementation 'com.jcraft:jsch:0.1.55'
|
api 'com.jcraft:jsch:0.1.55'
|
||||||
// Html 解析
|
// Html 解析
|
||||||
implementation 'org.jsoup:jsoup:1.13.1'
|
api 'org.jsoup:jsoup:1.13.1'
|
||||||
// 二维码类库
|
// 二维码类库
|
||||||
implementation 'com.google.zxing:core:3.4.1'
|
api 'com.google.zxing:core:3.4.1'
|
||||||
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
|
api 'com.journeyapps:zxing-android-embedded:3.6.0'
|
||||||
// 应用介绍页类库
|
// 应用介绍页类库
|
||||||
implementation 'io.github.medyo:android-about-page:2.0.0'
|
api 'io.github.medyo:android-about-page:2.0.0'
|
||||||
// 吐司类库
|
// 吐司类库
|
||||||
implementation 'com.github.getActivity:ToastUtils:10.5'
|
api 'com.github.getActivity:ToastUtils:10.5'
|
||||||
// 网络连接类库
|
// 网络连接类库
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
|
api 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||||
// Android 类库
|
// AndroidX 类库
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
api 'androidx.appcompat:appcompat:1.1.0'
|
||||||
implementation 'androidx.viewpager:viewpager:1.0.0'
|
api 'com.google.android.material:material:1.4.0'
|
||||||
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
//api 'androidx.viewpager:viewpager:1.0.0'
|
||||||
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||||
implementation 'androidx.fragment:fragment:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||||
implementation 'com.google.android.material:material:1.4.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'
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Mar 11 18:25:43 GMT 2025
|
#Thu Apr 03 03:15:55 GMT 2025
|
||||||
stageCount=0
|
stageCount=0
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=1.0
|
baseVersion=15.0
|
||||||
publishVersion=1.0.0
|
publishVersion=15.0.0
|
||||||
buildCount=4
|
buildCount=18
|
||||||
baseBetaVersion=1.0.1
|
baseBetaVersion=15.0.1
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/MyAppTheme"
|
||||||
android:resizeableActivity="true"
|
android:resizeableActivity="true"
|
||||||
android:name=".GlobalApplication">
|
android:name=".App">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@@ -34,4 +34,4 @@
|
|||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
package cc.winboll.studio.androidxdemo;
|
package cc.winboll.studio.androidxdemo;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Application;
|
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -15,6 +14,7 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -22,6 +22,9 @@ import android.widget.HorizontalScrollView;
|
|||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
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.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
@@ -39,15 +42,23 @@ import java.util.Date;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
public class GlobalApplication extends Application {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
CrashHandler.getInstance().registerGlobal(this);
|
|
||||||
CrashHandler.getInstance().registerPart(this);
|
// 初始化 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 {
|
public static void write(InputStream input, OutputStream output) throws IOException {
|
||||||
@@ -252,7 +263,7 @@ public class GlobalApplication extends Application {
|
|||||||
|
|
||||||
private static String getKernel() {
|
private static String getKernel() {
|
||||||
try {
|
try {
|
||||||
return GlobalApplication.toString(new FileInputStream("/proc/version")).trim();
|
return App.toString(new FileInputStream("/proc/version")).trim();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
return e.getMessage();
|
return e.getMessage();
|
||||||
}
|
}
|
||||||
@@ -331,4 +342,4 @@ public class GlobalApplication extends Application {
|
|||||||
restart();
|
restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -3,17 +3,29 @@ package cc.winboll.studio.androidxdemo;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
import cc.winboll.studio.libappbase.LogView;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
LogView mLogView;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
|
Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
mLogView = findViewById(R.id.logview);
|
||||||
|
|
||||||
|
ToastUtils.show("onCreate");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
mLogView.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -34,5 +34,18 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
@@ -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,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<string name="app_name">WinBoll-APP+</string>
|
|
||||||
|
|
||||||
</resources>
|
|
@@ -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,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<string name="app_name">WinBoll-APP</string>
|
|
||||||
|
|
||||||
</resources>
|
|
@@ -1,3 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
</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 {
|
android {
|
||||||
compileSdkVersion 30
|
|
||||||
buildToolsVersion "30.0.3"
|
compileSdkVersion 32
|
||||||
|
buildToolsVersion "32.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.appbase"
|
applicationId "cc.winboll.studio.appbase"
|
||||||
minSdkVersion 26
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "15.0"
|
versionName "15.7"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Sat Mar 15 15:30:02 HKT 2025
|
#Sat May 03 10:32:21 GMT 2025
|
||||||
stageCount=3
|
stageCount=7
|
||||||
libraryProject=libappbase
|
libraryProject=libappbase
|
||||||
baseVersion=15.0
|
baseVersion=15.7
|
||||||
publishVersion=15.0.2
|
publishVersion=15.7.6
|
||||||
buildCount=0
|
buildCount=4
|
||||||
baseBetaVersion=15.0.3
|
baseBetaVersion=15.7.7
|
||||||
|
@@ -5,15 +5,18 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".App"
|
android:name=".App"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_miapp"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/MyAppTheme"
|
android:theme="@style/MyAPPBaseTheme"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true"
|
||||||
|
android:process=":App">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:exported="true">
|
android:exported="true"
|
||||||
|
android:resizeableActivity="true"
|
||||||
|
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
||||||
@@ -29,10 +32,22 @@
|
|||||||
|
|
||||||
</activity>
|
</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
|
<service
|
||||||
android:name=".MyTileService"
|
android:name=".MyTileService"
|
||||||
|
android:exported="true"
|
||||||
android:label="@string/tileservice_name"
|
android:label="@string/tileservice_name"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||||
@@ -49,9 +64,18 @@
|
|||||||
android:name=".services.MainService"
|
android:name=".services.MainService"
|
||||||
android:exported="true"/>
|
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"/>
|
<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>
|
<intent-filter>
|
||||||
|
|
||||||
@@ -81,13 +105,14 @@
|
|||||||
|
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<receiver android:name=".widgets.APPNewsWidgetClickListener">
|
<receiver android:name=".receivers.APPNewsWidgetClickListener"
|
||||||
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
||||||
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidgetClickListener.ACTION_PRE"/>
|
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_PRE"/>
|
||||||
|
|
||||||
<action android:name="cc.winboll.studio.appbase.widgets.APPNewsWidgetClickListener.ACTION_NEXT"/>
|
<action android:name="cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener.ACTION_NEXT"/>
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
@@ -97,11 +122,6 @@
|
|||||||
android:name="android.max_aspect"
|
android:name="android.max_aspect"
|
||||||
android:value="4.0"/>
|
android:value="4.0"/>
|
||||||
|
|
||||||
<service android:name="cc.winboll.studio.appbase.services.TestDemoBindService"
|
|
||||||
android:exported="true"/>
|
|
||||||
|
|
||||||
<service android:name="cc.winboll.studio.appbase.services.TestDemoService"
|
|
||||||
android:exported="true"/>
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ public class App extends GlobalApplication {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
GlobalApplication.setIsDebuging(this, BuildConfig.DEBUG);
|
|
||||||
mSOSCenterServiceReceiver = new SOSCenterServiceReceiver();
|
mSOSCenterServiceReceiver = new SOSCenterServiceReceiver();
|
||||||
IntentFilter intentFilter = new IntentFilter();
|
IntentFilter intentFilter = new IntentFilter();
|
||||||
intentFilter.addAction(SOS.ACTION_SOS);
|
intentFilter.addAction(SOS.ACTION_SOS);
|
||||||
|
@@ -4,25 +4,41 @@ import android.app.Activity;
|
|||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
import cc.winboll.studio.appbase.R;
|
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.MainService;
|
||||||
import cc.winboll.studio.appbase.services.TestDemoBindService;
|
import cc.winboll.studio.appbase.services.TestDemoBindService;
|
||||||
import cc.winboll.studio.appbase.services.TestDemoService;
|
import cc.winboll.studio.appbase.services.TestDemoService;
|
||||||
|
import cc.winboll.studio.libappbase.CrashHandler;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
|
import cc.winboll.studio.libappbase.GlobalCrashActivity;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.LogView;
|
|
||||||
import cc.winboll.studio.libappbase.sos.SOS;
|
import cc.winboll.studio.libappbase.sos.SOS;
|
||||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
||||||
import cc.winboll.studio.libappbase.widgets.StatusWidget;
|
import cc.winboll.studio.libappbase.widgets.StatusWidget;
|
||||||
|
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||||
|
|
||||||
public class MainActivity extends Activity {
|
public class MainActivity extends WinBoLLActivityBase implements IWinBoLLActivity {
|
||||||
|
|
||||||
public static final String TAG = "MainActivity";
|
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
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -30,19 +46,34 @@ public class MainActivity extends Activity {
|
|||||||
ToastUtils.show("onCreate");
|
ToastUtils.show("onCreate");
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
Toolbar toolbar = findViewById(R.id.activitymainToolbar1);
|
mToolbar = findViewById(R.id.toolbar);
|
||||||
setActionBar(toolbar);
|
setActionBar(mToolbar);
|
||||||
|
|
||||||
CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1);
|
CheckBox cbIsDebugMode = findViewById(R.id.activitymainCheckBox1);
|
||||||
cbIsDebugMode.setChecked(GlobalApplication.isDebuging());
|
cbIsDebugMode.setChecked(GlobalApplication.isDebuging());
|
||||||
mLogView = findViewById(R.id.activitymainLogView1);
|
//mLogView = findViewById(R.id.activitymainLogView1);
|
||||||
|
|
||||||
if (GlobalApplication.isDebuging()) {
|
// if (GlobalApplication.isDebuging()) {
|
||||||
mLogView.start();
|
// mLogView.start();
|
||||||
ToastUtils.show("LogView 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
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
@@ -51,15 +82,16 @@ public class MainActivity extends Activity {
|
|||||||
sendBroadcast(intentAPPWidget);
|
sendBroadcast(intentAPPWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
LogUtils.d(TAG, "onResume");
|
|
||||||
super.onResume();
|
|
||||||
mLogView.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onSwitchDebugMode(View view) {
|
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) {
|
public void onStartCenter(View view) {
|
||||||
@@ -89,7 +121,7 @@ public class MainActivity extends Activity {
|
|||||||
startService(intentService);
|
startService(intentService);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTestSOS(View view) {
|
public void onTestDemoServiceSOS(View view) {
|
||||||
Intent intent = new Intent(this, TestDemoService.class);
|
Intent intent = new Intent(this, TestDemoService.class);
|
||||||
stopService(intent);
|
stopService(intent);
|
||||||
if (App.isDebuging()) {
|
if (App.isDebuging()) {
|
||||||
@@ -105,6 +137,8 @@ public class MainActivity extends Activity {
|
|||||||
startService(intent);
|
startService(intent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onStopTestDemoService(View view) {
|
public void onStopTestDemoService(View view) {
|
||||||
Intent intent = new Intent(this, TestDemoService.class);
|
Intent intent = new Intent(this, TestDemoService.class);
|
||||||
@@ -140,4 +174,10 @@ public class MainActivity extends Activity {
|
|||||||
Intent intent = new Intent(this, TestDemoBindService.class);
|
Intent intent = new Intent(this, TestDemoBindService.class);
|
||||||
stopService(intent);
|
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.content.Context;
|
||||||
import android.service.quicksettings.Tile;
|
import android.service.quicksettings.Tile;
|
||||||
import android.service.quicksettings.TileService;
|
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;
|
import cc.winboll.studio.appbase.services.MainService;
|
||||||
|
|
||||||
public class MyTileService extends TileService {
|
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
|
* @Author ZhanGSKen@AliYun.Com
|
@@ -1,4 +1,4 @@
|
|||||||
package cc.winboll.studio.appbase.beans;
|
package cc.winboll.studio.appbase.models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen@AliYun.Com
|
* @Author ZhanGSKen@AliYun.Com
|
@@ -1,4 +1,4 @@
|
|||||||
package cc.winboll.studio.appbase.beans;
|
package cc.winboll.studio.appbase.models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen@AliYun.Com
|
* @Author ZhanGSKen@AliYun.Com
|
@@ -0,0 +1,72 @@
|
|||||||
|
package cc.winboll.studio.appbase.models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen@AliYun.Com
|
||||||
|
* @Date 2025/02/17 10:05:09
|
||||||
|
* @Describe APPSOSReportBean
|
||||||
|
*/
|
||||||
|
import android.util.JsonReader;
|
||||||
|
import android.util.JsonWriter;
|
||||||
|
import cc.winboll.studio.libappbase.BaseBean;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class WinBoLLNewsBean extends BaseBean {
|
||||||
|
|
||||||
|
public static final String TAG = "WinBoLLNewsBean";
|
||||||
|
|
||||||
|
protected String message;
|
||||||
|
|
||||||
|
public WinBoLLNewsBean() {
|
||||||
|
this.message = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public WinBoLLNewsBean(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return WinBoLLNewsBean.class.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeThisToJsonWriter(JsonWriter jsonWriter) throws IOException {
|
||||||
|
super.writeThisToJsonWriter(jsonWriter);
|
||||||
|
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("message")) {
|
||||||
|
setMessage(jsonReader.nextString());
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseBean readBeanFromJsonReader(JsonReader jsonReader) throws IOException {
|
||||||
|
jsonReader.beginObject();
|
||||||
|
while (jsonReader.hasNext()) {
|
||||||
|
String name = jsonReader.nextName();
|
||||||
|
if (!initObjectsFromJsonReader(jsonReader, name)) {
|
||||||
|
jsonReader.skipValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 结束 JSON 对象
|
||||||
|
jsonReader.endObject();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,13 +1,13 @@
|
|||||||
package cc.winboll.studio.appbase.widgets;
|
package cc.winboll.studio.appbase.receivers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen@AliYun.Com
|
* @Author ZhanGSKen@AliYun.Com
|
||||||
* @Date 2025/02/15 17:20:46
|
* @Date 2025/03/24 07:11:44
|
||||||
* @Describe WidgetButtonClickListener
|
|
||||||
*/
|
*/
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
|
||||||
public class APPNewsWidgetClickListener extends BroadcastReceiver {
|
public class APPNewsWidgetClickListener extends BroadcastReceiver {
|
@@ -10,7 +10,7 @@ import android.content.ComponentName;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import cc.winboll.studio.appbase.beans.WinBollNewsBean;
|
import cc.winboll.studio.appbase.models.WinBoLLNewsBean;
|
||||||
import cc.winboll.studio.appbase.services.MainService;
|
import cc.winboll.studio.appbase.services.MainService;
|
||||||
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
import cc.winboll.studio.appbase.widgets.APPNewsWidget;
|
||||||
import cc.winboll.studio.libappbase.AppUtils;
|
import cc.winboll.studio.libappbase.AppUtils;
|
||||||
@@ -18,7 +18,7 @@ import cc.winboll.studio.libappbase.LogUtils;
|
|||||||
import cc.winboll.studio.libappbase.sos.APPModel;
|
import cc.winboll.studio.libappbase.sos.APPModel;
|
||||||
import cc.winboll.studio.libappbase.sos.SOS;
|
import cc.winboll.studio.libappbase.sos.SOS;
|
||||||
import cc.winboll.studio.libappbase.sos.SOSObject;
|
import cc.winboll.studio.libappbase.sos.SOSObject;
|
||||||
import cc.winboll.studio.libappbase.sos.WinBoll;
|
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
@@ -42,11 +42,11 @@ public class MainReceiver extends BroadcastReceiver {
|
|||||||
String szAction = intent.getAction();
|
String szAction = intent.getAction();
|
||||||
if (szAction.equals(ACTION_BOOT_COMPLETED)) {
|
if (szAction.equals(ACTION_BOOT_COMPLETED)) {
|
||||||
ToastUtils.show("ACTION_BOOT_COMPLETED");
|
ToastUtils.show("ACTION_BOOT_COMPLETED");
|
||||||
} else if (szAction.equals(WinBoll.ACTION_BIND)) {
|
} else if (szAction.equals(WinBoLL.ACTION_BIND)) {
|
||||||
LogUtils.d(TAG, "ACTION_BIND");
|
LogUtils.d(TAG, "ACTION_BIND");
|
||||||
LogUtils.d(TAG, String.format("context.getPackageName() %s", context.getPackageName()));
|
LogUtils.d(TAG, String.format("context.getPackageName() %s", context.getPackageName()));
|
||||||
LogUtils.d(TAG, String.format("intent.getAction() %s", intent.getAction()));
|
LogUtils.d(TAG, String.format("intent.getAction() %s", intent.getAction()));
|
||||||
String szAPPModel = intent.getStringExtra(WinBoll.EXTRA_APPMODEL);
|
String szAPPModel = intent.getStringExtra(WinBoLL.EXTRA_APPMODEL);
|
||||||
LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel));
|
LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel));
|
||||||
if (szAPPModel != null && !szAPPModel.equals("")) {
|
if (szAPPModel != null && !szAPPModel.equals("")) {
|
||||||
try {
|
try {
|
||||||
@@ -80,7 +80,7 @@ public class MainReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
String appName = AppUtils.getAppNameByPackageName(context, szObjectPackageName);
|
String appName = AppUtils.getAppNameByPackageName(context, szObjectPackageName);
|
||||||
LogUtils.d(TAG, String.format("appName %s", appName));
|
LogUtils.d(TAG, String.format("appName %s", appName));
|
||||||
WinBollNewsBean appWinBollNewsBean = new WinBollNewsBean(appName);
|
WinBoLLNewsBean appWinBoLLNewsBean = new WinBoLLNewsBean(appName);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||||
String currentTime = sdf.format(new Date());
|
String currentTime = sdf.format(new Date());
|
||||||
StringBuilder sbLine = new StringBuilder();
|
StringBuilder sbLine = new StringBuilder();
|
||||||
@@ -88,9 +88,9 @@ public class MainReceiver extends BroadcastReceiver {
|
|||||||
sbLine.append(currentTime);
|
sbLine.append(currentTime);
|
||||||
sbLine.append("] Power to ");
|
sbLine.append("] Power to ");
|
||||||
sbLine.append(appName);
|
sbLine.append(appName);
|
||||||
appWinBollNewsBean.setMessage(sbLine.toString());
|
appWinBoLLNewsBean.setMessage(sbLine.toString());
|
||||||
|
|
||||||
APPNewsWidget.addWinBollNewsBean(context, appWinBollNewsBean);
|
APPNewsWidget.addWinBoLLNewsBean(context, appWinBoLLNewsBean);
|
||||||
|
|
||||||
Intent intentWidget = new Intent(context, APPNewsWidget.class);
|
Intent intentWidget = new Intent(context, APPNewsWidget.class);
|
||||||
intentWidget.setAction(APPNewsWidget.ACTION_RELOAD_REPORT);
|
intentWidget.setAction(APPNewsWidget.ACTION_RELOAD_REPORT);
|
||||||
@@ -110,7 +110,7 @@ public class MainReceiver extends BroadcastReceiver {
|
|||||||
IntentFilter filter=new IntentFilter();
|
IntentFilter filter=new IntentFilter();
|
||||||
filter.addAction(ACTION_BOOT_COMPLETED);
|
filter.addAction(ACTION_BOOT_COMPLETED);
|
||||||
filter.addAction(SOS.ACTION_SOS);
|
filter.addAction(SOS.ACTION_SOS);
|
||||||
filter.addAction(WinBoll.ACTION_BIND);
|
filter.addAction(WinBoLL.ACTION_BIND);
|
||||||
//filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
//filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||||
service.registerReceiver(this, filter);
|
service.registerReceiver(this, filter);
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.os.IBinder;
|
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.AssistantService;
|
||||||
import cc.winboll.studio.appbase.services.MainService;
|
import cc.winboll.studio.appbase.services.MainService;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
@@ -18,7 +18,7 @@ import android.content.ServiceConnection;
|
|||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import cc.winboll.studio.appbase.MyTileService;
|
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.handlers.MainServiceHandler;
|
||||||
import cc.winboll.studio.appbase.receivers.MainReceiver;
|
import cc.winboll.studio.appbase.receivers.MainReceiver;
|
||||||
import cc.winboll.studio.appbase.services.AssistantService;
|
import cc.winboll.studio.appbase.services.AssistantService;
|
||||||
|
@@ -10,9 +10,9 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import cc.winboll.studio.appbase.beans.TestDemoBindServiceBean;
|
import cc.winboll.studio.appbase.models.TestDemoBindServiceBean;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.sos.WinBoll;
|
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||||
import cc.winboll.studio.appbase.App;
|
import cc.winboll.studio.appbase.App;
|
||||||
import cc.winboll.studio.libappbase.sos.SOS;
|
import cc.winboll.studio.libappbase.sos.SOS;
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ public class TestDemoBindService extends Service {
|
|||||||
super.run();
|
super.run();
|
||||||
LogUtils.d(TAG, "run() start");
|
LogUtils.d(TAG, "run() start");
|
||||||
if (App.isDebuging()) {
|
if (App.isDebuging()) {
|
||||||
WinBoll.bindToAPPBaseBeta(mContext, TestDemoBindService.class.getName());
|
WinBoLL.bindToAPPBaseBeta(mContext, TestDemoBindService.class.getName());
|
||||||
} else {
|
} else {
|
||||||
WinBoll.bindToAPPBase(mContext, TestDemoBindService.class.getName());
|
WinBoLL.bindToAPPBase(mContext, TestDemoBindService.class.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!isExit()) {
|
while (!isExit()) {
|
||||||
|
@@ -10,9 +10,9 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import cc.winboll.studio.appbase.beans.TestDemoServiceBean;
|
import cc.winboll.studio.appbase.models.TestDemoServiceBean;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.sos.WinBoll;
|
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||||
|
|
||||||
public class TestDemoService extends Service {
|
public class TestDemoService extends Service {
|
||||||
|
|
||||||
|
@@ -12,15 +12,16 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.widget.RemoteViews;
|
import android.widget.RemoteViews;
|
||||||
import cc.winboll.studio.appbase.R;
|
import cc.winboll.studio.appbase.R;
|
||||||
import cc.winboll.studio.appbase.beans.WinBollNewsBean;
|
import cc.winboll.studio.appbase.models.WinBoLLNewsBean;
|
||||||
|
import cc.winboll.studio.appbase.receivers.APPNewsWidgetClickListener;
|
||||||
import cc.winboll.studio.libappbase.AppUtils;
|
import cc.winboll.studio.libappbase.AppUtils;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
|
import cc.winboll.studio.libappbase.sos.APPModel;
|
||||||
|
import cc.winboll.studio.libappbase.sos.WinBoLL;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import cc.winboll.studio.libappbase.sos.APPModel;
|
|
||||||
import cc.winboll.studio.libappbase.sos.WinBoll;
|
|
||||||
|
|
||||||
public class APPNewsWidget extends AppWidgetProvider {
|
public class APPNewsWidget extends AppWidgetProvider {
|
||||||
|
|
||||||
@@ -30,14 +31,14 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
public static final String ACTION_RELOAD_REPORT = APPNewsWidget.class.getName() + ".ACTION_RELOAD_REPORT";
|
public static final String ACTION_RELOAD_REPORT = APPNewsWidget.class.getName() + ".ACTION_RELOAD_REPORT";
|
||||||
|
|
||||||
|
|
||||||
volatile static ArrayList<WinBollNewsBean> _WinBollNewsBeanList;
|
volatile static ArrayList<WinBoLLNewsBean> _WinBoLLNewsBeanList;
|
||||||
final static int _MAX_PAGES = 10;
|
final static int _MAX_PAGES = 10;
|
||||||
final static int _OnePageLinesCount = 5;
|
final static int _OnePageLinesCount = 5;
|
||||||
volatile static int _CurrentPageIndex = 0;
|
volatile static int _CurrentPageIndex = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
||||||
initWinBollNewsBeanList(context);
|
initWinBoLLNewsBeanList(context);
|
||||||
for (int appWidgetId : appWidgetIds) {
|
for (int appWidgetId : appWidgetIds) {
|
||||||
updateAppWidget(context, appWidgetManager, appWidgetId);
|
updateAppWidget(context, appWidgetManager, appWidgetId);
|
||||||
}
|
}
|
||||||
@@ -46,7 +47,7 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
super.onReceive(context, intent);
|
super.onReceive(context, intent);
|
||||||
initWinBollNewsBeanList(context);
|
initWinBoLLNewsBeanList(context);
|
||||||
if (intent.getAction().equals(ACTION_RELOAD_REPORT)) {
|
if (intent.getAction().equals(ACTION_RELOAD_REPORT)) {
|
||||||
LogUtils.d(TAG, "ACTION_RELOAD_REPORT");
|
LogUtils.d(TAG, "ACTION_RELOAD_REPORT");
|
||||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||||
@@ -56,7 +57,7 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
}
|
}
|
||||||
}else if (intent.getAction().equals(ACTION_WAKEUP_SERVICE)) {
|
}else if (intent.getAction().equals(ACTION_WAKEUP_SERVICE)) {
|
||||||
LogUtils.d(TAG, "ACTION_WAKEUP_SERVICE");
|
LogUtils.d(TAG, "ACTION_WAKEUP_SERVICE");
|
||||||
String szAPPModel = intent.getStringExtra(WinBoll.EXTRA_APPMODEL);
|
String szAPPModel = intent.getStringExtra(WinBoLL.EXTRA_APPMODEL);
|
||||||
LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel));
|
LogUtils.d(TAG, String.format("szAPPModel %s", szAPPModel));
|
||||||
if (szAPPModel != null && !szAPPModel.equals("")) {
|
if (szAPPModel != null && !szAPPModel.equals("")) {
|
||||||
try {
|
try {
|
||||||
@@ -70,7 +71,7 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
|
|
||||||
String appName = AppUtils.getAppNameByPackageName(context, szAppPackageName);
|
String appName = AppUtils.getAppNameByPackageName(context, szAppPackageName);
|
||||||
LogUtils.d(TAG, String.format("appName %s", appName));
|
LogUtils.d(TAG, String.format("appName %s", appName));
|
||||||
WinBollNewsBean winBollNewsBean = new WinBollNewsBean(appName);
|
WinBoLLNewsBean winBollNewsBean = new WinBoLLNewsBean(appName);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||||
String currentTime = sdf.format(new Date());
|
String currentTime = sdf.format(new Date());
|
||||||
StringBuilder sbLine = new StringBuilder();
|
StringBuilder sbLine = new StringBuilder();
|
||||||
@@ -80,7 +81,7 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
sbLine.append(appName);
|
sbLine.append(appName);
|
||||||
winBollNewsBean.setMessage(sbLine.toString());
|
winBollNewsBean.setMessage(sbLine.toString());
|
||||||
|
|
||||||
addWinBollNewsBean(context, winBollNewsBean);
|
addWinBoLLNewsBean(context, winBollNewsBean);
|
||||||
|
|
||||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||||
int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, APPNewsWidget.class));
|
int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, APPNewsWidget.class));
|
||||||
@@ -98,24 +99,24 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
//
|
//
|
||||||
// 加入新报告信息
|
// 加入新报告信息
|
||||||
//
|
//
|
||||||
public synchronized static void addWinBollNewsBean(Context context, WinBollNewsBean bean) {
|
public synchronized static void addWinBoLLNewsBean(Context context, WinBoLLNewsBean bean) {
|
||||||
initWinBollNewsBeanList(context);
|
initWinBoLLNewsBeanList(context);
|
||||||
_WinBollNewsBeanList.add(0, bean);
|
_WinBoLLNewsBeanList.add(0, bean);
|
||||||
// 控制记录总数
|
// 控制记录总数
|
||||||
while (_WinBollNewsBeanList.size() > _MAX_PAGES * _OnePageLinesCount) {
|
while (_WinBoLLNewsBeanList.size() > _MAX_PAGES * _OnePageLinesCount) {
|
||||||
_WinBollNewsBeanList.remove(_WinBollNewsBeanList.size() - 1);
|
_WinBoLLNewsBeanList.remove(_WinBoLLNewsBeanList.size() - 1);
|
||||||
}
|
}
|
||||||
WinBollNewsBean.saveBeanList(context, _WinBollNewsBeanList, WinBollNewsBean.class);
|
WinBoLLNewsBean.saveBeanList(context, _WinBoLLNewsBeanList, WinBoLLNewsBean.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized static void initWinBollNewsBeanList(Context context) {
|
synchronized static void initWinBoLLNewsBeanList(Context context) {
|
||||||
if (_WinBollNewsBeanList == null) {
|
if (_WinBoLLNewsBeanList == null) {
|
||||||
_WinBollNewsBeanList = new ArrayList<WinBollNewsBean>();
|
_WinBoLLNewsBeanList = new ArrayList<WinBoLLNewsBean>();
|
||||||
WinBollNewsBean.loadBeanList(context, _WinBollNewsBeanList, WinBollNewsBean.class);
|
WinBoLLNewsBean.loadBeanList(context, _WinBoLLNewsBeanList, WinBoLLNewsBean.class);
|
||||||
}
|
}
|
||||||
if (_WinBollNewsBeanList == null) {
|
if (_WinBoLLNewsBeanList == null) {
|
||||||
_WinBollNewsBeanList = new ArrayList<WinBollNewsBean>();
|
_WinBoLLNewsBeanList = new ArrayList<WinBoLLNewsBean>();
|
||||||
WinBollNewsBean.saveBeanList(context, _WinBollNewsBeanList, WinBollNewsBean.class);
|
WinBoLLNewsBean.saveBeanList(context, _WinBoLLNewsBeanList, WinBoLLNewsBean.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,11 +141,11 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
|
|
||||||
public static String getMessage() {
|
public static String getMessage() {
|
||||||
ArrayList<String> msgTemp = new ArrayList<String>();
|
ArrayList<String> msgTemp = new ArrayList<String>();
|
||||||
if (_WinBollNewsBeanList != null) {
|
if (_WinBoLLNewsBeanList != null) {
|
||||||
int start = _OnePageLinesCount * _CurrentPageIndex;
|
int start = _OnePageLinesCount * _CurrentPageIndex;
|
||||||
start = _WinBollNewsBeanList.size() > start ? start : _WinBollNewsBeanList.size() - 1;
|
start = _WinBoLLNewsBeanList.size() > start ? start : _WinBoLLNewsBeanList.size() - 1;
|
||||||
for (int i = start, j = 0; i < _WinBollNewsBeanList.size() && j < _OnePageLinesCount && start > -1; i++, j++) {
|
for (int i = start, j = 0; i < _WinBoLLNewsBeanList.size() && j < _OnePageLinesCount && start > -1; i++, j++) {
|
||||||
msgTemp.add(_WinBollNewsBeanList.get(i).getMessage());
|
msgTemp.add(_WinBoLLNewsBeanList.get(i).getMessage());
|
||||||
}
|
}
|
||||||
String message = String.join("\n", msgTemp);
|
String message = String.join("\n", msgTemp);
|
||||||
return message;
|
return message;
|
||||||
@@ -153,7 +154,7 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void prePage(Context context) {
|
public static void prePage(Context context) {
|
||||||
if (_WinBollNewsBeanList != null) {
|
if (_WinBoLLNewsBeanList != null) {
|
||||||
if (_CurrentPageIndex > 0) {
|
if (_CurrentPageIndex > 0) {
|
||||||
_CurrentPageIndex = _CurrentPageIndex - 1;
|
_CurrentPageIndex = _CurrentPageIndex - 1;
|
||||||
}
|
}
|
||||||
@@ -164,8 +165,8 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void nextPage(Context context) {
|
public static void nextPage(Context context) {
|
||||||
if (_WinBollNewsBeanList != null) {
|
if (_WinBoLLNewsBeanList != null) {
|
||||||
if ((_CurrentPageIndex + 1) * _OnePageLinesCount < _WinBollNewsBeanList.size()) {
|
if ((_CurrentPageIndex + 1) * _OnePageLinesCount < _WinBoLLNewsBeanList.size()) {
|
||||||
_CurrentPageIndex = _CurrentPageIndex + 1;
|
_CurrentPageIndex = _CurrentPageIndex + 1;
|
||||||
}
|
}
|
||||||
Intent intentWidget = new Intent(context, APPNewsWidget.class);
|
Intent intentWidget = new Intent(context, APPNewsWidget.class);
|
||||||
@@ -175,11 +176,11 @@ public class APPNewsWidget extends AppWidgetProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String getPageInfo() {
|
String getPageInfo() {
|
||||||
if (_WinBollNewsBeanList == null) {
|
if (_WinBoLLNewsBeanList == null) {
|
||||||
return "0/0";
|
return "0/0";
|
||||||
}
|
}
|
||||||
int leftCount = _WinBollNewsBeanList.size() % _OnePageLinesCount;
|
int leftCount = _WinBoLLNewsBeanList.size() % _OnePageLinesCount;
|
||||||
int currentPageCount = _WinBollNewsBeanList.size() / _OnePageLinesCount + (leftCount == 0 ?0: 1);
|
int currentPageCount = _WinBoLLNewsBeanList.size() / _OnePageLinesCount + (leftCount == 0 ?0: 1);
|
||||||
return String.format("%d/%d", _CurrentPageIndex + 1, currentPageCount);
|
return String.format("%d/%d", _CurrentPageIndex + 1, currentPageCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<android.widget.Toolbar
|
<android.widget.Toolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitymainToolbar1"/>
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -32,35 +32,48 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Hello, WinBoll!"/>
|
android:text="Hello, WinBoLL!"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Android版本10的代号是“Q”,API级别是29。 Android 10开始谷歌不再公开使用甜品作为版本代号,但内部仍保留了大量与“Q”相关的元素。Android 10本身并没有严格对应某个特定的Java版本,但在开发Android 10应用时,通常可以使用Java 8或更高版本。 Java 8为Android开发带来了诸如Lambda表达式、方法引用等新特性,能提高开发效率和代码可读性,与Android 10开发适配良好。Java 9及更高版本也可用于Android 10开发,能使用一些新的语言特性和API,但可能需要注意兼容性和配置问题。"/>
|
android:text="Android版本10的代号是“Q”,API级别是29。 Android 10开始谷歌不再公开使用甜品作为版本代号,但内部仍保留了大量与“Q”相关的元素。Android 10本身并没有严格对应某个特定的Java版本,但在开发Android 10应用时,通常可以使用Java 8或更高版本。 Java 8为Android开发带来了诸如Lambda表达式、方法引用等新特性,能提高开发效率和代码可读性,与Android 10开发适配良好。Java 9及更高版本也可用于Android 10开发,能使用一些新的语言特性和API,但可能需要注意兼容性和配置问题。"/>
|
||||||
|
|
||||||
<LinearLayout
|
<HorizontalScrollView
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:gravity="right|center_vertical">
|
|
||||||
|
|
||||||
<CheckBox
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Debug Mode"
|
android:gravity="right|center_vertical"
|
||||||
android:layout_weight="1.0"
|
android:layout_width="wrap_content">
|
||||||
android:onClick="onSwitchDebugMode"
|
|
||||||
android:id="@+id/activitymainCheckBox1"/>
|
|
||||||
|
|
||||||
<Button
|
<CheckBox
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Test Application CrashReport"
|
android:text="Debug Mode"
|
||||||
android:textAllCaps="false"
|
android:layout_weight="1.0"
|
||||||
android:onClick="onTestApplicationCrashReport"/>
|
android:onClick="onSwitchDebugMode"
|
||||||
|
android:id="@+id/activitymainCheckBox1"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Test Application CrashReport"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onTestApplicationCrashReport"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="PreviewGlobalCrashActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onPreviewGlobalCrashActivity"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -72,6 +85,27 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right">
|
android:gravity="right">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="StartCenter"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onStartCenter"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="StopCenter"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onStopCenter"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
@@ -105,54 +139,40 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<HorizontalScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<LinearLayout
|
<HorizontalScrollView
|
||||||
android:orientation="horizontal"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="SartTestDemoBindService"
|
android:layout_height="wrap_content">
|
||||||
android:textAllCaps="false"
|
|
||||||
android:onClick="onSartTestDemoBindService"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="StopTestDemoBindService"
|
android:text="SartTestDemoBindService"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:onClick="onStopTestDemoBindService"/>
|
android:onClick="onSartTestDemoBindService"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="StopTestDemoBindServiceNoSettings"
|
android:text="StopTestDemoBindService"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:onClick="onStopTestDemoBindServiceNoSettings"/>
|
android:onClick="onStopTestDemoBindService"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="StopTestDemoBindServiceNoSettings"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onStopTestDemoBindServiceNoSettings"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="StartCenter"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:onClick="onStartCenter"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="StopCenter"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:onClick="onStopCenter"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -171,19 +191,21 @@
|
|||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TestSOS"
|
android:text="TestDemoServiceSOS"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:onClick="onTestSOS"/>
|
android:onClick="onTestDemoServiceSOS"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="TestOpenNewActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onTestOpenNewActivity"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<cc.winboll.studio.libappbase.LogView
|
|
||||||
android:layout_height="500dp"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:id="@+id/activitymainLogView1"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
43
appbase/src/main/res/layout/activity_new.xml
Normal file
43
appbase/src/main/res/layout/activity_new.xml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<android.widget.Toolbar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="NewActivity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CloseThisActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onCloseThisActivity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CloseAllActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onCloseAllActivity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="New2Activity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onNew2Activity"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
43
appbase/src/main/res/layout/activity_new2.xml
Normal file
43
appbase/src/main/res/layout/activity_new2.xml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<android.widget.Toolbar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="New2Activity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CloseThisActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onCloseThisActivity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CloseAllActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onCloseAllActivity"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="NewActivity"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:onClick="onNewActivity"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:text="WinBollNews"
|
android:text="WinBoLLNews"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="16sp"/>
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#005800FF</color>
|
<color name="colorPrimary">#FF00B322</color>
|
||||||
<color name="colorPrimaryDark">#005800FF</color>
|
<color name="colorPrimaryDark">#FF005C12</color>
|
||||||
<color name="colorAccent">#005800FF</color>
|
<color name="colorAccent">#FF8DFFA2</color>
|
||||||
|
<color name="colorText">#FFFFFB8D</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">AppBase</string>
|
<string name="app_name">AppBase</string>
|
||||||
<string name="tileservice_name">WinBoll</string>
|
<string name="tileservice_name">WinBoLL</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="MyAppTheme" parent="APPBaseTheme">
|
<style name="MyAPPBaseTheme" parent="APPBaseTheme">
|
||||||
<item name="attrColorPrimary">@color/colorPrimary</item>
|
<item name="attrColorPrimary">@color/colorPrimary</item>
|
||||||
<item name="themeGlobalCrashActivity">@style/MyGlobalCrashActivityTheme</item>
|
<item name="themeGlobalCrashActivity">@style/MyGlobalCrashActivityTheme</item>
|
||||||
</style>
|
</style>
|
||||||
|
@@ -18,18 +18,18 @@ def genVersionName(def versionName){
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 32
|
||||||
buildToolsVersion "30.0.3"
|
buildToolsVersion "32.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.apputils"
|
applicationId "cc.winboll.studio.apputils"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 29
|
targetSdkVersion 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "15.0"
|
versionName "15.3"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -46,22 +46,4 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api project(':libapputils')
|
api project(':libapputils')
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
// 二维码类库
|
|
||||||
implementation 'com.google.zxing:core:3.4.1'
|
|
||||||
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
|
|
||||||
|
|
||||||
// 网络连接类库
|
|
||||||
//implementation 'com.squareup.okhttp3:okhttp:4.4.1'
|
|
||||||
|
|
||||||
// Html 解析
|
|
||||||
//implementation 'org.jsoup:jsoup:1.13.1'
|
|
||||||
|
|
||||||
// SSH
|
|
||||||
//implementation 'com.jcraft:jsch:0.1.55'
|
|
||||||
|
|
||||||
// 应用介绍页类库
|
|
||||||
//implementation 'io.github.medyo:android-about-page:2.0.0'
|
|
||||||
|
|
||||||
implementation 'cc.winboll.studio:libappbase:15.0.5'
|
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Thu Mar 20 01:23:48 HKT 2025
|
#Tue Apr 29 15:04:17 HKT 2025
|
||||||
stageCount=8
|
stageCount=5
|
||||||
libraryProject=libapputils
|
libraryProject=libapputils
|
||||||
baseVersion=15.0
|
baseVersion=15.3
|
||||||
publishVersion=15.0.7
|
publishVersion=15.3.4
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.0.8
|
baseBetaVersion=15.3.5
|
||||||
|
@@ -27,8 +27,14 @@
|
|||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".TestStringToQrCodeViewActivity"/>
|
<activity android:name=".TestStringToQRCodeViewActivity"/>
|
||||||
|
|
||||||
|
<activity android:name=".TestBBMorseCodeActivity"/>
|
||||||
|
|
||||||
|
<activity android:name=".AssetsHtmlActivity"/>
|
||||||
|
|
||||||
|
<activity android:name=".QRCodeDecodeActivity"/>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@@ -7,81 +7,14 @@ package cc.winboll.studio.apputils;
|
|||||||
*/
|
*/
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.widget.Toast;
|
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
|
||||||
import cc.winboll.studio.libapputils.app.MyActivityLifecycleCallbacks;
|
|
||||||
import cc.winboll.studio.libapputils.app.WinBollActivityManager;
|
|
||||||
import cc.winboll.studio.libapputils.bean.DebugBean;
|
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
public static final String TAG = "App";
|
public static final String TAG = "App";
|
||||||
|
|
||||||
public static final String _ACTION_DEBUGVIEW = App.class.getName() + "_ACTION_DEBUGVIEW";
|
|
||||||
|
|
||||||
//static volatile WinBollApplication _WinBollApplication = null;
|
|
||||||
MyActivityLifecycleCallbacks mMyActivityLifecycleCallbacks;
|
|
||||||
|
|
||||||
// 标记当前应用是否处于调试状态
|
|
||||||
static volatile boolean isDebug = false;
|
|
||||||
|
|
||||||
public synchronized static void setIsDebug(boolean isDebug) {
|
|
||||||
App.isDebug = isDebug;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isDebug() {
|
|
||||||
return isDebug;
|
|
||||||
}
|
|
||||||
|
|
||||||
MyActivityLifecycleCallbacks getMyActivityLifecycleCallbacks() {
|
|
||||||
return mMyActivityLifecycleCallbacks;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Context getApplicationContext() {
|
|
||||||
return super.getApplicationContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Application getApplication() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// 应用环境初始化, 基本调试环境
|
|
||||||
//
|
|
||||||
// 初始化日志模块
|
|
||||||
//LogUtils.init(this);
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 初始化 Toast 框架
|
|
||||||
// ToastUtils.init(this);
|
|
||||||
// // 设置 Toast 布局样式
|
|
||||||
// //ToastUtils.setView(R.layout.view_toast);
|
|
||||||
// ToastUtils.setStyle(new WhiteToastStyle());
|
|
||||||
// ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
|
||||||
// 设置应用调试标志
|
|
||||||
DebugBean debugBean = DebugBean.loadBean(this, DebugBean.class);
|
|
||||||
if (debugBean == null) {
|
|
||||||
//ToastUtils.show("debugBean == null");
|
|
||||||
setIsDebug(false);
|
|
||||||
} else {
|
|
||||||
//ToastUtils.show("saveDebugStatus(" + String.valueOf(debugBean.isDebuging()) + ")");
|
|
||||||
setIsDebug(debugBean.isDebuging());
|
|
||||||
}
|
|
||||||
// 应用窗口管理模块参数设置
|
|
||||||
//
|
|
||||||
mMyActivityLifecycleCallbacks = new MyActivityLifecycleCallbacks();
|
|
||||||
registerActivityLifecycleCallbacks(mMyActivityLifecycleCallbacks);
|
|
||||||
// 设置默认 WinBoll 应用 UI 类型
|
|
||||||
//WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Service);
|
|
||||||
//ToastUtils.show("WinBollUI_TYPE " + getWinBollUI_TYPE());
|
|
||||||
} catch (Exception e) {
|
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
|
||||||
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
package cc.winboll.studio.libapputils.activities;
|
package cc.winboll.studio.apputils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen@QQ.COM
|
* @Author ZhanGSKen@QQ.COM
|
||||||
* @Date 2025/01/03 11:02:49
|
* @Date 2025/01/03 11:02:49
|
||||||
* @Describe 一个可以浏览随 APP 附带的 Html 文档的窗口
|
* @Describe 一个可以浏览随 APP 附带的 Html 文档的窗口
|
||||||
*/
|
*/
|
||||||
import cc.winboll.studio.libapputils.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -14,14 +13,25 @@ import android.os.Bundle;
|
|||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
import cc.winboll.studio.apputils.R;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libapputils.app.IWinBollActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
||||||
import cc.winboll.studio.libapputils.bean.APPInfo;
|
import cc.winboll.studio.libapputils.views.SimpleWebView;
|
||||||
import cc.winboll.studio.libapputils.view.SimpleWebView;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class AssetsHtmlActivity extends Activity implements IWinBollActivity {
|
public class AssetsHtmlActivity extends WinBoLLActivityBase implements IWinBoLLActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Activity getActivity() {
|
||||||
|
return super.getActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTag() {
|
||||||
|
return TAG;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static final String TAG = "AssetsHtmlActivity";
|
public static final String TAG = "AssetsHtmlActivity";
|
||||||
|
|
||||||
@@ -39,32 +49,6 @@ public class AssetsHtmlActivity extends Activity implements IWinBollActivity {
|
|||||||
// return this;
|
// return this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public APPInfo getAppInfo() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEnableDisplayHomeAsUp() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isAddWinBollToolBar() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Toolbar initToolBar() {
|
|
||||||
return findViewById(R.id.activityassetshtmlToolbar1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
@@ -73,7 +57,7 @@ public class AssetsHtmlActivity extends Activity implements IWinBollActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
// if (item.getItemId() == android.R.id.home) {
|
// if (item.getItemId() == android.R.id.home) {
|
||||||
// WinBollActivityManager.getInstance(this).finish(this);
|
// WinBoLLActivityManager.getInstance(this).finish(this);
|
||||||
// }
|
// }
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
@@ -83,6 +67,10 @@ public class AssetsHtmlActivity extends Activity implements IWinBollActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_assetshtml);
|
setContentView(R.layout.activity_assetshtml);
|
||||||
|
|
||||||
|
// 初始化工具栏
|
||||||
|
Toolbar mToolbar = findViewById(R.id.toolbar);
|
||||||
|
setActionBar(mToolbar);
|
||||||
|
|
||||||
mszHtmlFileName = "index.html";
|
mszHtmlFileName = "index.html";
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
@@ -1,6 +1,5 @@
|
|||||||
package cc.winboll.studio.apputils;
|
package cc.winboll.studio.apputils;
|
||||||
|
|
||||||
import cc.winboll.studio.apputils.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -13,22 +12,14 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
import cc.winboll.studio.apputils.R;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.LogView;
|
import cc.winboll.studio.libappbase.LogView;
|
||||||
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
import cc.winboll.studio.libappbase.utils.ToastUtils;
|
||||||
import cc.winboll.studio.libapputils.activities.AssetsHtmlActivity;
|
|
||||||
import cc.winboll.studio.libapputils.activities.LogActivity;
|
|
||||||
import cc.winboll.studio.libapputils.activities.QRCodeDecodeActivity;
|
|
||||||
import cc.winboll.studio.libapputils.app.AboutActivityFactory;
|
|
||||||
import cc.winboll.studio.libapputils.app.IWinBollActivity;
|
|
||||||
import cc.winboll.studio.libapputils.app.WinBollActivityManager;
|
|
||||||
import cc.winboll.studio.libapputils.bean.APPInfo;
|
|
||||||
import cc.winboll.studio.libapputils.view.AboutView;
|
|
||||||
import cc.winboll.studio.libapputils.view.YesNoAlertDialog;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
final public class MainActivity extends Activity implements IWinBollActivity {
|
final public class MainActivity extends Activity {
|
||||||
|
|
||||||
public static final String TAG = "MainActivity";
|
public static final String TAG = "MainActivity";
|
||||||
|
|
||||||
@@ -42,45 +33,7 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
// return this;
|
// return this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public APPInfo getAppInfo() {
|
|
||||||
String szBranchName = "apputils";
|
|
||||||
|
|
||||||
APPInfo appInfo = AboutActivityFactory.buildDefaultAPPInfo();
|
|
||||||
appInfo.setAppName("APPUtils");
|
|
||||||
appInfo.setAppIcon(cc.winboll.studio.libapputils.R.drawable.ic_winboll);
|
|
||||||
appInfo.setAppDescription("APPUtils Description");
|
|
||||||
appInfo.setAppGitName("APP");
|
|
||||||
appInfo.setAppGitOwner("Studio");
|
|
||||||
appInfo.setAppGitAPPBranch(szBranchName);
|
|
||||||
appInfo.setAppGitAPPSubProjectFolder(szBranchName);
|
|
||||||
appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=APP");
|
|
||||||
appInfo.setAppAPKName("APPUtils");
|
|
||||||
appInfo.setAppAPKFolderName("APPUtils");
|
|
||||||
return appInfo;
|
|
||||||
//return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isAddWinBollToolBar() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Toolbar initToolBar() {
|
|
||||||
return findViewById(R.id.activitymainToolbar1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEnableDisplayHomeAsUp() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -90,13 +43,13 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
mLogView.start();
|
mLogView.start();
|
||||||
|
|
||||||
// 初始化工具栏
|
// 初始化工具栏
|
||||||
mToolbar = findViewById(R.id.activitymainToolbar1);
|
mToolbar = findViewById(R.id.toolbar);
|
||||||
setActionBar(mToolbar);
|
setActionBar(mToolbar);
|
||||||
if (isEnableDisplayHomeAsUp()) {
|
// if (isEnableDisplayHomeAsUp()) {
|
||||||
// 显示后退按钮
|
// // 显示后退按钮
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
// getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
// }
|
||||||
getActionBar().setSubtitle(getTag());
|
// getActionBar().setSubtitle(getTag());
|
||||||
|
|
||||||
checkResolveActivity();
|
checkResolveActivity();
|
||||||
archiveInstance();
|
archiveInstance();
|
||||||
@@ -107,9 +60,9 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
//if (prosessIntents(getIntent())) return;
|
//if (prosessIntents(getIntent())) return;
|
||||||
// 以下正常创建主窗口
|
// 以下正常创建主窗口
|
||||||
|
|
||||||
// // 设置 WinBoll 应用 UI 类型
|
// // 设置 WinBoLL 应用 UI 类型
|
||||||
// WinBollApplication.setWinBollUI_TYPE(WinBollApplication.WinBollUI_TYPE.Aplication);
|
// WinBoLLApplication.setWinBoLLUI_TYPE(WinBoLLApplication.WinBoLLUI_TYPE.Aplication);
|
||||||
// //ToastUtils.show("WinBollUI_TYPE " + WinBollApplication.getWinBollUI_TYPE());
|
// //ToastUtils.show("WinBoLLUI_TYPE " + WinBoLLApplication.getWinBoLLUI_TYPE());
|
||||||
// LogUtils.d(TAG, "BuildConfig.DEBUG : " + Boolean.toString(BuildConfig.DEBUG));
|
// LogUtils.d(TAG, "BuildConfig.DEBUG : " + Boolean.toString(BuildConfig.DEBUG));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,11 +75,11 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
if (resolveInfoList.size() > 0) {
|
if (resolveInfoList.size() > 0) {
|
||||||
// 传入的Intent action在Activity清单的intent-filter的action节点里有定义
|
// 传入的Intent action在Activity清单的intent-filter的action节点里有定义
|
||||||
if (intent.getAction() != null) {
|
if (intent.getAction() != null) {
|
||||||
if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) {
|
// if (intent.getAction().equals(cc.winboll.studio.libapputils.intent.action.DEBUGVIEW)) {
|
||||||
App.setIsDebug(true);
|
// App.setIsDebug(true);
|
||||||
//ToastUtils.show!("WinBollApplication.setIsDebug(true) by action : " + intent.getAction());
|
// //ToastUtils.show!("WinBoLLApplication.setIsDebug(true) by action : " + intent.getAction());
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -177,12 +130,12 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
// 缓存当前 activity
|
// 缓存当前 activity
|
||||||
//WinBollActivityManager.getInstance(this).add(this);
|
//WinBoLLActivityManager.getInstance(this).add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
//WinBollActivityManager.getInstance(this).registeRemove(this);
|
//WinBoLLActivityManager.getInstance(this).registeRemove(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,14 +144,14 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
Toast.makeText(getApplication(), "onTestLogClick", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplication(), "onTestLogClick", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLogUtilsClick(View view) {
|
public void onTestLogActivity(View view) {
|
||||||
// Intent intent = new Intent(this, LogActivity.class);
|
// Intent intent = new Intent(this, LogActivity.class);
|
||||||
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
// intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
// intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||||
// startActivity(intent);
|
// startActivity(intent);
|
||||||
|
|
||||||
//WinBollActivityManager.getInstance().printAvtivityListInfo();
|
//WinBoLLActivityManager.getInstance().printAvtivityListInfo();
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, LogActivity.class);
|
//WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, LogActivity.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -212,7 +165,7 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
|
|
||||||
// if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
// if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
||||||
// try {
|
// try {
|
||||||
// WinBollActivity clazzActivity = UnitTestActivity.class.newInstance();
|
// WinBoLLActivity clazzActivity = UnitTestActivity.class.newInstance();
|
||||||
// String tag = clazzActivity.getTag();
|
// String tag = clazzActivity.getTag();
|
||||||
// LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
// LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
||||||
// Intent subIntent = new Intent(this, UnitTestActivity.class);
|
// Intent subIntent = new Intent(this, UnitTestActivity.class);
|
||||||
@@ -230,8 +183,8 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
// Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
||||||
// //startWinBollActivity(subIntent, tag);
|
// //startWinBoLLActivity(subIntent, tag);
|
||||||
// WinBollActivityManager.getInstance(this).startWinBollActivity(this, subIntent, UnitTestActivity.class);
|
// WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, subIntent, UnitTestActivity.class);
|
||||||
// } catch (IllegalAccessException | InstantiationException | IOException e) {
|
// } catch (IllegalAccessException | InstantiationException | IOException e) {
|
||||||
// LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
// LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
// // 函数处理异常返回失败
|
// // 函数处理异常返回失败
|
||||||
@@ -248,11 +201,11 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
//ToastUtils.show("onCreateOptionsMenu");
|
//ToastUtils.show("onCreateOptionsMenu");
|
||||||
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
getMenuInflater().inflate(R.menu.toolbar_main, menu);
|
||||||
if (isAddWinBollToolBar()) {
|
// if (isAddWinBoLLToolBar()) {
|
||||||
//ToastUtils.show("mIWinBoll.isAddWinBollToolBar()");
|
// //ToastUtils.show("mIWinBoLL.isAddWinBoLLToolBar()");
|
||||||
getMenuInflater().inflate(R.menu.toolbar_winboll_shared_main, menu);
|
// getMenuInflater().inflate(R.menu.toolbar_winboll_shared_main, menu);
|
||||||
}
|
// }
|
||||||
if (App.isDebug()) {
|
if (App.isDebuging()) {
|
||||||
getMenuInflater().inflate(R.menu.toolbar_studio_debug, menu);
|
getMenuInflater().inflate(R.menu.toolbar_studio_debug, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,13 +215,12 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == R.id.item_exit) {
|
if (item.getItemId() == R.id.item_exit) {
|
||||||
exit();
|
//exit();
|
||||||
return true;
|
|
||||||
} else if (item.getItemId() == R.id.item_about) {
|
|
||||||
AboutActivityFactory.showAboutActivity(this, getAppInfo());
|
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.item_teststringtoqrcodeview) {
|
} else if (item.getItemId() == R.id.item_teststringtoqrcodeview) {
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, TestStringToQrCodeViewActivity.class);
|
Intent intent = new Intent(this, TestStringToQRCodeViewActivity.class);
|
||||||
|
startActivityForResult(intent, REQUEST_QRCODEDECODE_ACTIVITY);
|
||||||
|
//WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, TestStringToQrCodeViewActivity.class);
|
||||||
} else if (item.getItemId() == R.id.item_testqrcodedecodeactivity) {
|
} else if (item.getItemId() == R.id.item_testqrcodedecodeactivity) {
|
||||||
Intent intent = new Intent(this, QRCodeDecodeActivity.class);
|
Intent intent = new Intent(this, QRCodeDecodeActivity.class);
|
||||||
startActivityForResult(intent, REQUEST_QRCODEDECODE_ACTIVITY);
|
startActivityForResult(intent, REQUEST_QRCODEDECODE_ACTIVITY);
|
||||||
@@ -278,58 +230,52 @@ final public class MainActivity extends Activity implements IWinBollActivity {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.item_log) {
|
} else if (item.getItemId() == R.id.item_log) {
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, LogActivity.class);
|
//WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, LogActivity.class);
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.item_exitdebug) {
|
} else if (item.getItemId() == R.id.item_exitdebug) {
|
||||||
//AboutView.setApp2NormalMode(this);
|
//AboutView.setApp2NormalMode(this);
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == android.R.id.home) {
|
} else if (item.getItemId() == android.R.id.home) {
|
||||||
//WinBollActivityManager.getInstance(this).finish(this);
|
//WinBoLLActivityManager.getInstance(this).finish(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void about() {
|
// void exit() {
|
||||||
// Intent intent = new Intent(this, AboutActivity.class);
|
// YesNoAlertDialog.OnDialogResultListener listener = new YesNoAlertDialog.OnDialogResultListener(){
|
||||||
// intent.putExtra(AboutActivity.EXTRA_APPINFO, AboutActivityFactory.buildAPPBranchInfo(this));
|
//
|
||||||
// WinBollActivityManager.getInstance(this).startWinBollActivity(this, intent, AboutActivity.class);
|
// @Override
|
||||||
}
|
// public void onYes() {
|
||||||
|
// //WinBoLLActivityManager.getInstance(getApplicationContext()).finishAll();
|
||||||
void exit() {
|
// }
|
||||||
YesNoAlertDialog.OnDialogResultListener listener = new YesNoAlertDialog.OnDialogResultListener(){
|
//
|
||||||
|
// @Override
|
||||||
@Override
|
// public void onNo() {
|
||||||
public void onYes() {
|
// }
|
||||||
//WinBollActivityManager.getInstance(getApplicationContext()).finishAll();
|
// };
|
||||||
}
|
// YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
||||||
|
//
|
||||||
@Override
|
// }
|
||||||
public void onNo() {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
// if (WinBollActivityManager.getInstance(getApplicationContext()).isFirstIWinBollActivity(this)) {
|
// if (WinBoLLActivityManager.getInstance(getApplicationContext()).isFirstIWinBoLLActivity(this)) {
|
||||||
// exit();
|
// exit();
|
||||||
// } else {
|
// } else {
|
||||||
// WinBollActivityManager.getInstance(this).finish(this);
|
// WinBoLLActivityManager.getInstance(this).finish(this);
|
||||||
// super.onBackPressed();
|
// super.onBackPressed();
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTestAboutActivity(View view) {
|
|
||||||
about();
|
public void onTestAssetsHtmlActivity(View view) {
|
||||||
}
|
|
||||||
|
|
||||||
public void onTestJavascriptHtmlActivity(View view) {
|
|
||||||
Intent intent = new Intent(this, AssetsHtmlActivity.class);
|
Intent intent = new Intent(this, AssetsHtmlActivity.class);
|
||||||
intent.putExtra(AssetsHtmlActivity.EXTRA_HTMLFILENAME, "javascript_test.html");
|
intent.putExtra(AssetsHtmlActivity.EXTRA_HTMLFILENAME, "javascript_test.html");
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, intent, AssetsHtmlActivity.class);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
//WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, intent, AssetsHtmlActivity.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -1,26 +1,24 @@
|
|||||||
package cc.winboll.studio.libapputils.activities;
|
package cc.winboll.studio.apputils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author ZhanGSKen@QQ.COM
|
* @Author ZhanGSKen@QQ.COM
|
||||||
* @Date 2025/01/18 10:32:21
|
* @Date 2025/01/18 10:32:21
|
||||||
* @Describe 二维码扫码解码窗口
|
* @Describe 二维码扫码解码窗口
|
||||||
*/
|
*/
|
||||||
import cc.winboll.studio.libapputils.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
import cc.winboll.studio.libapputils.app.IWinBollActivity;
|
import cc.winboll.studio.apputils.R;
|
||||||
import cc.winboll.studio.libapputils.bean.APPInfo;
|
|
||||||
import com.google.zxing.ResultPoint;
|
import com.google.zxing.ResultPoint;
|
||||||
import com.journeyapps.barcodescanner.BarcodeCallback;
|
import com.journeyapps.barcodescanner.BarcodeCallback;
|
||||||
import com.journeyapps.barcodescanner.BarcodeResult;
|
import com.journeyapps.barcodescanner.BarcodeResult;
|
||||||
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class QRCodeDecodeActivity extends Activity implements IWinBollActivity {
|
public class QRCodeDecodeActivity extends Activity {
|
||||||
|
|
||||||
public static final String TAG = "QRCodeDecodeActivity";
|
public static final String TAG = "QRCodeDecodeActivity";
|
||||||
|
|
||||||
@@ -35,37 +33,16 @@ public class QRCodeDecodeActivity extends Activity implements IWinBollActivity {
|
|||||||
// return this;
|
// return this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public APPInfo getAppInfo() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEnableDisplayHomeAsUp() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isAddWinBollToolBar() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Toolbar initToolBar() {
|
|
||||||
return findViewById(R.id.activityqrcodedecodeToolbar1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_qrcodedecode);
|
setContentView(R.layout.activity_qrcodedecode);
|
||||||
resultTextView = findViewById(R.id.activityqrcodedecodeTextView1);
|
|
||||||
|
// 初始化工具栏
|
||||||
|
// Toolbar mToolbar = findViewById(R.id.toolbar);
|
||||||
|
// setActionBar(mToolbar);
|
||||||
|
|
||||||
|
//resultTextView = findViewById(R.id.activityqrcodedecodeTextView1);
|
||||||
barcodeView = findViewById(R.id.activityqrcodedecodeDecoratedBarcodeView1);
|
barcodeView = findViewById(R.id.activityqrcodedecodeDecoratedBarcodeView1);
|
||||||
// 请求相机权限
|
// 请求相机权限
|
||||||
// if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)
|
// if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)
|
||||||
@@ -77,8 +54,6 @@ public class QRCodeDecodeActivity extends Activity implements IWinBollActivity {
|
|||||||
// startScanning();
|
// startScanning();
|
||||||
// }
|
// }
|
||||||
startScanning();
|
startScanning();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startScanning() {
|
private void startScanning() {
|
@@ -0,0 +1,20 @@
|
|||||||
|
package cc.winboll.studio.apputils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen@AliYun.Com
|
||||||
|
* @Date 2025/03/23 16:14:45
|
||||||
|
*/
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class TestBBMorseCodeActivity extends Activity {
|
||||||
|
|
||||||
|
public static final String TAG = "TestBBMorseCodeActivity";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_testbbmorsecode);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -4,15 +4,13 @@ package cc.winboll.studio.apputils;
|
|||||||
* @Author ZhanGSKen@QQ.COM
|
* @Author ZhanGSKen@QQ.COM
|
||||||
* @Date 2025/01/17 19:50:46
|
* @Date 2025/01/17 19:50:46
|
||||||
*/
|
*/
|
||||||
import cc.winboll.studio.apputils.R;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
import cc.winboll.studio.libapputils.app.IWinBollActivity;
|
import cc.winboll.studio.apputils.R;
|
||||||
import cc.winboll.studio.libapputils.bean.APPInfo;
|
import cc.winboll.studio.libapputils.views.StringToQrCodeView;
|
||||||
import cc.winboll.studio.libapputils.view.StringToQrCodeView;
|
|
||||||
|
|
||||||
public class TestStringToQrCodeViewActivity extends Activity implements IWinBollActivity {
|
public class TestStringToQRCodeViewActivity extends Activity {
|
||||||
|
|
||||||
public static final String TAG = "TestStringToQrCodeViewActivity";
|
public static final String TAG = "TestStringToQrCodeViewActivity";
|
||||||
|
|
||||||
@@ -23,35 +21,16 @@ public class TestStringToQrCodeViewActivity extends Activity implements IWinBoll
|
|||||||
// return this;
|
// return this;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public APPInfo getAppInfo() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Toolbar initToolBar() {
|
|
||||||
return findViewById(R.id.activityteststringtoqrcodeviewToolbar1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isEnableDisplayHomeAsUp() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isAddWinBollToolBar() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_teststringtoqrcodeview);
|
setContentView(R.layout.activity_teststringtoqrcodeview);
|
||||||
|
|
||||||
|
// 初始化工具栏
|
||||||
|
Toolbar mToolbar = findViewById(R.id.toolbar);
|
||||||
|
mToolbar.setSubtitle(TAG);
|
||||||
|
setActionBar(mToolbar);
|
||||||
|
|
||||||
mStringToQrCodeView = findViewById(R.id.activityteststringtoqrcodeviewStringToQrCodeView1);
|
mStringToQrCodeView = findViewById(R.id.activityteststringtoqrcodeviewStringToQrCodeView1);
|
||||||
}
|
}
|
||||||
}
|
}
|
21
apputils/src/main/res/layout/activity_assetshtml.xml
Normal file
21
apputils/src/main/res/layout/activity_assetshtml.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<android.widget.Toolbar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
|
<cc.winboll.studio.libapputils.views.SimpleWebView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:id="@+id/activityassetshtmlSimpleWebView1"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@@ -8,7 +8,7 @@
|
|||||||
<android.widget.Toolbar
|
<android.widget.Toolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activitymainToolbar1"/>
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="LogUtils"
|
android:text="TestLogActivity"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:onClick="onLogUtilsClick"/>
|
android:onClick="onTestLogActivity"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:text="Test Javascript Html Activity"
|
android:text="TestAssetsHtmlActivity"
|
||||||
android:onClick="onTestJavascriptHtmlActivity"/>
|
android:onClick="onTestAssetsHtmlActivity"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
20
apputils/src/main/res/layout/activity_qrcodedecode.xml
Normal file
20
apputils/src/main/res/layout/activity_qrcodedecode.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="QRCodeDecodeActivity"/>
|
||||||
|
|
||||||
|
<com.journeyapps.barcodescanner.DecoratedBarcodeView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/activityqrcodedecodeDecoratedBarcodeView1"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@@ -5,11 +5,5 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Text"
|
|
||||||
android:id="@+id/page_text"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@@ -9,7 +9,7 @@
|
|||||||
<android.widget.Toolbar
|
<android.widget.Toolbar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/activityteststringtoqrcodeviewToolbar1"/>
|
android:id="@+id/toolbar"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1.0">
|
android:layout_weight="1.0">
|
||||||
|
|
||||||
<cc.winboll.studio.libapputils.view.StringToQrCodeView
|
<cc.winboll.studio.libapputils.views.StringToQrCodeView
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="300dp"
|
android:layout_height="300dp"
|
||||||
android:id="@+id/activityteststringtoqrcodeviewStringToQrCodeView1"/>
|
android:id="@+id/activityteststringtoqrcodeviewStringToQrCodeView1"/>
|
||||||
|
@@ -1,12 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<item
|
|
||||||
android:id="@+id/item_testwinboll"
|
|
||||||
android:title="TestWinBollActivity"/>
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/item_teststringtoqrcodeview"
|
android:id="@+id/item_teststringtoqrcodeview"
|
||||||
android:title="TestStringToQrCodeViewActivity"/>
|
android:title="TestStringToQRCodeViewActivity"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/item_testqrcodedecodeactivity"
|
android:id="@+id/item_testqrcodedecodeactivity"
|
||||||
android:title="TestQRCodeDecodeActivity"/>
|
android:title="TestQRCodeDecodeActivity"/>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- WinBoll 默认方案 -->
|
<!-- WinBoLL 默认方案 -->
|
||||||
<color name="colorPrimary">#FF196ABC</color>
|
<color name="colorPrimary">#FF196ABC</color>
|
||||||
<color name="colorPrimaryDark">#FF002B57</color>
|
<color name="colorPrimaryDark">#FF002B57</color>
|
||||||
<color name="colorAccent">#FF80BFFF</color>
|
<color name="colorAccent">#FF80BFFF</color>
|
||||||
|
42
build.gradle
42
build.gradle
@@ -1,6 +1,17 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
// 本地 Maven 仓库(默认路径为 ~/.m2/repository)
|
||||||
|
//mavenLocal()
|
||||||
|
// 或自定义本地仓库路径
|
||||||
|
maven { url "file:///sdcard/.m2/repository" }
|
||||||
|
|
||||||
|
// Nexus Maven 库地址
|
||||||
|
// "WinBoLL Release"
|
||||||
|
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||||
|
// "WinBoLL Snapshot"
|
||||||
|
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||||
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||||
@@ -9,17 +20,10 @@ buildscript {
|
|||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
|
//mavenLocal()
|
||||||
// Nexus Maven 库地址
|
|
||||||
// "WinBoll Release"
|
|
||||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
|
||||||
// "WinBoll Snapshot"
|
|
||||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
|
||||||
|
|
||||||
mavenLocal()
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.2.1'
|
classpath 'com.android.tools.build:gradle:7.2.1' // 对应 compileSdkVersion 32
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
@@ -27,6 +31,17 @@ buildscript {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
|
// 本地 Maven 仓库(默认路径为 ~/.m2/repository)
|
||||||
|
//mavenLocal()
|
||||||
|
// 或自定义本地仓库路径
|
||||||
|
maven { url "file:///sdcard/.m2/repository" }
|
||||||
|
|
||||||
|
// Nexus Maven 库地址
|
||||||
|
// "WinBoLL Release"
|
||||||
|
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
||||||
|
// "WinBoLL Snapshot"
|
||||||
|
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
||||||
|
|
||||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google/' }
|
maven { url 'https://maven.aliyun.com/repository/google/' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
|
||||||
@@ -35,13 +50,6 @@ allprojects {
|
|||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
|
|
||||||
// Nexus Maven 库地址
|
|
||||||
// "WinBoll Release"
|
|
||||||
maven { url "https://nexus.winboll.cc/repository/maven-public/" }
|
|
||||||
// "WinBoll Snapshot"
|
|
||||||
maven { url "https://nexus.winboll.cc/repository/maven-snapshots/" }
|
|
||||||
|
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
ext {
|
ext {
|
||||||
@@ -53,7 +61,7 @@ allprojects {
|
|||||||
bashCommitAppPublishBuildFlagInfoFilePath = ".winboll/bashCommitAppPublishBuildFlagInfo.sh"
|
bashCommitAppPublishBuildFlagInfoFilePath = ".winboll/bashCommitAppPublishBuildFlagInfo.sh"
|
||||||
|
|
||||||
winbollFilePath = "winboll.properties"
|
winbollFilePath = "winboll.properties"
|
||||||
keyPropsFilePath = "winboll-x/current.keystore"
|
keyPropsFilePath = "current.keystore"
|
||||||
// 定义 lint 输出文件
|
// 定义 lint 输出文件
|
||||||
lintXmlReportFilePath = "build/reports/lint-results.xml"
|
lintXmlReportFilePath = "build/reports/lint-results.xml"
|
||||||
lintHTMLReportFilePath = "build/reports/lint-results.html"
|
lintHTMLReportFilePath = "build/reports/lint-results.html"
|
||||||
|
@@ -19,17 +19,17 @@ def genVersionName(def versionName){
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 32
|
compileSdkVersion 32
|
||||||
buildToolsVersion "33.0.3"
|
buildToolsVersion "32.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.contacts"
|
applicationId "cc.winboll.studio.contacts"
|
||||||
minSdkVersion 21
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "1.0"
|
versionName "15.2"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@@ -41,31 +41,48 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// 二维码使用的类库
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
|
||||||
|
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||||||
|
api 'com.github.getActivity:XXPermissions:18.63'
|
||||||
|
// 下拉控件
|
||||||
|
api 'com.baoyz.pullrefreshlayout:library:1.2.0'
|
||||||
|
// 拼音搜索
|
||||||
|
// https://mvnrepository.com/artifact/com.github.open-android/pinyin4j
|
||||||
|
api 'com.github.open-android:pinyin4j:2.5.0'
|
||||||
|
// 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.google.zxing:core:3.4.1'
|
||||||
api 'com.journeyapps:zxing-android-embedded:3.6.0'
|
api 'com.journeyapps:zxing-android-embedded:3.6.0'
|
||||||
|
// 应用介绍页类库
|
||||||
api 'io.github.medyo:android-about-page:2.0.0'
|
api 'io.github.medyo:android-about-page:2.0.0'
|
||||||
|
// 吐司类库
|
||||||
api 'com.github.getActivity:ToastUtils:10.5'
|
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 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||||
|
|
||||||
|
// AndroidX 类库
|
||||||
|
/*implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
|
implementation 'androidx.viewpager:viewpager:1.0.0'
|
||||||
|
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||||
|
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||||
|
implementation 'androidx.fragment:fragment:1.1.0'
|
||||||
|
implementation 'com.google.android.material:material:1.4.0'
|
||||||
|
*/
|
||||||
api 'androidx.appcompat:appcompat:1.1.0'
|
api 'androidx.appcompat:appcompat:1.1.0'
|
||||||
api 'androidx.viewpager:viewpager:1.0.0'
|
|
||||||
api 'androidx.fragment:fragment:1.1.0'
|
|
||||||
api 'com.google.android.material:material:1.4.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:libapputils:9.3.2'
|
api 'cc.winboll.studio:libaes:15.2.4'
|
||||||
api 'cc.winboll.studio:libappbase:1.5.6'
|
api 'cc.winboll.studio:libapputils:15.2.1'
|
||||||
|
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue Feb 25 00:17:29 HKT 2025
|
#Sun Apr 13 02:46:09 HKT 2025
|
||||||
stageCount=2
|
stageCount=8
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=1.0
|
baseVersion=15.2
|
||||||
publishVersion=1.0.1
|
publishVersion=15.2.7
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=1.0.2
|
baseBetaVersion=15.2.8
|
||||||
|
@@ -29,9 +29,13 @@
|
|||||||
|
|
||||||
<!-- 更改您的音频设置 -->
|
<!-- 更改您的音频设置 -->
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
<!-- 读取通话记录 -->
|
||||||
|
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
|
||||||
|
|
||||||
|
<!-- 录音 -->
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".App"
|
android:name=".App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -65,7 +69,7 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".phonecallui.PhoneCallActivity"
|
android:name=".phonecallui.PhoneCallActivity"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleTask"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -182,6 +186,10 @@
|
|||||||
|
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
|
<activity android:name="cc.winboll.studio.contacts.activities.UnitTestActivity"/>
|
||||||
|
|
||||||
|
<activity android:name="cc.winboll.studio.contacts.activities.AboutActivity"/>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@@ -5,9 +5,10 @@ package cc.winboll.studio.contacts;
|
|||||||
* @Date 2024/12/08 15:10:51
|
* @Date 2024/12/08 15:10:51
|
||||||
* @Describe 全局应用类
|
* @Describe 全局应用类
|
||||||
*/
|
*/
|
||||||
|
import android.view.Gravity;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.winboll.WinBollActivityManager;
|
||||||
import cc.winboll.studio.libapputils.app.WinBollActivityManager;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
|
|
||||||
@@ -17,12 +18,20 @@ public class App extends GlobalApplication {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
// 必须在调用基类前设置应用调试标志,
|
// 必须在调用基类前设置应用调试标志,
|
||||||
// 这样可以预先设置日志与数据的存储根目录。
|
// 这样可以预先设置日志与数据的存储根目录。
|
||||||
setIsDebuging(this, BuildConfig.DEBUG);
|
//setIsDebuging(BuildConfig.DEBUG);
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// 设置 WinBoll 应用 UI 类型
|
// 设置 WinBoll 应用 UI 类型
|
||||||
WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Aplication);
|
WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Aplication);
|
||||||
|
|
||||||
LogUtils.d(TAG, "onCreate");
|
//LogUtils.d(TAG, "onCreate");
|
||||||
|
|
||||||
|
// 初始化 Toast 框架
|
||||||
|
ToastUtils.init(this);
|
||||||
|
// 设置 Toast 布局样式
|
||||||
|
//ToastUtils.setView(R.layout.toast_custom_view);
|
||||||
|
//ToastUtils.setStyle(new WhiteToastStyle());
|
||||||
|
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,52 +1,44 @@
|
|||||||
package cc.winboll.studio.contacts;
|
package cc.winboll.studio.contacts;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.role.RoleManager;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.telecom.TelecomManager;
|
import android.telecom.TelecomManager;
|
||||||
import android.view.LayoutInflater;
|
import android.telephony.PhoneStateListener;
|
||||||
|
import android.telephony.TelephonyManager;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.Switch;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import cc.winboll.studio.contacts.R;
|
import cc.winboll.studio.contacts.R;
|
||||||
import cc.winboll.studio.contacts.activities.CallActivity;
|
import cc.winboll.studio.contacts.activities.SettingsActivity;
|
||||||
import cc.winboll.studio.contacts.adapters.MyPagerAdapter;
|
|
||||||
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
||||||
|
import cc.winboll.studio.contacts.fragments.CallLogFragment;
|
||||||
|
import cc.winboll.studio.contacts.fragments.ContactsFragment;
|
||||||
|
import cc.winboll.studio.contacts.fragments.LogFragment;
|
||||||
import cc.winboll.studio.contacts.services.MainService;
|
import cc.winboll.studio.contacts.services.MainService;
|
||||||
|
import cc.winboll.studio.libaes.winboll.APPInfo;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.LogView;
|
import cc.winboll.studio.libappbase.LogView;
|
||||||
import cc.winboll.studio.libapputils.app.IWinBollActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
||||||
import cc.winboll.studio.libapputils.app.WinBollActivityManager;
|
|
||||||
import cc.winboll.studio.libapputils.bean.APPInfo;
|
|
||||||
import cc.winboll.studio.libapputils.view.YesNoAlertDialog;
|
|
||||||
import cc.winboll.studio.contacts.listenphonecall.CallListenerService;
|
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import cc.winboll.studio.contacts.activities.SettingsActivity;
|
|
||||||
|
|
||||||
final public class MainActivity extends AppCompatActivity implements IWinBollActivity, ViewPager.OnPageChangeListener, View.OnClickListener {
|
final public class MainActivity extends AppCompatActivity implements IWinBollActivity, ViewPager.OnPageChangeListener, View.OnClickListener {
|
||||||
|
|
||||||
@@ -57,11 +49,13 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
|
|
||||||
public static final String ACTION_SOS = "cc.winboll.studio.libappbase.WinBoll.ACTION_SOS";
|
public static final String ACTION_SOS = "cc.winboll.studio.libappbase.WinBoll.ACTION_SOS";
|
||||||
|
|
||||||
|
static MainActivity _MainActivity;
|
||||||
LogView mLogView;
|
LogView mLogView;
|
||||||
Toolbar mToolbar;
|
Toolbar mToolbar;
|
||||||
CheckBox cbMainService;
|
CheckBox cbMainService;
|
||||||
MainServiceBean mMainServiceBean;
|
MainServiceBean mMainServiceBean;
|
||||||
ViewPager viewPager;
|
private TabLayout tabLayout;
|
||||||
|
private ViewPager viewPager;
|
||||||
private List<View> views; //用来存放放进ViewPager里面的布局
|
private List<View> views; //用来存放放进ViewPager里面的布局
|
||||||
//实例化存储imageView(导航原点)的集合
|
//实例化存储imageView(导航原点)的集合
|
||||||
ImageView[] imageViews;
|
ImageView[] imageViews;
|
||||||
@@ -70,15 +64,20 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
LinearLayout linearLayout;//下标所在在LinearLayout布局里
|
LinearLayout linearLayout;//下标所在在LinearLayout布局里
|
||||||
int currentPoint = 0;//当前被选中中页面的下标
|
int currentPoint = 0;//当前被选中中页面的下标
|
||||||
|
|
||||||
|
private TelephonyManager telephonyManager;
|
||||||
|
private MyPhoneStateListener phoneStateListener;
|
||||||
|
List<Fragment> fragmentList;
|
||||||
|
List<String> tabTitleList;
|
||||||
|
|
||||||
private static final int DIALER_REQUEST_CODE = 1;
|
private static final int DIALER_REQUEST_CODE = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AppCompatActivity getActivity() {
|
public Activity getActivity() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public APPInfo getAppInfo() {
|
// public APPInfo getAppInfo() {
|
||||||
// String szBranchName = "contacts";
|
// String szBranchName = "contacts";
|
||||||
//
|
//
|
||||||
// APPInfo appInfo = AboutActivityFactory.buildDefaultAPPInfo();
|
// APPInfo appInfo = AboutActivityFactory.buildDefaultAPPInfo();
|
||||||
@@ -93,8 +92,8 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
// appInfo.setAppAPKName("Contacts");
|
// appInfo.setAppAPKName("Contacts");
|
||||||
// appInfo.setAppAPKFolderName("Contacts");
|
// appInfo.setAppAPKFolderName("Contacts");
|
||||||
// return appInfo;
|
// return appInfo;
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -102,28 +101,51 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
//if (prosessIntents(getIntent())) return;
|
//if (prosessIntents(getIntent())) return;
|
||||||
// 以下正常创建主窗口
|
// 以下正常创建主窗口
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
_MainActivity = this;
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
// 初始化工具栏
|
// 初始化工具栏
|
||||||
mToolbar = findViewById(R.id.activitymainToolbar1);
|
mToolbar = findViewById(R.id.activitymainToolbar1);
|
||||||
setSupportActionBar(mToolbar);
|
setSupportActionBar(mToolbar);
|
||||||
if (isEnableDisplayHomeAsUp()) {
|
// if (isEnableDisplayHomeAsUp()) {
|
||||||
// 显示后退按钮
|
// // 显示后退按钮
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
// }
|
||||||
getSupportActionBar().setSubtitle(getTag());
|
getSupportActionBar().setSubtitle(getTag());
|
||||||
|
|
||||||
initData();
|
tabLayout = findViewById(R.id.tabLayout);
|
||||||
initView();
|
viewPager = findViewById(R.id.viewPager);
|
||||||
//initPoint();//调用初始化导航原点的方法
|
|
||||||
viewPager.addOnPageChangeListener(this);//滑动事件
|
|
||||||
|
|
||||||
ViewPager viewPager = findViewById(R.id.activitymainViewPager1);
|
// 创建Fragment列表和标题列表
|
||||||
MyPagerAdapter pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
|
fragmentList = new ArrayList<>();
|
||||||
viewPager.setAdapter(pagerAdapter);
|
tabTitleList = new ArrayList<>();
|
||||||
TabLayout tabLayout = findViewById(R.id.activitymainTabLayout1);
|
fragmentList.add(CallLogFragment.newInstance(0));
|
||||||
|
fragmentList.add(ContactsFragment.newInstance(1));
|
||||||
|
fragmentList.add(LogFragment.newInstance(2));
|
||||||
|
tabTitleList.add("通话记录");
|
||||||
|
tabTitleList.add("联系人");
|
||||||
|
tabTitleList.add("应用日志");
|
||||||
|
|
||||||
|
// 设置ViewPager的适配器
|
||||||
|
MyPagerAdapter adapter = new MyPagerAdapter(getSupportFragmentManager(), fragmentList, tabTitleList);
|
||||||
|
viewPager.setAdapter(adapter);
|
||||||
|
|
||||||
|
// 关联TabLayout和ViewPager
|
||||||
tabLayout.setupWithViewPager(viewPager);
|
tabLayout.setupWithViewPager(viewPager);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// initData();
|
||||||
|
// initView();
|
||||||
|
// //initPoint();//调用初始化导航原点的方法
|
||||||
|
// viewPager.addOnPageChangeListener(this);//滑动事件
|
||||||
|
|
||||||
|
//ViewPager viewPager = findViewById(R.id.activitymainViewPager1);
|
||||||
|
//MyPagerAdapter pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
|
||||||
|
//viewPager.setAdapter(pagerAdapter);
|
||||||
|
//TabLayout tabLayout = findViewById(R.id.activitymainTabLayout1);
|
||||||
|
//tabLayout.setupWithViewPager(viewPager);
|
||||||
|
|
||||||
// mMainServiceBean = MainServiceBean.loadBean(this, MainServiceBean.class);
|
// mMainServiceBean = MainServiceBean.loadBean(this, MainServiceBean.class);
|
||||||
// if (mMainServiceBean == null) {
|
// if (mMainServiceBean == null) {
|
||||||
// mMainServiceBean = new MainServiceBean();
|
// mMainServiceBean = new MainServiceBean();
|
||||||
@@ -140,36 +162,86 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
MainService.startMainService(MainActivity.this);
|
|
||||||
|
MainServiceBean mMainServiceBean = MainServiceBean.loadBean(this, MainServiceBean.class);
|
||||||
|
if (mMainServiceBean == null) {
|
||||||
|
mMainServiceBean = new MainServiceBean();
|
||||||
|
MainServiceBean.saveBean(this, mMainServiceBean);
|
||||||
|
}
|
||||||
|
if (mMainServiceBean.isEnable()) {
|
||||||
|
MainService.startMainService(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化TelephonyManager和PhoneStateListener
|
||||||
|
telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
|
||||||
|
phoneStateListener = new MyPhoneStateListener();
|
||||||
|
telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ViewPager的适配器
|
||||||
|
private class MyPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
|
private List<Fragment> fragmentList;
|
||||||
|
private List<String> tabTitleList;
|
||||||
|
|
||||||
|
public MyPagerAdapter(FragmentManager fm, List<Fragment> fragmentList, List<String> tabTitleList) {
|
||||||
|
super(fm);
|
||||||
|
this.fragmentList = fragmentList;
|
||||||
|
this.tabTitleList = tabTitleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
return fragmentList.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return fragmentList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharSequence getPageTitle(int position) {
|
||||||
|
return tabTitleList.get(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void dialPhoneNumber(String phoneNumber) {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||||
|
intent.setData(android.net.Uri.parse("tel:" + phoneNumber));
|
||||||
|
if (ActivityCompat.checkSelfPermission(_MainActivity, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_MainActivity.startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化view,即显示的图片
|
//初始化view,即显示的图片
|
||||||
void initView() {
|
// void initView() {
|
||||||
viewPager = findViewById(R.id.activitymainViewPager1);
|
// viewPager = findViewById(R.id.activitymainViewPager1);
|
||||||
pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
|
// pagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
|
||||||
viewPager.setAdapter(pagerAdapter);
|
// viewPager.setAdapter(pagerAdapter);
|
||||||
//adapter = new MyPagerAdapter(views);
|
// //adapter = new MyPagerAdapter(views);
|
||||||
//viewPager = findViewById(R.id.activitymainViewPager1);
|
// //viewPager = findViewById(R.id.activitymainViewPager1);
|
||||||
//viewPager.setAdapter(adapter);
|
// //viewPager.setAdapter(adapter);
|
||||||
//linearLayout = findViewById(R.id.activitymainLinearLayout1);
|
// //linearLayout = findViewById(R.id.activitymainLinearLayout1);
|
||||||
//initPoint();//初始化页面下方的点
|
// //initPoint();//初始化页面下方的点
|
||||||
viewPager.setOnPageChangeListener(this);
|
// viewPager.setOnPageChangeListener(this);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
//初始化所要显示的布局
|
//初始化所要显示的布局
|
||||||
void initData() {
|
// void initData() {
|
||||||
ViewPager viewPager = findViewById(R.id.activitymainViewPager1);
|
// LayoutInflater inflater = LayoutInflater.from(getActivity());
|
||||||
LayoutInflater inflater = LayoutInflater.from(getActivity());
|
// View view1 = inflater.inflate(R.layout.fragment_call_log, viewPager, false);
|
||||||
View view1 = inflater.inflate(R.layout.fragment_call, viewPager, false);
|
// View view2 = inflater.inflate(R.layout.fragment_contacts, viewPager, false);
|
||||||
View view2 = inflater.inflate(R.layout.fragment_contacts, viewPager, false);
|
// View view3 = inflater.inflate(R.layout.fragment_log, viewPager, false);
|
||||||
View view3 = inflater.inflate(R.layout.fragment_log, viewPager, false);
|
//
|
||||||
|
// views = new ArrayList<>();
|
||||||
views = new ArrayList<>();
|
// views.add(view1);
|
||||||
views.add(view1);
|
// views.add(view2);
|
||||||
views.add(view2);
|
// views.add(view3);
|
||||||
views.add(view3);
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
// void initPoint() {
|
// void initPoint() {
|
||||||
// imageViews = new ImageView[5];//实例化5个图片
|
// imageViews = new ImageView[5];//实例化5个图片
|
||||||
@@ -231,6 +303,23 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
//setSubTitle("");
|
//setSubTitle("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class MyPhoneStateListener extends PhoneStateListener {
|
||||||
|
@Override
|
||||||
|
public void onCallStateChanged(int state, String incomingNumber) {
|
||||||
|
switch (state) {
|
||||||
|
case TelephonyManager.CALL_STATE_IDLE:
|
||||||
|
LogUtils.d(TAG, "电话已挂断");
|
||||||
|
break;
|
||||||
|
case TelephonyManager.CALL_STATE_OFFHOOK:
|
||||||
|
LogUtils.d(TAG, "正在通话中");
|
||||||
|
break;
|
||||||
|
case TelephonyManager.CALL_STATE_RINGING:
|
||||||
|
LogUtils.d(TAG, "来电: " + incomingNumber);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
@@ -287,40 +376,25 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public Toolbar initToolBar() {
|
// public void onBackPressed() {
|
||||||
return findViewById(R.id.activitymainToolbar1);
|
// exit();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// void exit() {
|
||||||
public boolean isAddWinBollToolBar() {
|
// YesNoAlertDialog.OnDialogResultListener listener = new YesNoAlertDialog.OnDialogResultListener(){
|
||||||
return true;
|
//
|
||||||
}
|
// @Override
|
||||||
|
// public void onYes() {
|
||||||
@Override
|
// WinBollActivityManager.getInstance(getApplicationContext()).finishAll();
|
||||||
public boolean isEnableDisplayHomeAsUp() {
|
// }
|
||||||
return false;
|
//
|
||||||
}
|
// @Override
|
||||||
|
// public void onNo() {
|
||||||
@Override
|
// }
|
||||||
public void onBackPressed() {
|
// };
|
||||||
exit();
|
// YesNoAlertDialog.show(this, "[ " + getString(R.string.app_name) + " ]", "Exit(Yes/No).\nIs close all activity?", listener);
|
||||||
}
|
// }
|
||||||
|
|
||||||
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
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
@@ -331,11 +405,7 @@ final public class MainActivity extends AppCompatActivity implements IWinBollAct
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == R.id.item_call) {
|
if (item.getItemId() == R.id.item_settings) {
|
||||||
Intent intent = new Intent(this, CallActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, CallActivity.class);
|
|
||||||
} else if (item.getItemId() == R.id.item_settings) {
|
|
||||||
Intent intent = new Intent(this, SettingsActivity.class);
|
Intent intent = new Intent(this, SettingsActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, CallActivity.class);
|
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, CallActivity.class);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user