Compare commits
587 Commits
2.8.3-sum7
...
develop
| Author | SHA1 | Date |
|---|---|---|
|
|
aa8b9f338f | |
|
|
658c1c58d5 | |
|
|
39792f0815 | |
|
|
db834a1f07 | |
|
|
f8a94161db | |
|
|
5d526a77e3 | |
|
|
a508a81553 | |
|
|
61fb38cd84 | |
|
|
1bf2d5dd8f | |
|
|
0a18c8613f | |
|
|
abb671616c | |
|
|
297a843b9c | |
|
|
0698fa0d8c | |
|
|
70b5d8d81a | |
|
|
0a3947b8e3 | |
|
|
3f402b132b | |
|
|
5b80c62a63 | |
|
|
717c83753f | |
|
|
b6dee6da6a | |
|
|
9c3f55bef2 | |
|
|
9843b72f6f | |
|
|
61851e5f84 | |
|
|
4ec0996dff | |
|
|
fa1363cea0 | |
|
|
fda45a7c86 | |
|
|
b5786787f0 | |
|
|
d4cbf2e11e | |
|
|
7d7e158fd7 | |
|
|
a8ff88398d | |
|
|
bae9fc45c2 | |
|
|
ba4a47204b | |
|
|
226eb739bd | |
|
|
869a135bab | |
|
|
7ddd60d314 | |
|
|
2ca00265db | |
|
|
e0c4964cc2 | |
|
|
3706981645 | |
|
|
a124b3df9a | |
|
|
5a7bae592d | |
|
|
6d2e406ee5 | |
|
|
cc489ef7bf | |
|
|
495537d087 | |
|
|
20e4d108d4 | |
|
|
d0af5a002e | |
|
|
86de21f6a8 | |
|
|
e664a27cd0 | |
|
|
4a6df90f0c | |
|
|
fdaab1c27e | |
|
|
f8c59a7b75 | |
|
|
f182fe6697 | |
|
|
daf1bbfca5 | |
|
|
b8eec6ae5b | |
|
|
3ede2d00bd | |
|
|
d2a387e82f | |
|
|
da14f83a42 | |
|
|
586fff5485 | |
|
|
ea9b73c1fe | |
|
|
e791e19265 | |
|
|
3de8147b41 | |
|
|
b9ceb67104 | |
|
|
90a0d36362 | |
|
|
bd4d939a29 | |
|
|
64a6edd3fb | |
|
|
75c20a7a2b | |
|
|
d5994a8d65 | |
|
|
572b9c2dc6 | |
|
|
f9f994c540 | |
|
|
ba9596b37d | |
|
|
b01bca74fd | |
|
|
bfc8668803 | |
|
|
951d84f404 | |
|
|
231d97ea81 | |
|
|
73000962fe | |
|
|
3075833ab3 | |
|
|
eba5dd8654 | |
|
|
abe3718353 | |
|
|
3f315751a1 | |
|
|
68d8e2b9cf | |
|
|
c195e8b3d2 | |
|
|
25f137441b | |
|
|
d436c5f856 | |
|
|
8d9c51d755 | |
|
|
2957bccb33 | |
|
|
3135550b83 | |
|
|
4d36231fa5 | |
|
|
dfeeaff74c | |
|
|
5a9777f7f1 | |
|
|
63f5f8c89d | |
|
|
ca08c27eef | |
|
|
4040d5f647 | |
|
|
8d45cc5827 | |
|
|
96f0a09a5d | |
|
|
38a77dbba6 | |
|
|
8b817b3bd8 | |
|
|
754773be55 | |
|
|
4f362aafac | |
|
|
ea0dc558cb | |
|
|
80d8b6dd88 | |
|
|
2819545a43 | |
|
|
9526456d75 | |
|
|
f975b5ddac | |
|
|
581eb511b9 | |
|
|
af42e34654 | |
|
|
0495470ca8 | |
|
|
6c88a4b4fa | |
|
|
88d7ddf124 | |
|
|
e6d8bee035 | |
|
|
208c9d91db | |
|
|
bf3c1d573b | |
|
|
4e90c0dbbb | |
|
|
caefec2fbf | |
|
|
339ee8f6ea | |
|
|
b00b8996d5 | |
|
|
06fbb06aee | |
|
|
ef8f10cc13 | |
|
|
b6fe1898e7 | |
|
|
955a6f3fe1 | |
|
|
a0529a4e1e | |
|
|
2db2ca95ce | |
|
|
a0bca08997 | |
|
|
748443cd4e | |
|
|
3921f3a940 | |
|
|
c81c8a62b3 | |
|
|
e850900b40 | |
|
|
74d60d0131 | |
|
|
65a72827bc | |
|
|
309082a9b3 | |
|
|
e528b9f5df | |
|
|
1e1dad780b | |
|
|
0e54cde4bf | |
|
|
b99f9d4f1c | |
|
|
7466d12505 | |
|
|
98ffadd87d | |
|
|
af33a57bf2 | |
|
|
87f99d3570 | |
|
|
b025265f91 | |
|
|
0f3181555a | |
|
|
76fb0180d6 | |
|
|
e02aaed7d2 | |
|
|
c9f1bdc551 | |
|
|
2b9862adea | |
|
|
d91cd3e9e8 | |
|
|
e21d49efc8 | |
|
|
56535e07ff | |
|
|
60c5906fe9 | |
|
|
67e5f839f1 | |
|
|
89012b0f8b | |
|
|
7476dccc0e | |
|
|
9182a300c5 | |
|
|
faa4c87b5f | |
|
|
8d391753d7 | |
|
|
337aa4a110 | |
|
|
ddf597e0d3 | |
|
|
9c16af25fb | |
|
|
e2324209ed | |
|
|
9544b994dc | |
|
|
3b25fb9038 | |
|
|
48156dd27f | |
|
|
905489e237 | |
|
|
a5ad2b7fc6 | |
|
|
5d3ad6e36b | |
|
|
6d91551f59 | |
|
|
0717f9ba18 | |
|
|
ac7855a332 | |
|
|
a40b82b85b | |
|
|
c5e90199c3 | |
|
|
53908dd56e | |
|
|
9d9514a091 | |
|
|
bc58fb0fbd | |
|
|
ec061bedc1 | |
|
|
a7f4abbab5 | |
|
|
f9b292fd6a | |
|
|
8aed588405 | |
|
|
ea2acc2963 | |
|
|
2760f07307 | |
|
|
ec22a39538 | |
|
|
331fd30699 | |
|
|
c469b2dc22 | |
|
|
202bde46ed | |
|
|
37ce311764 | |
|
|
9fc04c4b1e | |
|
|
5f020af2cc | |
|
|
55b2f2656d | |
|
|
fb681dfd60 | |
|
|
5e59f20685 | |
|
|
0fc191d004 | |
|
|
30c9e7399e | |
|
|
35e6c476dd | |
|
|
f632c7bbc9 | |
|
|
08f27ddcf8 | |
|
|
1822a71c2a | |
|
|
77f448692c | |
|
|
9cc95d4cc2 | |
|
|
ff756647a9 | |
|
|
9a7fc3d9b8 | |
|
|
d37140ebf0 | |
|
|
d288f5bff2 | |
|
|
aad34783ad | |
|
|
914ea9c398 | |
|
|
02b16063c6 | |
|
|
45c5f9aa90 | |
|
|
4ac64f3a3b | |
|
|
8b90c1c498 | |
|
|
70fc08314f | |
|
|
ce7f59a76c | |
|
|
1cd95aefa6 | |
|
|
739d20428a | |
|
|
6ee2807027 | |
|
|
a6244d986a | |
|
|
8ac97b0027 | |
|
|
7a115cb967 | |
|
|
d1195d21ae | |
|
|
72828c6c4e | |
|
|
38ef69a926 | |
|
|
aaac8296b3 | |
|
|
e217551a82 | |
|
|
b09a1432a3 | |
|
|
f161a9c4bf | |
|
|
f8e69f9fc2 | |
|
|
6f1b71970d | |
|
|
3baacf8862 | |
|
|
9c2da0a1b8 | |
|
|
2681ad82e1 | |
|
|
8764d11cce | |
|
|
3c60de54cb | |
|
|
d30a08266a | |
|
|
859f3b2a1d | |
|
|
bf25b24967 | |
|
|
7c53dcc4f4 | |
|
|
bf9d1a5759 | |
|
|
ddb54bb222 | |
|
|
813b07e18d | |
|
|
0fa06d65b5 | |
|
|
e947a3f808 | |
|
|
b34f6e0720 | |
|
|
b8c61b795e | |
|
|
cf68c544aa | |
|
|
ef24d2050b | |
|
|
4a175f915d | |
|
|
5848013a1e | |
|
|
c5f801c1fe | |
|
|
d52c46d582 | |
|
|
e81fb1b24e | |
|
|
3ee70b1d48 | |
|
|
e4b2bb4a42 | |
|
|
8a6430ae29 | |
|
|
a213b00091 | |
|
|
64e88d946f | |
|
|
47a904b4fc | |
|
|
33e73a2b47 | |
|
|
d889c02a0a | |
|
|
073b6a998a | |
|
|
9450d49b0b | |
|
|
5e0c158cde | |
|
|
16b1c561d4 | |
|
|
24f2f52512 | |
|
|
e98ec40b7f | |
|
|
f92ea5c70b | |
|
|
81505c6202 | |
|
|
638f30b902 | |
|
|
0812bae1ab | |
|
|
6bfe16f044 | |
|
|
53da64b7e2 | |
|
|
ebb38d7d75 | |
|
|
484f633180 | |
|
|
78c89664c4 | |
|
|
90270069da | |
|
|
49992f300b | |
|
|
72e268e6b1 | |
|
|
78901e3339 | |
|
|
149224a073 | |
|
|
db447f845e | |
|
|
6cab0ad496 | |
|
|
9f869d3895 | |
|
|
b808a03702 | |
|
|
7330d8a7f0 | |
|
|
6e3dc0eef6 | |
|
|
696f791dca | |
|
|
e101bd8ba2 | |
|
|
3847ab8465 | |
|
|
deee31e517 | |
|
|
ab17f935c3 | |
|
|
d51b4380d7 | |
|
|
b6d62c13ef | |
|
|
b76b60df5c | |
|
|
f82ae0a9b8 | |
|
|
358c70828f | |
|
|
156c4da2b3 | |
|
|
ca496fd39f | |
|
|
53a038d90e | |
|
|
d77d89b356 | |
|
|
2155a50875 | |
|
|
4a9dfb9567 | |
|
|
10382e83bf | |
|
|
c11ac40df4 | |
|
|
3c8a5d138a | |
|
|
aee37c3e3e | |
|
|
0a2c753620 | |
|
|
d907d590d9 | |
|
|
8e57a7622c | |
|
|
8abf861303 | |
|
|
247998ff81 | |
|
|
1068f16473 | |
|
|
15a33adaae | |
|
|
619af9c6c5 | |
|
|
bc97d0b0bb | |
|
|
9c9a953281 | |
|
|
6a89a472e1 | |
|
|
8ce7bfb95e | |
|
|
582aee4718 | |
|
|
3b43cb0bda | |
|
|
e711b3d294 | |
|
|
e087b594ff | |
|
|
b37f25335c | |
|
|
9c087b9dd4 | |
|
|
ebbf1ff6b1 | |
|
|
20d0206859 | |
|
|
9db0808306 | |
|
|
eea484af01 | |
|
|
47d619b28e | |
|
|
60b23882fd | |
|
|
47adf646c6 | |
|
|
26a4598f3c | |
|
|
624bb565a8 | |
|
|
87e9b8037e | |
|
|
49d0558da1 | |
|
|
6e5240fe2e | |
|
|
260b203ea3 | |
|
|
864b0b3b3d | |
|
|
91cc8f5011 | |
|
|
453ca7c0ed | |
|
|
5fd0700daa | |
|
|
55fd0b8504 | |
|
|
d2cd482a07 | |
|
|
bfccfba00e | |
|
|
5b48b4027e | |
|
|
41c045d779 | |
|
|
07cc5c13ca | |
|
|
b0584137b4 | |
|
|
d0a2f1f45f | |
|
|
372ddbfb49 | |
|
|
17c697eed9 | |
|
|
69dca53bf3 | |
|
|
6c2f0d29d8 | |
|
|
2bec5459c5 | |
|
|
8eb685a7eb | |
|
|
6d13ee52f0 | |
|
|
adb5a2b2c2 | |
|
|
0569febf67 | |
|
|
0e54d8a2cf | |
|
|
2a57c92f63 | |
|
|
692ee6c9fb | |
|
|
1257ad8509 | |
|
|
1a0b4b441d | |
|
|
f23016c967 | |
|
|
b4db2e5284 | |
|
|
39229c34f6 | |
|
|
090b3b18d0 | |
|
|
d1490673bb | |
|
|
e38aa30a84 | |
|
|
00bc7a4b06 | |
|
|
f584179f2f | |
|
|
07e965f8f3 | |
|
|
9c67e8fec2 | |
|
|
849968107e | |
|
|
7179d72f7e | |
|
|
261207a4c0 | |
|
|
303e205276 | |
|
|
99cb23fe14 | |
|
|
528f192f76 | |
|
|
778cfa846b | |
|
|
00e1a93014 | |
|
|
1f392a688d | |
|
|
92083fec83 | |
|
|
35316ad93a | |
|
|
3c7ac2524f | |
|
|
600f243797 | |
|
|
36f5f77c30 | |
|
|
c7ec6a9dae | |
|
|
0c563134da | |
|
|
fc53271212 | |
|
|
6485c77e09 | |
|
|
1fafe4287d | |
|
|
16c4e3eec7 | |
|
|
afb2fb1326 | |
|
|
952387cb5a | |
|
|
386b224123 | |
|
|
501cdd5edf | |
|
|
b327548c85 | |
|
|
aaebb3a536 | |
|
|
5ad054617b | |
|
|
ff13cc2766 | |
|
|
dc72bc5bc3 | |
|
|
fdfac102e2 | |
|
|
364502d1a3 | |
|
|
b4805ac2c5 | |
|
|
571cb5dd44 | |
|
|
06b2043b24 | |
|
|
afffe01868 | |
|
|
0b4d12782b | |
|
|
ce1b707837 | |
|
|
7fb617e39a | |
|
|
9db0c85cda | |
|
|
27c89e487a | |
|
|
73dac680e5 | |
|
|
23ed0ce2ad | |
|
|
aa792a3af6 | |
|
|
8d64e101c9 | |
|
|
3281a93dc3 | |
|
|
81985ca7d7 | |
|
|
f76ef17494 | |
|
|
4b12033bd3 | |
|
|
ce81123112 | |
|
|
2de8f3d35b | |
|
|
97fe9fa01f | |
|
|
6590dc922f | |
|
|
c48499253b | |
|
|
3c0773c6e7 | |
|
|
064264c20b | |
|
|
3dcb36a417 | |
|
|
35af8894d2 | |
|
|
2cd0993534 | |
|
|
35e064949d | |
|
|
8f5e3978e4 | |
|
|
08449e34ec | |
|
|
d158eeaf72 | |
|
|
91e94db747 | |
|
|
15b323ee69 | |
|
|
f3362ebde5 | |
|
|
70c10fd0de | |
|
|
1958cded23 | |
|
|
7d2a7d536d | |
|
|
ef7cbbadca | |
|
|
c9c37dfb04 | |
|
|
59d7bb63e9 | |
|
|
129f43a349 | |
|
|
637c0cb15a | |
|
|
1ae7d6be16 | |
|
|
f22e33e3ea | |
|
|
47e3504a02 | |
|
|
5ecd250565 | |
|
|
f5f9075da2 | |
|
|
e10b182d6b | |
|
|
9cd4e1d581 | |
|
|
6941d5edd1 | |
|
|
1c66772202 | |
|
|
9bec186292 | |
|
|
8b26c60f00 | |
|
|
16300727d1 | |
|
|
28856aaf9f | |
|
|
32d55346cc | |
|
|
1b28ea9dda | |
|
|
994fd9ecad | |
|
|
cb9623703d | |
|
|
fd68bfb8ca | |
|
|
9e6f7237af | |
|
|
7aeb2b2740 | |
|
|
590deef8e9 | |
|
|
c9e6653e33 | |
|
|
e7e04837b6 | |
|
|
aa47e53584 | |
|
|
c3fa1d5d30 | |
|
|
fffa659881 | |
|
|
bab9dd4893 | |
|
|
7ff56a5087 | |
|
|
bf85a55930 | |
|
|
1107529f56 | |
|
|
6a6c9fb3bf | |
|
|
9ab0fbe48c | |
|
|
71a56002fe | |
|
|
1865177d74 | |
|
|
0bca11bdeb | |
|
|
14bb8b0cf1 | |
|
|
8f439a9c37 | |
|
|
2881a1b946 | |
|
|
13d8eb1c7e | |
|
|
fada3a63c9 | |
|
|
a5430d5ce1 | |
|
|
57135e1a59 | |
|
|
15489547b7 | |
|
|
68960398b2 | |
|
|
203e248a14 | |
|
|
c57d5375e0 | |
|
|
d88f79e436 | |
|
|
dddb7ece25 | |
|
|
169ee99afa | |
|
|
fe68aff23c | |
|
|
7bcb29c482 | |
|
|
47804205b6 | |
|
|
4493f6cc13 | |
|
|
8356a1cfe1 | |
|
|
8534175057 | |
|
|
9649ba16b5 | |
|
|
23c4a26404 | |
|
|
c8f23aef4e | |
|
|
98e1044bdd | |
|
|
d823cefe47 | |
|
|
38b2764c81 | |
|
|
20286ea8d2 | |
|
|
1f77d5e115 | |
|
|
61aac78af0 | |
|
|
16bc210211 | |
|
|
c3b9a4dabc | |
|
|
ccdc91a497 | |
|
|
400c8461fc | |
|
|
fda9e7b51c | |
|
|
0dba9f560c | |
|
|
56ea9647cd | |
|
|
971bb60f42 | |
|
|
8059aa7b0d | |
|
|
01bfb5fd56 | |
|
|
0ba4892d3e | |
|
|
b7f3b4333e | |
|
|
644ad99520 | |
|
|
adb3c77d31 | |
|
|
2cd0cc50d0 | |
|
|
f39daf565a | |
|
|
552e17e39a | |
|
|
7e2d87f39c | |
|
|
1853242c66 | |
|
|
b78d45c7cc | |
|
|
c44b948228 | |
|
|
c029382410 | |
|
|
f879d87f04 | |
|
|
4bc43af690 | |
|
|
0391e78832 | |
|
|
3343d2665a | |
|
|
61f6ce317b | |
|
|
637c208f55 | |
|
|
8edfc61346 | |
|
|
8603d24bcb | |
|
|
bc6446beb8 | |
|
|
ecb9039547 | |
|
|
59d1a2982e | |
|
|
63ba21a512 | |
|
|
5e3aab3abe | |
|
|
575ada3b27 | |
|
|
09c7d8298d | |
|
|
8f7ff2c3dd | |
|
|
dc53976aec | |
|
|
cdcc34ff91 | |
|
|
1c625e55a0 | |
|
|
8475a28dc5 | |
|
|
7ca543e42f | |
|
|
88cc097732 | |
|
|
ed4d7bff92 | |
|
|
550fbc6d2c | |
|
|
685e01e83f | |
|
|
2731b7b690 | |
|
|
c3f392445f | |
|
|
a2a7256682 | |
|
|
de941f6036 | |
|
|
574bccfc59 | |
|
|
aa1e69d277 | |
|
|
304411fc09 | |
|
|
bfeebc141f | |
|
|
dd0f354b62 | |
|
|
24fb42c5f4 | |
|
|
f8fedf0059 | |
|
|
d17f4acd3e | |
|
|
4e886ebbcc | |
|
|
fa752b596d | |
|
|
89c022f0cb | |
|
|
22f3aac465 | |
|
|
3ca10b8fa9 | |
|
|
df3273a6fc | |
|
|
a0920b83e2 | |
|
|
b347d57848 | |
|
|
351790b0c3 | |
|
|
7abd37498e | |
|
|
1da490f77a | |
|
|
4dd3b0c2aa | |
|
|
7a21b2c5ed | |
|
|
0aee863123 | |
|
|
2195bce303 | |
|
|
78a82a74bc | |
|
|
dc29cf27a3 | |
|
|
198a7db954 | |
|
|
ef7d4fca86 | |
|
|
b6703dbe38 | |
|
|
3510f10e25 | |
|
|
1b4f9cc8ab | |
|
|
36d2ecfcfa | |
|
|
7c4566e561 | |
|
|
2c4788b7c7 | |
|
|
b845c601d0 | |
|
|
90526efbd4 |
|
|
@ -1,18 +0,0 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 90
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- feature
|
||||
- security
|
||||
- bug
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
name: Android CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
- name: Download WebRTC
|
||||
run: mkdir libs && wget -O libs/libwebrtc-m92.aar https://gultsch.de/files/libwebrtc-m92.aar
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Build Quicksy (Compat)
|
||||
run: ./gradlew assembleQuicksyFreeCompatDebug
|
||||
- name: Build Quicksy (System)
|
||||
run: ./gradlew assembleQuicksyFreeSystemDebug
|
||||
- name: Build Conversations (Compat)
|
||||
run: ./gradlew assembleConversationsFreeCompatDebug
|
||||
- name: Build Conversations (System)
|
||||
run: ./gradlew assembleConversationsFreeSystemDebug
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Conversations all-flavors (debug)
|
||||
path: ./build/outputs/apk/**/debug/Conversations-*.apk
|
||||
|
||||
|
||||
|
|
@ -9,7 +9,6 @@ src/quicksyPlaystore/res/values/push.xml
|
|||
# https://github.com/github/gitignore/blob/master/Gradle.gitignore
|
||||
.gradle/
|
||||
build/
|
||||
gradle.properties
|
||||
captures/
|
||||
signing.properties
|
||||
# Ignore Gradle GUI config
|
||||
|
|
|
|||
19
.travis.yml
19
.travis.yml
|
|
@ -1,19 +0,0 @@
|
|||
language: android
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
android:
|
||||
components:
|
||||
- platform-tools
|
||||
- tools
|
||||
- build-tools-28.0.3
|
||||
- extra-google-google_play_services
|
||||
licenses:
|
||||
- '.+'
|
||||
before_script:
|
||||
- wget -O libs/libwebrtc-m81.aar http://gultsch.de/files/libwebrtc-m81.aar
|
||||
script:
|
||||
- ./gradlew assembleConversationsFreeSystemRelease
|
||||
- ./gradlew assembleQuicksyFreeCompatRelease
|
||||
|
||||
before_install:
|
||||
- yes | sdkmanager "platforms;android-28"
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
host = https://www.transifex.com
|
||||
lang_map = af_ZA: af-rZA, am_ET: am-rET, ar_AE: ar-rAE, ar_BH: ar-rBH, ar_DZ: ar-rDZ, ar_EG: ar-rEG, ar_IQ: ar-rIQ, ar_JO: ar-rJO, ar_KW: ar-rKW, ar_LB: ar-rLB, ar_LY: ar-rLY, ar_MA: ar-rMA, ar_OM: ar-rOM, ar_QA: ar-rQA, ar_SA: ar-rSA, ar_SY: ar-rSY, ar_TN: ar-rTN, ar_YE: ar-rYE, arn_CL: arn-rCL, as_IN: as-rIN, az_AZ: az-rAZ, ba_RU: ba-rRU, be_BY: be-rBY, bg_BG: bg-rBG, bn_BD: bn-rBD, bn_IN: bn-rIN, bo_CN: bo-rCN, br_FR: br-rFR, bs_BA: bs-rBA, ca_ES: ca-rES, co_FR: co-rFR, cs_CZ: cs-rCZ, cy_GB: cy-rGB, da_DK: da-rDK, de_AT: de-rAT, de_CH: de-rCH, de_DE: de-rDE, de_LI: de-rLI, de_LU: de-rLU, dsb_DE: dsb-rDE, dv_MV: dv-rMV, el_GR: el-rGR, en_AU: en-rAU, en_BZ: en-rBZ, en_CA: en-rCA, en_GB: en-rGB, en_IE: en-rIE, en_IN: en-rIN, en_JM: en-rJM, en_MY: en-rMY, en_NZ: en-rNZ, en_PH: en-rPH, en_SG: en-rSG, en_TT: en-rTT, en_US: en-rUS, en_ZA: en-rZA, en_ZW: en-rZW, es_AR: es-rAR, es_BO: es-rBO, es_CL: es-rCL, es_CO: es-rCO, es_CR: es-rCR, es_DO: es-rDO, es_EC: es-rEC, es_ES: es-rES, es_GT: es-rGT, es_HN: es-rHN, es_MX: es-rMX, es_NI: es-rNI, es_PA: es-rPA, es_PE: es-rPE, es_PR: es-rPR, es_PY: es-rPY, es_SV: es-rSV, es_US: es-rUS, es_UY: es-rUY, es_VE: es-rVE, et_EE: et-rEE, eu_ES: eu-rES, fa_IR: fa-rIR, fi_FI: fi-rFI, fil_PH: fil-rPH, fo_FO: fo-rFO, fr_BE: fr-rBE, fr_CA: fr-rCA, fr_CH: fr-rCH, fr_FR: fr-rFR, fr_LU: fr-rLU, fr_MC: fr-rMC, fy_NL: fy-rNL, ga_IE: ga-rIE, gd_GB: gd-rGB, gl_ES: gl-rES, gsw_FR: gsw-rFR, gu_IN: gu-rIN, ha_NG: ha-rNG, hi_IN: hi-rIN, hr_BA: hr-rBA, hr_HR: hr-rHR, hsb_DE: hsb-rDE, hu_HU: hu-rHU, hy_AM: hy-rAM, id_ID: id-rID, ig_NG: ig-rNG, ii_CN: ii-rCN, is_IS: is-rIS, it_CH: it-rCH, it_IT: it-rIT, iu_CA: iu-rCA, ja_JP: ja-rJP, ka_GE: ka-rGE, kk_KZ: kk-rKZ, kl_GL: kl-rGL, km_KH: km-rKH, kn_IN: kn-rIN, ko_KR: ko-rKR, kok_IN: kok-rIN, ky_KG: ky-rKG, lb_LU: lb-rLU, lo_LA: lo-rLA, lt_LT: lt-rLT, lv_LV: lv-rLV, mi_NZ: mi-rNZ, mk_MK: mk-rMK, ml_IN: ml-rIN, mn_CN: mn-rCN, mn_MN: mn-rMN, moh_CA: moh-rCA, mr_IN: mr-rIN, ms_BN: ms-rBN, ms_MY: ms-rMY, mt_MT: mt-rMT, nb_NO: nb-rNO, ne_NP: ne-rNP, nl_BE: nl-rBE, nl_NL: nl-rNL, nn_NO: nn-rNO, nso_ZA: nso-rZA, oc_FR: oc-rFR, or_IN: or-rIN, pa_IN: pa-rIN, pl_PL: pl-rPL, prs_AF: prs-rAF, ps_AF: ps-rAF, pt_BR: pt-rBR, pt_PT: pt-rPT, qut_GT: qut-rGT, quz_BO: quz-rBO, quz_EC: quz-rEC, quz_PE: quz-rPE, rm_CH: rm-rCH, ro_RO: ro-rRO, ru_RU: ru-rRU, rw_RW: rw-rRW, sa_IN: sa-rIN, sah_RU: sah-rRU, se_FI: se-rFI, se_NO: se-rNO, se_SE: se-rSE, si_LK: si-rLK, sk_SK: sk-rSK, sl_SI: sl-rSI, sma_NO: sma-rNO, sma_SE: sma-rSE, smj_NO: smj-rNO, smj_SE: smj-rSE, smn_FI: smn-rFI, sms_FI: sms-rFI, sq_AL: sq-rAL, sr_BA: sr-rBA, sr_CS: sr-rCS, sr_ME: sr-rME, sr_RS: sr-rRS, sv_FI: sv-rFI, sv_SE: sv-rSE, sw_KE: sw-rKE, syr_SY: syr-rSY, ta_IN: ta-rIN, te_IN: te-rIN, tg_TJ: tg-rTJ, th_TH: th-rTH, tk_TM: tk-rTM, tn_ZA: tn-rZA, tr_TR: tr-rTR, tt_RU: tt-rRU, tzm_DZ: tzm-rDZ, ug_CN: ug-rCN, uk_UA: uk-rUA, ur_PK: ur-rPK, uz_UZ: uz-rUZ, vi_VN: vi-rVN, wo_SN: wo-rSN, xh_ZA: xh-rZA, yo_NG: yo-rNG, zh_CN: zh-rCN, zh_HK: zh-rHK, zh_MO: zh-rMO, zh_SG: zh-rSG, zh_TW: zh-rTW, zu_ZA: zu-rZA, no_NO: no-rNO, he_IL: iw-rIL, he: iw
|
||||
|
||||
[conversations.strings]
|
||||
[conversations.main-strings]
|
||||
file_filter = src/main/res/values-<lang>/strings.xml
|
||||
source_file = src/main/res/values/strings.xml
|
||||
source_lang = en
|
||||
|
|
|
|||
140
CHANGELOG.md
140
CHANGELOG.md
|
|
@ -1,5 +1,130 @@
|
|||
# Changelog
|
||||
|
||||
### Version 2.10.2
|
||||
|
||||
* Fix crash when rendering some quotes
|
||||
* Fix crash in welcome screen
|
||||
|
||||
### Version 2.10.1
|
||||
|
||||
* Fix issue with some videos not being compressed
|
||||
* Fix rare crash when opening notification
|
||||
|
||||
### Version 2.10.0
|
||||
|
||||
* Show black bars when remote video does not match aspect ratio of screen
|
||||
* Improve search performance
|
||||
* Add setting to prevent screenshots
|
||||
|
||||
### Version 2.9.13
|
||||
|
||||
* minor A/V improvements
|
||||
|
||||
### Version 2.9.12
|
||||
|
||||
* Always verify domain name. No user overwrite
|
||||
* Support roster pre authentication
|
||||
|
||||
### Version 2.9.11
|
||||
|
||||
* Fixed 'No Connectivity' issues on Android 7.1
|
||||
|
||||
### Version 2.9.10
|
||||
* fix HTTP up/download for users that don’t trust system CAs
|
||||
|
||||
### Version 2.9.9
|
||||
|
||||
* Various bug fixes around Tor support
|
||||
* Improve call compatibility with Dino
|
||||
|
||||
### Version 2.9.8
|
||||
|
||||
* Verify A/V calls with preexisting OMEMO sessions
|
||||
* Improve compatibility with non libwebrtc WebRTC implementations
|
||||
|
||||
### Version 2.9.7
|
||||
|
||||
* Ability to select incoming call ringtone
|
||||
* Fix OpenPGP key id discovery for OpenKeychain 5.6+
|
||||
* Properly verify punycode TLS certificates
|
||||
* Improve stability of RTP session establishment (calling)
|
||||
|
||||
### Version 2.9.6
|
||||
|
||||
* Show call button for offline contacts if they previously announced support
|
||||
* Back button no longer ends call when call is connected
|
||||
* bug fixes
|
||||
|
||||
### Version 2.9.5
|
||||
|
||||
* Quicksy: Automatically receive verification SMS
|
||||
|
||||
### Version 2.9.4
|
||||
* minor stability improvements for A/V calls
|
||||
* Conversations releases from here on forward require Android 5
|
||||
|
||||
### Version 2.9.3
|
||||
|
||||
* Fixed connectivity issues when different accounts used different SCRAM mechanisms
|
||||
* Add support for SCRAM-SHA-512
|
||||
* Allow P2P (Jingle) file transfer with self contact
|
||||
|
||||
### Version 2.9.2
|
||||
|
||||
* Offer Easy Invite generation on supporting servers
|
||||
* Display GIFs send from Movim
|
||||
* store avatars in cache
|
||||
|
||||
### Version 2.9.1
|
||||
|
||||
* fixed search on Android <= 5
|
||||
* optimize memory consumption
|
||||
|
||||
### Version 2.9.0
|
||||
|
||||
* Search individual conversations
|
||||
* Notify user if message delivery fails
|
||||
* Remember display names (nicks) from Quicksy users across restarts
|
||||
* Add button to start Orbot (Tor) from notification if necessary
|
||||
|
||||
### Version 2.8.10
|
||||
|
||||
* Handle GPX files
|
||||
* Improve performance for backup restore
|
||||
* bug fixes
|
||||
|
||||
### Version 2.8.9
|
||||
|
||||
* add 'Return to chat' to audio call screen
|
||||
* Improve keyboard shortcuts
|
||||
* bug fixes
|
||||
|
||||
### Version 2.8.8
|
||||
|
||||
* Fixed notifications not showing up under certain conditions
|
||||
* Fixed compatibility issues and crashes related to A/V calls
|
||||
|
||||
### Version 2.8.7
|
||||
|
||||
* Show help button if A/V call fails
|
||||
* Fixed some annoying crashes
|
||||
* Fixed Jingle connections (file transfer + calls) with bare JIDs
|
||||
|
||||
### Version 2.8.6
|
||||
|
||||
* Offer to record voice message when callee is busy
|
||||
|
||||
### Version 2.8.5
|
||||
|
||||
* Reduce echo during calls on some devices
|
||||
* Fix login when passwords contains special characters
|
||||
* Play dial and busy tones on speaker during video calls
|
||||
|
||||
### Version 2.8.4
|
||||
|
||||
* Rework Login with certificate UI
|
||||
* Add ability to pin chats on top (add to favorites)
|
||||
|
||||
### Version 2.8.3
|
||||
|
||||
* Move call icon to the left in order to keep other toolbar icons in a consistent place
|
||||
|
|
@ -8,7 +133,7 @@
|
|||
|
||||
### Version 2.8.2
|
||||
|
||||
* Add button to switch camea during video call
|
||||
* Add button to switch camera during video call
|
||||
* Fixed voice calls on tablets
|
||||
|
||||
### Version 2.8.1
|
||||
|
|
@ -374,10 +499,9 @@
|
|||
* Icons for attach menu
|
||||
|
||||
### Version 1.16.2
|
||||
* change mam catchup strategie. support mam:1
|
||||
* change mam catchup strategy. support mam:1
|
||||
* bug fixes
|
||||
|
||||
|
||||
### Version 1.16.1
|
||||
* UI performance fixes
|
||||
* bug fixes
|
||||
|
|
@ -427,7 +551,7 @@
|
|||
* bug fixes
|
||||
|
||||
### Version 1.14.6
|
||||
* make error notification dismissable
|
||||
* make error notification dismissible
|
||||
* bug fixes
|
||||
|
||||
|
||||
|
|
@ -451,7 +575,7 @@
|
|||
* bug fixes
|
||||
|
||||
### Version 1.14.0
|
||||
* Improvments for N
|
||||
* Improvements for N
|
||||
* Quick Reply to Notifications on N
|
||||
* Don't download avatars and files when data saver is on
|
||||
* bug fixes
|
||||
|
|
@ -629,7 +753,7 @@
|
|||
|
||||
### Version 1.7.0
|
||||
* CAPTCHA support
|
||||
* SASL EXTERNAL (client certifiates)
|
||||
* SASL EXTERNAL (client certificates)
|
||||
* fetching MUC history via MAM
|
||||
* redownload deleted files from HTTP hosts
|
||||
* Expert setting to automatically set presence
|
||||
|
|
@ -737,7 +861,7 @@
|
|||
* accept more ciphers
|
||||
|
||||
### Version 1.0
|
||||
* MUC controls (Affiliaton changes)
|
||||
* MUC controls (Affiliation changes)
|
||||
* Added download button to notification
|
||||
* Added check box to hide offline contacts
|
||||
* Use Material theme and icons on Android L
|
||||
|
|
@ -843,7 +967,7 @@
|
|||
* XEP-0333. Mark whether the other party has read your messages
|
||||
* Delayed messages are now tagged properly
|
||||
* Share images from the Gallery
|
||||
* Infinit history scrolling
|
||||
* Infinite history scrolling
|
||||
* Mark the last used presence in presence selection dialog
|
||||
|
||||
### Version 0.3
|
||||
|
|
|
|||
39
README.md
39
README.md
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
* End-to-end encryption with [OMEMO](http://conversations.im/omemo/) or [OpenPGP](http://openpgp.org/about/)
|
||||
* Send and receive images as well as other kind of files
|
||||
* Make audio and video calls
|
||||
* [Encrypted audio and video calls (DTLS-SRTP)](https://help.conversations.im)
|
||||
* Share your location
|
||||
* Send voice messages
|
||||
* Indication when your contact has read your message
|
||||
|
|
@ -139,9 +139,9 @@ Note: This is kind of a weird quirk in OpenFire. Most other servers would just t
|
|||
|
||||
Maybe you attempted to use the Jabber ID `test@b.tld` because `a.tld` doesn’t point to the correct host. In that case you might have to enable the extended connection settings in the expert settings of Conversations and set a host name.
|
||||
|
||||
### I get 'Stream opening error'. What does that mean?
|
||||
#### I get 'Stream opening error'. What does that mean?
|
||||
|
||||
In most cases this error is caused by ejabberd advertising support for TLSv1.3 but not properly supporting it. This can happen if the openssl version on the server already supports TLSv1.3 but the fast\_tls wrapper library used by ejabberd not (properly) support it. Upgrading fast\_tls and ejabberd or - theoretically - downgrading openssl should fix the issue. A work around is to explicity disable TLSv1.3 support in the ejabberd configuration. More information can be found on [this issue on the ejabberd issue tracker](https://github.com/processone/ejabberd/issues/2614).
|
||||
In most cases this error is caused by ejabberd advertising support for TLSv1.3 but not properly supporting it. This can happen if the OpenSSL version on the server already supports TLSv1.3 but the fast\_tls wrapper library used by ejabberd not (properly) support it. Upgrading fast\_tls and ejabberd or - theoretically - downgrading OpenSSL should fix the issue. A work around is to explicitly disable TLSv1.3 support in the ejabberd configuration. More information can be found on [this issue on the ejabberd issue tracker](https://github.com/processone/ejabberd/issues/2614).
|
||||
|
||||
|
||||
#### I’m getting this annoying permanent notification
|
||||
|
|
@ -149,7 +149,7 @@ Starting with Conversations 2.3.6 Conversations releases distributed over the Go
|
|||
|
||||
However you can disable the notification via settings of the operating system. (Not settings in Conversations.)
|
||||
|
||||
**The battery consumption and the entire behaviour of Conversations will remain the same (as good or as bad as it was before). Why is Google doing this to you? We have no idea.**
|
||||
**The battery consumption and the entire behavior of Conversations will remain the same (as good or as bad as it was before). Why is Google doing this to you? We have no idea.**
|
||||
|
||||
##### Android <= 7.1 or Conversations from F-Droid (all Android versions)
|
||||
The foreground notification is still controlled over the expert settings within Conversations as it always has been. Whether or not you need to enable it depends on how aggressive the non-standard 'power saving' features are that your phone vendor has built into the operating system.
|
||||
|
|
@ -173,7 +173,7 @@ You can find a detailed description of how your server, the app server and FCM a
|
|||
|
||||
|
||||
#### But why do I need a permanent notification if I use Google Push?
|
||||
FCM (Google Push) allows an app to wake up from *Doze* which is (as the name suggests) a hibernation feature of the Android operating system that cuts the network connection and also reduces the number of times the app is allowed to wake up (to ping the server for example). The app can ask to be excluded from doze. Non push variants of the app (from F-Droid or if the server doesn’t support it) will do this on first start up. So if you get exemption from *Doze*, or if you get regular push events sent to you, Doze should not pose a threat to Conversatons working properly. But even with *Doze* the app is still open in the background (kept in memory); it is just limited in the actions it can do. Conversations needs to stay in memory to hold certain session state (online status of contacts, join status of group chats, …). However with Android 8 Google changed all of this again and now an App that wants to stay in memory needs to have a foreground service which is visible to the user via the annoying notification. But why does Conversations need to hold that state? XMPP is a stateful protocol that has a lot of per-session information; packets need to be counted, presence information needs to be held, some features like Message Carbons get activated once per session, MAM catchup happens once, service discovery happens only once; the list goes on. When Conversations was created in early 2014 none of this was a problem because apps were just allowed to stay in memory. Basically every XMPP client out there holds that information in memory because it would be a lot more complicated trying to persist it to disk. An entire rewrite of Conversations in the year 2019 would attempt to do that and would probably succeed however it would require exactly that; a complete rewrite which is not feasible right now. That’s by the way also the reason why it is difficult to write an XMPP client on iOS. Or more broadly put this is also the reason why other protocols are designed as or migrated to stateless protocols (often based on HTTP); take for example the migration of IMAP to [JMAP](https://jmap.io/).
|
||||
FCM (Google Push) allows an app to wake up from *Doze* which is (as the name suggests) a hibernation feature of the Android operating system that cuts the network connection and also reduces the number of times the app is allowed to wake up (to ping the server for example). The app can ask to be excluded from doze. Non push variants of the app (from F-Droid or if the server doesn’t support it) will do this on first start up. So if you get exemption from *Doze*, or if you get regular push events sent to you, Doze should not pose a threat to Conversatons working properly. But even with *Doze* the app is still open in the background (kept in memory); it is just limited in the actions it can do. Conversations needs to stay in memory to hold certain session state (online status of contacts, join status of group chats, …). However with Android 8 Google changed all of this again and now an App that wants to stay in memory needs to have a foreground service which is visible to the user via the annoying notification. But why does Conversations need to hold that state? XMPP is a statefull protocol that has a lot of per-session information; packets need to be counted, presence information needs to be held, some features like Message Carbons get activated once per session, MAM catch-up happens once, service discovery happens only once; the list goes on. When Conversations was created in early 2014 none of this was a problem because apps were just allowed to stay in memory. Basically every XMPP client out there holds that information in memory because it would be a lot more complicated trying to persist it to disk. An entire rewrite of Conversations in the year 2019 would attempt to do that and would probably succeed however it would require exactly that; a complete rewrite which is not feasible right now. That’s by the way also the reason why it is difficult to write an XMPP client on iOS. Or more broadly put this is also the reason why other protocols are designed as or migrated to stateless protocols (often based on HTTP); take for example the migration of IMAP to [JMAP](https://jmap.io/).
|
||||
|
||||
#### Conversations doesn’t work for me. Where can I get help?
|
||||
|
||||
|
|
@ -267,11 +267,11 @@ and introduce yourself to `iNPUTmice` so he can approve your join request.
|
|||
#### How do I backup / move Conversations to a new device?
|
||||
On the one hand Conversations supports Message Archive Management to keep a server side history of your messages so when migrating to a new device that device can display your entire history. However that does not work if you enable OMEMO due to its forward secrecy. (Read [The State of Mobile XMPP in 2016](https://gultsch.de/xmpp_2016.html) especially the section on encryption.)
|
||||
|
||||
As of version 2.4.0 an integrated Backup & Restore function will help with this, go to Settings and you’ll find a setting called Create backup. A notification will pop-up during the creation process that will announce you when it's ready. After the files, one for each account, are created, you can move the **Conversations** folder *(if you want your old media files too)* or only the **Conversations/Backup** folder *(for OMEMO keys and history only)* to your new device (or to a storage place) where a freshly installed Conversations can restore each account. Don't forget to enable the accounts after a succesful restore.
|
||||
As of version 2.4.0 an integrated Backup & Restore function will help with this, go to Settings and you’ll find a setting called Create backup. A notification will pop-up during the creation process that will announce you when it's ready. After the files, one for each account, are created, you can move the **Conversations** folder *(if you want your old media files too)* or only the **Conversations/Backup** folder *(for OMEMO keys and history only)* to your new device (or to a storage place) where a freshly installed Conversations can restore each account. Don't forget to enable the accounts after a successfull restore.
|
||||
|
||||
This backup method will include your OMEMO keys. Due to forward secrecy you will not be able to recover messages sent and received between creating the backup and restoring it. If you have a server side archive (MAM) those messages will be retrieved but displayed as *unable to decrypt*. For technical reasons you might also lose the first message you either sent or receive after the restore; for each conversation you have. This message will then also show up as *unable to decrypt*, but this will automatically recover itself as long as both participants are on Conversations 2.3.11+. Note that this doesn’t happen if you just transfer to a new phone and no messages have been exchanged between backup and restore.
|
||||
|
||||
In the vast, vast majority of cases you won’t have to manually delete OMEMO keys or do anything like that. Conversations only introduced the offical backup feature in 2.4.0 after making sure the *OMEMO self healing* mechanism introduced in 2.3.11 works fine.
|
||||
In the vast, vast majority of cases you won’t have to manually delete OMEMO keys or do anything like that. Conversations only introduced the official backup feature in 2.4.0 after making sure the *OMEMO self healing* mechanism introduced in 2.3.11 works fine.
|
||||
|
||||
**WARNING**: Be sure to know your accounts passwords or find ways to reset them **before** doing the backup as the files are encrypted using those passwords and the Restore process will ask for them.
|
||||
**WARNING**: Do not use the restore backup feature in an attempt to clone (run simultaneously) an installation. Restoring a backup is only meant for migrations or in case you’ve lost the original device.
|
||||
|
|
@ -327,7 +327,7 @@ OMEMO has two requirements: Your server and the server of your contact need to s
|
|||
OMEMO encryption works only in private (members only) conferences that are non-anonymous. Non-anonymous (being able to discover the real JID of other participants) is a technical requirement to discover the key material. Members only is a sort of arbitrary requirement imposed by Conversations. (see 'OMEMO is grayed out')
|
||||
|
||||
The server of all participants need to pass the OMEMO [Compliance Test](https://conversations.im/compliance/).
|
||||
In other words they either need to run Ejabberd 18.01+ or Prosody 0.11+.
|
||||
In other words they either need to run ejabberd 18.01+ or Prosody 0.11+.
|
||||
|
||||
(Alternatively it would also work if all participants had each other in their contact list; But that rarely is the case in larger group chats.)
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ There are XMPP Clients available for all major platforms.
|
|||
#### Windows / Linux
|
||||
For your desktop computer we recommend that you use [Gajim](https://gajim.org). You need to install the plugins `OMEMO`, `HTTP Upload` and `URL image preview` to get the best compatibility with Conversations. Plugins can be installed from within the app.
|
||||
#### iOS
|
||||
Unfortunately we don‘t have a recommendation for iPhones right now. There are two clients available [ChatSecure](https://chatsecure.org/) and [Monal](https://monal.im/). Both with their own pros and cons.
|
||||
Unfortunately we don‘t have a recommendation for iPhones right now. There are three clients available [Siskin](https://siskin.im/), [ChatSecure](https://chatsecure.org/) and [Monal](https://monal.im/). Each with their own pros and cons.
|
||||
|
||||
|
||||
### Development
|
||||
|
|
@ -371,7 +371,7 @@ Unfortunately we don‘t have a recommendation for iPhones right now. There are
|
|||
**Note:** Starting with version 2.8.0 you will need to compile libwebrtc.
|
||||
[Instructions](https://webrtc.github.io/webrtc-org/native-code/android/) can be found on the WebRTC
|
||||
website. Place the resulting libwebrtc.aar in the `libs/` directory. The PlayStore release currently
|
||||
uses the stable M81 release and renamed the file name to `libwebrtc-m81.aar` put potentially you can
|
||||
uses the stable M90 release and renamed the file name to `libwebrtc-m90.aar` put potentially you can
|
||||
reference any file name by modifying `build.gradle`.
|
||||
|
||||
Make sure to have ANDROID_HOME point to your Android SDK. Use the Android SDK Manager to install missing dependencies.
|
||||
|
|
@ -385,25 +385,6 @@ There are two build flavors available. *free* and *playstore*. Unless you know w
|
|||
|
||||
[](https://dev.sum7.eu/sum7/Conversations/pipelines)
|
||||
|
||||
#### How do I update/add external libraries?
|
||||
|
||||
If the library you want to update is in Maven Central or JCenter (or has its own
|
||||
Maven repo), add it or update its version in `build.gradle`. If the library is
|
||||
in the `libs/` directory, you can update it using a subtree merge by doing the
|
||||
following (using `minidns` as an example):
|
||||
|
||||
git remote add minidns https://github.com/rtreffer/minidns.git
|
||||
git fetch minidns
|
||||
git merge -s subtree minidns master
|
||||
|
||||
To add a new dependency to the `libs/` directory (replacing "name", "branch" and
|
||||
"url" as necessary):
|
||||
|
||||
git remote add name url
|
||||
git merge -s ours --no-commit name/branch
|
||||
git read-tree --prefix=libs/name -u name/branch
|
||||
git commit -m "Subtree merged in name"
|
||||
|
||||
#### How do I debug Conversations
|
||||
|
||||
If something goes wrong Conversations usually exposes very little information in
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ images.each do |source_filename, settings|
|
|||
else
|
||||
path = "../src/#{output_parts[0]}/res/drawable-#{resolution}/#{output_parts[1]}.png"
|
||||
end
|
||||
execute_cmd "#{inkscape} -f #{source_filename} -z -C -w #{width} -h #{height} -e #{path}"
|
||||
execute_cmd "#{inkscape} #{source_filename} -C -w #{width} -h #{height} -o #{path}"
|
||||
|
||||
top = []
|
||||
right = []
|
||||
|
|
|
|||
119
build.gradle
119
build.gradle
|
|
@ -1,14 +1,12 @@
|
|||
import com.android.build.OutputFile
|
||||
|
||||
// Top-level build file where you can add configuration options common to all
|
||||
// sub-projects/modules.
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -16,8 +14,8 @@ apply plugin: 'com.android.application'
|
|||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
|
@ -26,37 +24,35 @@ configurations {
|
|||
conversationsFreeCompatImplementation
|
||||
conversationsPlaystoreCompatImplementation
|
||||
conversationsPlaystoreSystemImplementation
|
||||
quicksyPlaystoreCompatImplementation
|
||||
quicksyPlaystoreSystemImplementation
|
||||
quicksyFreeCompatImplementation
|
||||
quicksyImplementation
|
||||
}
|
||||
|
||||
ext {
|
||||
supportLibVersion = '28.0.0'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//should remain that low because later versions introduce dependency to androidx (not sure exactly from what version)
|
||||
playstoreImplementation('com.google.firebase:firebase-messaging:17.3.4') {
|
||||
implementation 'androidx.viewpager:viewpager:1.0.0'
|
||||
|
||||
playstoreImplementation('com.google.firebase:firebase-messaging:22.0.0') {
|
||||
exclude group: 'com.google.firebase', module: 'firebase-core'
|
||||
exclude group: 'com.google.firebase', module: 'firebase-analytics'
|
||||
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
||||
}
|
||||
conversationsPlaystoreCompatImplementation("com.android.installreferrer:installreferrer:1.1.2")
|
||||
conversationsPlaystoreSystemImplementation("com.android.installreferrer:installreferrer:1.1.2")
|
||||
conversationsPlaystoreCompatImplementation("com.android.installreferrer:installreferrer:2.2")
|
||||
conversationsPlaystoreSystemImplementation("com.android.installreferrer:installreferrer:2.2")
|
||||
quicksyPlaystoreCompatImplementation 'com.google.android.gms:play-services-auth-api-phone:17.5.1'
|
||||
quicksyPlaystoreSystemImplementation 'com.google.android.gms:play-services-auth-api-phone:17.5.1'
|
||||
implementation 'org.sufficientlysecure:openpgp-api:10.0'
|
||||
implementation('com.theartofdev.edmodo:android-image-cropper:2.7.+') {
|
||||
exclude group: 'com.android.support', module: 'appcompat-v7'
|
||||
exclude group: 'com.android.support', module: 'exifinterface'
|
||||
}
|
||||
implementation "com.android.support:support-v13:$supportLibVersion"
|
||||
implementation "com.android.support:appcompat-v7:$supportLibVersion"
|
||||
implementation "com.android.support:exifinterface:$supportLibVersion"
|
||||
implementation "com.android.support:cardview-v7:$supportLibVersion"
|
||||
implementation "com.android.support:support-emoji:$supportLibVersion"
|
||||
implementation "com.android.support:design:$supportLibVersion"
|
||||
compatImplementation "com.android.support:support-emoji-appcompat:$supportLibVersion"
|
||||
conversationsFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
|
||||
quicksyFreeCompatImplementation "com.android.support:support-emoji-bundled:$supportLibVersion"
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.3.3'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'androidx.emoji:emoji:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
compatImplementation 'androidx.emoji:emoji-appcompat:1.1.0'
|
||||
conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
|
||||
quicksyFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
|
||||
implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
|
||||
//zxing stopped supporting Java 7 so we have to stick with 3.3.3
|
||||
//https://github.com/zxing/zxing/issues/1170
|
||||
|
|
@ -66,22 +62,23 @@ dependencies {
|
|||
implementation 'org.whispersystems:signal-protocol-java:2.6.2'
|
||||
implementation 'com.makeramen:roundedimageview:2.3.0'
|
||||
implementation "com.wefika:flowlayout:0.4.1"
|
||||
implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
|
||||
implementation project(':libs:xmpp-addr')
|
||||
implementation 'org.osmdroid:osmdroid-android:6.1.5'
|
||||
implementation 'com.otaliastudios:transcoder:0.10.4'
|
||||
|
||||
implementation 'org.jxmpp:jxmpp-jid:1.0.2'
|
||||
implementation 'org.osmdroid:osmdroid-android:6.1.10'
|
||||
implementation 'org.hsluv:hsluv:0.2'
|
||||
implementation 'org.conscrypt:conscrypt-android:2.2.1'
|
||||
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
||||
implementation 'me.drakeet.support:toastcompat:1.1.0'
|
||||
implementation "com.leinardi.android:speed-dial:2.0.1"
|
||||
//retrofit needs to stick with 2.6.x (https://github.com/square/retrofit/blob/master/CHANGELOG.md)
|
||||
implementation "com.squareup.retrofit2:retrofit:2.6.4"
|
||||
implementation "com.squareup.retrofit2:converter-gson:2.6.4"
|
||||
//okhttp needs to stick with 3.12.x
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.12.10'
|
||||
implementation 'com.google.guava:guava:27.1-android'
|
||||
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.11.1'
|
||||
//implementation fileTree(include: ['libwebrtc-m81.aar'], dir: 'libs')
|
||||
implementation 'org.webrtc:google-webrtc:1.0.+'
|
||||
implementation "com.leinardi.android:speed-dial:3.2.0"
|
||||
|
||||
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
||||
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
|
||||
implementation "com.squareup.okhttp3:okhttp:4.9.2"
|
||||
|
||||
implementation 'com.google.guava:guava:30.1.1-android'
|
||||
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.36'
|
||||
// implementation fileTree(include: ['libwebrtc-m92.aar'], dir: 'libs')
|
||||
implementation 'org.webrtc:google-webrtc:1.0.32006'
|
||||
}
|
||||
|
||||
ext {
|
||||
|
|
@ -94,28 +91,27 @@ android {
|
|||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 25
|
||||
versionCode 383
|
||||
versionName "2.8.3"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 4202301
|
||||
versionName "2.10.2"
|
||||
archivesBaseName += "-$versionName"
|
||||
applicationId "eu.sum7.conversations"
|
||||
resValue "string", "applicationId", applicationId
|
||||
resValue "string", "app_name", "Conv6ations"
|
||||
buildConfigField "String", "LOGTAG", "\"conver6ations\""
|
||||
def appName = "Conv6ations"
|
||||
resValue "string", "app_name", appName
|
||||
buildConfigField "String", "APP_NAME", "\"$appName\"";
|
||||
}
|
||||
|
||||
|
||||
configurations {
|
||||
implementation.exclude group: 'org.jetbrains' , module:'annotations'
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled true
|
||||
}
|
||||
|
||||
dexOptions {
|
||||
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
|
||||
preDexLibraries = preDexEnabled && !travisBuild
|
||||
jumboMode true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
|
@ -128,9 +124,11 @@ android {
|
|||
quicksy {
|
||||
dimension "mode"
|
||||
applicationId = "im.quicksy.client"
|
||||
resValue "string", "app_name", "Quicksy"
|
||||
resValue "string", "applicationId", applicationId
|
||||
buildConfigField "String", "LOGTAG", "\"quicksy\""
|
||||
|
||||
def appName = "Quicksy"
|
||||
resValue "string", "app_name", appName
|
||||
buildConfigField "String", "APP_NAME", "\"$appName\"";
|
||||
}
|
||||
|
||||
conversations {
|
||||
|
|
@ -152,14 +150,21 @@ android {
|
|||
}
|
||||
|
||||
sourceSets {
|
||||
quicksyFreeSystem {
|
||||
java {
|
||||
srcDir 'src/quicksyFree/java'
|
||||
}
|
||||
}
|
||||
quicksyFreeCompat {
|
||||
java {
|
||||
srcDir 'src/freeCompat/java'
|
||||
srcDir 'src/quicksyFree/java'
|
||||
}
|
||||
}
|
||||
quicksyPlaystoreCompat {
|
||||
java {
|
||||
srcDir 'src/playstoreCompat/java'
|
||||
srcDir 'src/quicksyPlaystore/java'
|
||||
}
|
||||
res {
|
||||
srcDir 'src/playstoreCompat/res'
|
||||
|
|
@ -167,6 +172,9 @@ android {
|
|||
}
|
||||
}
|
||||
quicksyPlaystoreSystem {
|
||||
java {
|
||||
srcDir 'src/quicksyPlaystore/java'
|
||||
}
|
||||
res {
|
||||
srcDir 'src/quicksyPlaystore/res'
|
||||
}
|
||||
|
|
@ -232,7 +240,7 @@ android {
|
|||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
|
||||
disable 'MissingTranslation', 'InvalidPackage', 'AppCompatResource'
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
|
@ -254,5 +262,4 @@ android {
|
|||
exclude 'META-INF/BCKEY.DSA'
|
||||
exclude 'META-INF/BCKEY.SF'
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="../style.xsl" type="text/xsl"?>
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<Project xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xmpp="https://linkmauve.fr/ns/xmpp-doap#">
|
||||
<Project xmlns="http://usefulinc.com/ns/doap#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
||||
xmlns:xmpp="https://linkmauve.fr/ns/xmpp-doap#"
|
||||
xmlns:schema="https://schema.org/">
|
||||
<name>Conversations</name>
|
||||
|
||||
<created>2014-01-14</created>
|
||||
|
|
@ -22,13 +25,21 @@
|
|||
<!-- See https://github.com/ewilderj/doap/issues/49 -->
|
||||
<language>en</language>
|
||||
|
||||
<logo rdf:resource="https://raw.githubusercontent.com/iNPUTmice/Conversations/master/doap.rdf"/>
|
||||
<schema:logo rdf:resource="https://raw.githubusercontent.com/iNPUTmice/Conversations/master/art/ic_launcher.svg"/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/01.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/02.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/03.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/04.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/05.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/06.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/07.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/08.png'/>
|
||||
<schema:screenshot rdf:resource='https://raw.githubusercontent.com/iNPUTmice/Conversations/master/fastlane/metadata/android/en-US/images/phoneScreenshots/09.png'/>
|
||||
|
||||
<programming-language>Java</programming-language>
|
||||
|
||||
<os>Android</os>
|
||||
|
||||
<!-- TODO: Categories are URIs, find a better location for them. -->
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-xmpp"/>
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-jabber"/>
|
||||
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-client"/>
|
||||
|
|
@ -80,6 +91,28 @@
|
|||
<xmpp:version>1.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0048.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0049.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0054.html"/>
|
||||
<xmpp:status>partial</xmpp:status>
|
||||
<xmpp:version>1.2</xmpp:version>
|
||||
<xmpp:note xml:lang='en'>Avatars only</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0084.html"/>
|
||||
|
|
@ -108,6 +141,14 @@
|
|||
<xmpp:version>1.5.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0153.html"/>
|
||||
<xmpp:status>partial</xmpp:status>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
<xmpp:note xml:lang='en'>Read only. Publication via XEP-0398</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0163.html"/>
|
||||
|
|
@ -121,7 +162,14 @@
|
|||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0166.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.1.2</xmpp:version>
|
||||
<xmpp:note>File transfer only</xmpp:note>
|
||||
<xmpp:note>File transfer + A/V calls</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0167.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.2.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
|
|
@ -132,6 +180,13 @@
|
|||
<xmpp:note>read only</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0176.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0184.html"/>
|
||||
|
|
@ -160,6 +215,27 @@
|
|||
<xmpp:version>2.0.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0199.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>2.0.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0215.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>0.7</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0223.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0234.html"/>
|
||||
|
|
@ -211,11 +287,25 @@
|
|||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0308.html"/>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0293.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0.1</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0294.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0308.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.2.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html"/>
|
||||
|
|
@ -231,6 +321,13 @@
|
|||
<xmpp:note>opt-in</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0320.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0333.html"/>
|
||||
|
|
@ -238,6 +335,20 @@
|
|||
<xmpp:version>0.3</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0338.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0339.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0352.html"/>
|
||||
|
|
@ -245,6 +356,13 @@
|
|||
<xmpp:version>0.3.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0353.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>0.3.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0357.html"/>
|
||||
|
|
@ -253,6 +371,13 @@
|
|||
<xmpp:note>Only available in the version distributed over Google Play</xmpp:note>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0363.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0368.html"/>
|
||||
|
|
@ -328,12 +453,19 @@
|
|||
<xmpp:version>0.2.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0454.html"/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>0.1.0</xmpp:version>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
|
||||
<release>
|
||||
<Version>
|
||||
<revision>2.5.8</revision>
|
||||
<created>2019-09-12</created>
|
||||
<file-release rdf:resource="https://github.com/iNPUTmice/Conversations/archive/2.5.8.tar.gz"/>
|
||||
<revision>2.9.13</revision>
|
||||
<created>2021-05-03</created>
|
||||
<file-release rdf:resource="https://github.com/iNPUTmice/Conversations/archive/2.9.13.tar.gz"/>
|
||||
</Version>
|
||||
</release>
|
||||
</Project>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
Conversations is a messenger for the next decade. Based on already established
|
||||
internet standards that have been around for over ten years Conversations isn’t
|
||||
trying to replace current commercial messengers. It will simply outlive them.
|
||||
Commercial, closed source products are coming and going. 15 years ago we had ICQ
|
||||
which was replaced by Skype. MySpace was replaced by Facebook. WhatsApp and
|
||||
Hangouts will disappear soon. Internet standards however stick around. People
|
||||
are still using IRC and e-mail even though these protocols have been around for
|
||||
decades. Utilizing proven standards doesn’t mean one can not evolve. GMail has
|
||||
revolutionized the way we look at e-mail. Firefox and Chrome have changed the
|
||||
way we use the Web. Conversations will change the way we look at instant
|
||||
messaging. Being less obtrusive than a telephone call instant messaging has
|
||||
always played an important role in modern society. Conversations will show that
|
||||
instant messaging can be fast, reliable and private. Conversations will not
|
||||
force its security and privacy aspects upon the user. For those willing to use
|
||||
encryption Conversations will make it as uncomplicated as possible. However
|
||||
Conversations is aware that end-to-end encryption by the very principle isn’t
|
||||
trivial. Instead of trying the impossible and making encryption easier than
|
||||
comparing a fingerprint Conversations will try to educate the willing user and
|
||||
explain the necessary steps and the reasons behind them. Those unwilling to
|
||||
learn about encryption will still be protected by the design principals of
|
||||
Conversations. Conversations will simply not share or generate certain
|
||||
information for example by encouraging the use of federated servers.
|
||||
Conversations will always utilize the best available standards for encryption
|
||||
and media encoding instead of reinventing the wheel. However it isn’t afraid to
|
||||
break with behavior patterns that have been proven ineffective.
|
||||
32
docs/XEPs.md
32
docs/XEPs.md
|
|
@ -1,32 +0,0 @@
|
|||
* XEP-0027: Current Jabber OpenPGP Usage
|
||||
* XEP-0030: Service Discovery
|
||||
* XEP-0045: Multi-User Chat
|
||||
* XEP-0048: Bookmarks
|
||||
* XEP-0084: User Avatar
|
||||
* XEP-0085: Chat State Notifications
|
||||
* XEP-0092: Software Version
|
||||
* XEP-0115: Entity Capabilities
|
||||
* XEP-0163: Personal Eventing Protocol (avatars and nicks)
|
||||
* XEP-0166: Jingle (only used for file transfer)
|
||||
* XEP-0172: User Nickname
|
||||
* XEP-0184: Message Delivery Receipts (reply only)
|
||||
* XEP-0191: Blocking command
|
||||
* XEP-0198: Stream Management
|
||||
* XEP-0199: XMPP Ping
|
||||
* XEP-0234: Jingle File Transfer
|
||||
* XEP-0237: Roster Versioning
|
||||
* XEP-0245: The /me Command
|
||||
* XEP-0249: Direct MUC Invitations (receiving only)
|
||||
* XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
|
||||
* XEP-0261: Jingle In-Band Bytestreams Transport Method
|
||||
* XEP-0280: Message Carbons
|
||||
* XEP-0308: Last Message Correction
|
||||
* XEP-0313: Message Archive Management
|
||||
* XEP-0319: Last User Interaction in Presence
|
||||
* XEP-0333: Chat Markers
|
||||
* XEP-0352: Client State Indication
|
||||
* XEP-0357: Push Notifications
|
||||
* XEP-0363: HTTP File Upload
|
||||
* XEP-0368: SRV records for XMPP over TLS
|
||||
* XEP-0377: Spam Reporting
|
||||
* XEP-0384: OMEMO Encryption
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
Observations on implementing XMPP
|
||||
=================================
|
||||
After spending the last two and a half month basically writing my own XMPP
|
||||
library from scratch I decided to share some of the observations I made in the
|
||||
process. In part this article can be seen as a response to a blog post made by
|
||||
Dr. Ing. Georg Lukas. The blog post introduces a couple of XEP (XMPP Extensions)
|
||||
which make the life on mobile devices a lot easier but states that they are
|
||||
currently very few implementations of those XEPs. So I went ahead and
|
||||
implemented all of them in my Android XMPP client.
|
||||
|
||||
### General observations
|
||||
The first thing I noticed is that XMPP is actually okish designed. If you were
|
||||
to design a new chat protocol today you probably wouldn’t choose XML again
|
||||
however the protocol basically consists of only three different packages which
|
||||
are quickly hidden under some sort of abstraction layer within your library.
|
||||
Getting from zero to sending messages to other users actually was very simple
|
||||
and straight forward. But then came the XEPs.
|
||||
|
||||
### Multi-User Chat
|
||||
The first one was XEP-0045 Multi-User Chat. This is the one XEP of the XEPs I’m
|
||||
going to mention in my article which is actually wildly adopted. Most clients
|
||||
and servers I know of support MUC. However the level of completeness varies.
|
||||
MUC actually introduces access and permission roles which are far more complex
|
||||
than what some of us are used to from IRC but a lot of clients just don’t
|
||||
implement them. I’m not implementing them myself (at least for now) because I
|
||||
somewhat doubt that someone would actually use them (however this might be some
|
||||
sort of chicken or egg problem). I did find some strange bugs though which might
|
||||
be interesting for other library developers. In theory a MUC server
|
||||
implementation can allow a single user (same jid) to join a conference room
|
||||
multiple times with the same nick from different clients. This means if someone
|
||||
wants to participate in a conference from two different devices (mobile and
|
||||
desktop for example) one wouldn’t have to name oneself `userDesktop` and
|
||||
`userMobile` but just `user`. Both ejabberd and prosody support this but with
|
||||
strange side effects. Prosody for example doesn’t allow a user to change its
|
||||
name once two clients are “merged” by having the same nick.
|
||||
|
||||
### Carbons and Stream Management
|
||||
Two of the other XEPs Lukas mentions — Carbons (XEP-0280) and Stream Management
|
||||
(XEP-0198) — were actually fairly easy to implement. The only challenges were to
|
||||
find a server to support them (I ended up running my own Prosody server) and a
|
||||
desktop client to test them with. For carbons there is a patched Mcabber version
|
||||
and Gajim. After implementing stream management I had very good results on my
|
||||
mobile device. I had sessions running for up to 24 hours with a walking outside,
|
||||
loosing mobile coverage for a few minutes and so on. The only limitation was
|
||||
that I had to keep on developing and reinstalling my app.
|
||||
|
||||
### Off the record
|
||||
And then came OTR... This is were I spend the most time debugging stuff and
|
||||
trying to get things right and compatible with other clients. This is the part
|
||||
were I want to help other developers not to make the same mistakes and maybe
|
||||
come to some sort of consent among XMPP developers to ultimately increase the
|
||||
interoperability. OTR has some down sides which make it difficult or at times
|
||||
even dangerous to implement within XMPP. First of all it is a synchronous
|
||||
protocol which is tunneled through a different protocol (XMPP). Synchronous
|
||||
means — among other things — auto replies. (An OTR session begins with “hi I’m
|
||||
speaking otr give me your key” “ok cool here is my key”) And auto replies — we
|
||||
know that since the first time an out of office auto responder went postal — are
|
||||
dangerous. Things really start to get messy when you use one of the best
|
||||
features of XMPP — multiple clients. The way XMPP works is that clients are
|
||||
encouraged to send their messages to the raw jid and let the server decide what
|
||||
full jid the messages are routed to. If in doubt even all of them. So what
|
||||
happens when Alice sends a start-otr-message to Bobs raw jid? Bob receives the
|
||||
message on his notebook as well as his cell phone. Both of them answer. Alice
|
||||
gets two different replies. Shit explodes. Even if Alice sends the message to
|
||||
bob/notebook chances are that Bob has carbon messages enabled and still receives
|
||||
the messages on both devices. Now assuming that Bobs client is clever enough not
|
||||
to auto reply to carbonated messages Bob/cellphone will still end up with a lot
|
||||
of garbage messages. (Essentially the entire conversation between Alice and
|
||||
Bob/notebook but unreadable of course) Therefor it should be good practice to
|
||||
tag OTR messages as both private and no-copy (private is part of the carbons
|
||||
XEP, no-copy is a general hint). I found that prosody for some reasons doesn’t
|
||||
honor the private tag on outgoing messages. While this is easily fixed I presume
|
||||
that having both the private and the no-copy tag will make it more compatible
|
||||
with servers or clients I don’t know about yet.
|
||||
|
||||
#### Rules to follow when implementing OTR
|
||||
To summarize my observations on implementing OTR in XMPP let me make the
|
||||
following three statements.
|
||||
|
||||
1. While it is good practice for unencrypted messages to be send to the raw jid
|
||||
and have the receiving server or user decide how they should be routed OTR
|
||||
messages must be send to a specific resource. To make this work the user should
|
||||
be given the option to select the presence (which can be assisted with some
|
||||
educated guessing by the client based on previous messages). Furthermore a
|
||||
client should encourage a user to choose meaningful presences instead of the
|
||||
clients name or even random ones. Something like `/mobile`, `/notebook`,
|
||||
`/desktop` is a greater assist to any one who wants to start an otr session then
|
||||
`/Gajim`, `/mcabber` or `/pidgin`.
|
||||
|
||||
2. Messages should be tagged private and no-copy to avoid unnecessary traffic or
|
||||
otr error loops with faulty clients. This tagging should be done even if your
|
||||
own client doesn’t support carbons.
|
||||
|
||||
3. When dealing with “legacy clients” — meaning clients which don’t follow my
|
||||
advise — a client should be extra careful not to create message loops. This
|
||||
means to not respond with otr errors if a client is not 100% sure it is the only
|
||||
client which received the message
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
org.gradle.jvmargs=-Xmx4096m
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#Thu Mar 19 11:51:26 CET 2020
|
||||
#Sat Nov 14 09:59:55 CET 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
/build
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
apply plugin: 'java-library'
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'rocks.xmpp:precis:1.0.0'
|
||||
}
|
||||
|
||||
sourceCompatibility = "8"
|
||||
targetCompatibility = "8"
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2017 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.addr;
|
||||
|
||||
import java.text.Collator;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Abstract Jid implementation for both full and bare JIDs.
|
||||
*
|
||||
* @author Christian Schudt
|
||||
*/
|
||||
abstract class AbstractJid implements Jid {
|
||||
|
||||
/**
|
||||
* Checks if the JID is a full JID.
|
||||
* <blockquote>
|
||||
* <p>The term "full JID" refers to an XMPP address of the form <localpart@domainpart/resourcepart> (for a particular authorized client or device associated with an account) or of the form <domainpart/resourcepart> (for a particular resource or script associated with a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return True, if the JID is a full JID; otherwise false.
|
||||
*/
|
||||
@Override
|
||||
public final boolean isFullJid() {
|
||||
return getResource() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the JID is a bare JID.
|
||||
* <blockquote>
|
||||
* <p>The term "bare JID" refers to an XMPP address of the form <localpart@domainpart> (for an account at a server) or of the form <domainpart> (for a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return True, if the JID is a bare JID; otherwise false.
|
||||
*/
|
||||
@Override
|
||||
public final boolean isBareJid() {
|
||||
return getResource() == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isDomainJid() {
|
||||
return getLocal() == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof Jid)) {
|
||||
return false;
|
||||
}
|
||||
Jid other = (Jid) o;
|
||||
|
||||
return (getLocal() == other.getLocal() || getLocal() != null && getLocal().equals(other.getLocal()))
|
||||
&& (getDomain() == other.getDomain() || getDomain() != null && getDomain().equals(other.getDomain()))
|
||||
&& (getResource() == other.getResource() || getResource() != null && getResource().equals(other.getResource()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return Arrays.hashCode(new String[]{getLocal(), getDomain(), getResource()});
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this JID with another JID. First domain parts are compared. If these are equal, local parts are compared
|
||||
* and if these are equal, too, resource parts are compared.
|
||||
*
|
||||
* @param o The other JID.
|
||||
* @return The comparison result.
|
||||
*/
|
||||
@Override
|
||||
public final int compareTo(Jid o) {
|
||||
|
||||
if (this == o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (o != null) {
|
||||
final Collator collator = Collator.getInstance();
|
||||
int result;
|
||||
// First compare domain parts.
|
||||
if (getDomain() != null) {
|
||||
result = o.getDomain() != null ? collator.compare(getDomain(), o.getDomain()) : -1;
|
||||
} else {
|
||||
result = o.getDomain() != null ? 1 : 0;
|
||||
}
|
||||
// If the domains are equal, compare local parts.
|
||||
if (result == 0) {
|
||||
if (getLocal() != null) {
|
||||
// If this local part is not null, but the other is null, move this down (1).
|
||||
result = o.getLocal() != null ? collator.compare(getLocal(), o.getLocal()) : 1;
|
||||
} else {
|
||||
// If this local part is null, but the other is not, move this up (-1).
|
||||
result = o.getLocal() != null ? -1 : 0;
|
||||
}
|
||||
}
|
||||
// If the local parts are equal, compare resource parts.
|
||||
if (result == 0) {
|
||||
if (getResource() != null) {
|
||||
// If this resource part is not null, but the other is null, move this down (1).
|
||||
return o.getResource() != null ? collator.compare(getResource(), o.getResource()) : 1;
|
||||
} else {
|
||||
// If this resource part is null, but the other is not, move this up (-1).
|
||||
return o.getResource() != null ? -1 : 0;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int length() {
|
||||
return toString().length();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final char charAt(int index) {
|
||||
return toString().charAt(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final CharSequence subSequence(int start, int end) {
|
||||
return toString().subSequence(start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JID in its string representation, i.e. [ localpart "@" ] domainpart [ "/" resourcepart ].
|
||||
*
|
||||
* @return The JID.
|
||||
* @see #toEscapedString()
|
||||
*/
|
||||
@Override
|
||||
public final String toString() {
|
||||
return toString(getLocal(), getDomain(), getResource());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toEscapedString() {
|
||||
return toString(getEscapedLocal(), getDomain(), getResource());
|
||||
}
|
||||
|
||||
static String toString(String local, String domain, String resource) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (local != null) {
|
||||
sb.append(local).append('@');
|
||||
}
|
||||
sb.append(domain);
|
||||
if (resource != null) {
|
||||
sb.append('/').append(resource);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,498 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2017 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.addr;
|
||||
|
||||
import rocks.xmpp.precis.PrecisProfile;
|
||||
import rocks.xmpp.precis.PrecisProfiles;
|
||||
import rocks.xmpp.util.cache.LruCache;
|
||||
|
||||
import java.net.IDN;
|
||||
import java.nio.charset.Charset;
|
||||
import java.text.Normalizer;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* The implementation of the JID as described in <a href="https://tools.ietf.org/html/rfc7622">Extensible Messaging and Presence Protocol (XMPP): Address Format</a>.
|
||||
* <p>
|
||||
* This class is thread-safe and immutable.
|
||||
*
|
||||
* @author Christian Schudt
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7622">RFC 7622 - Extensible Messaging and Presence Protocol (XMPP): Address Format</a>
|
||||
*/
|
||||
final class FullJid extends AbstractJid {
|
||||
|
||||
/**
|
||||
* Escapes all disallowed characters and also backslash, when followed by a defined hex code for escaping. See 4. Business Rules.
|
||||
*/
|
||||
private static final Pattern ESCAPE_PATTERN = Pattern.compile("[ \"&'/:<>@]|\\\\(?=20|22|26|27|2f|3a|3c|3e|40|5c)");
|
||||
|
||||
private static final Pattern UNESCAPE_PATTERN = Pattern.compile("\\\\(20|22|26|27|2f|3a|3c|3e|40|5c)");
|
||||
|
||||
private static final Pattern JID = Pattern.compile("^((.*?)@)?([^/@]+)(/(.*))?$");
|
||||
|
||||
private static final IDNProfile IDN_PROFILE = new IDNProfile();
|
||||
|
||||
/**
|
||||
* Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic full stop).
|
||||
*/
|
||||
private static final String DOTS = "[.\u3002\uFF0E\uFF61]";
|
||||
|
||||
/**
|
||||
* Label separators for domain labels, which should be mapped to "." (dot): IDEOGRAPHIC FULL STOP character (U+3002)
|
||||
*/
|
||||
private static final Pattern LABEL_SEPARATOR = Pattern.compile(DOTS);
|
||||
|
||||
private static final Pattern LABEL_SEPARATOR_FINAL = Pattern.compile(DOTS + "$");
|
||||
|
||||
/**
|
||||
* Caches the escaped JIDs.
|
||||
*/
|
||||
private static final Map<CharSequence, Jid> ESCAPED_CACHE = new LruCache<>(5000);
|
||||
|
||||
/**
|
||||
* Caches the unescaped JIDs.
|
||||
*/
|
||||
private static final Map<CharSequence, Jid> UNESCAPED_CACHE = new LruCache<>(5000);
|
||||
|
||||
private static final long serialVersionUID = -3824234106101731424L;
|
||||
|
||||
private final String escapedLocal;
|
||||
|
||||
private final String local;
|
||||
|
||||
private final String domain;
|
||||
|
||||
private final String resource;
|
||||
|
||||
private final Jid bareJid;
|
||||
|
||||
/**
|
||||
* Creates a full JID with local, domain and resource part.
|
||||
*
|
||||
* @param local The local part.
|
||||
* @param domain The domain part.
|
||||
* @param resource The resource part.
|
||||
*/
|
||||
FullJid(CharSequence local, CharSequence domain, CharSequence resource) {
|
||||
this(local, domain, resource, false, null);
|
||||
}
|
||||
|
||||
private FullJid(final CharSequence local, final CharSequence domain, final CharSequence resource, final boolean doUnescape, Jid bareJid) {
|
||||
final String enforcedLocalPart;
|
||||
final String enforcedDomainPart;
|
||||
final String enforcedResource;
|
||||
|
||||
final String unescapedLocalPart;
|
||||
|
||||
if (domain == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
if (doUnescape) {
|
||||
unescapedLocalPart = unescape(local);
|
||||
} else {
|
||||
unescapedLocalPart = local != null ? local.toString() : null;
|
||||
}
|
||||
|
||||
// Escape the local part, so that disallowed characters like the space characters pass the UsernameCaseMapped profile.
|
||||
final String escapedLocalPart = escape(unescapedLocalPart);
|
||||
|
||||
// If the domainpart includes a final character considered to be a label
|
||||
// separator (dot) by [RFC1034], this character MUST be stripped from
|
||||
// the domainpart before the JID of which it is a part is used for the
|
||||
// purpose of routing an XML stanza, comparing against another JID, or
|
||||
// constructing an XMPP URI or IRI [RFC5122]. In particular, such a
|
||||
// character MUST be stripped before any other canonicalization steps
|
||||
// are taken.
|
||||
// Also validate, that the domain name can be converted to ASCII, i.e. validate the domain name (e.g. must not start with "_").
|
||||
final String strDomain = IDN.toASCII(LABEL_SEPARATOR_FINAL.matcher(domain).replaceAll(""), IDN.USE_STD3_ASCII_RULES);
|
||||
enforcedLocalPart = escapedLocalPart != null ? PrecisProfiles.USERNAME_CASE_MAPPED.enforce(escapedLocalPart) : null;
|
||||
enforcedResource = resource != null ? PrecisProfiles.OPAQUE_STRING.enforce(resource) : null;
|
||||
// See https://tools.ietf.org/html/rfc5895#section-2
|
||||
enforcedDomainPart = IDN_PROFILE.enforce(strDomain);
|
||||
|
||||
validateLength(enforcedLocalPart, "local");
|
||||
validateLength(enforcedResource, "resource");
|
||||
validateDomain(strDomain);
|
||||
|
||||
this.local = unescape(enforcedLocalPart);
|
||||
this.escapedLocal = enforcedLocalPart;
|
||||
this.domain = enforcedDomainPart;
|
||||
this.resource = enforcedResource;
|
||||
if (bareJid != null) {
|
||||
this.bareJid = bareJid;
|
||||
} else {
|
||||
this.bareJid = isBareJid() ? this : new AbstractJid() {
|
||||
|
||||
@Override
|
||||
public Jid asBareJid() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid withLocal(CharSequence local) {
|
||||
if (local == this.getLocal() || local != null && local.equals(this.getLocal())) {
|
||||
return this;
|
||||
}
|
||||
return new FullJid(local, getDomain(), getResource(), false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid withResource(CharSequence resource) {
|
||||
if (resource == this.getResource() || resource != null && resource.equals(this.getResource())) {
|
||||
return this;
|
||||
}
|
||||
return new FullJid(getLocal(), getDomain(), resource, false, asBareJid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid atSubdomain(CharSequence subdomain) {
|
||||
if (subdomain == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
return new FullJid(getLocal(), subdomain + "." + getDomain(), getResource(), false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocal() {
|
||||
return FullJid.this.getLocal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEscapedLocal() {
|
||||
return FullJid.this.getEscapedLocal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomain() {
|
||||
return FullJid.this.getDomain();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResource() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JID from a string. The format must be
|
||||
* <blockquote><p>[ localpart "@" ] domainpart [ "/" resourcepart ]</p></blockquote>
|
||||
*
|
||||
* @param jid The JID.
|
||||
* @param doUnescape If the jid parameter will be unescaped.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the jid is null.
|
||||
* @throws IllegalArgumentException If the jid could not be parsed or is not valid.
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>
|
||||
*/
|
||||
static Jid of(String jid, final boolean doUnescape) {
|
||||
if (jid == null) {
|
||||
throw new NullPointerException("jid must not be null.");
|
||||
}
|
||||
|
||||
jid = jid.trim();
|
||||
|
||||
if (jid.isEmpty()) {
|
||||
throw new IllegalArgumentException("jid must not be empty.");
|
||||
}
|
||||
|
||||
Jid result;
|
||||
if (doUnescape) {
|
||||
result = UNESCAPED_CACHE.get(jid);
|
||||
} else {
|
||||
result = ESCAPED_CACHE.get(jid);
|
||||
}
|
||||
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Matcher matcher = JID.matcher(jid);
|
||||
if (matcher.matches()) {
|
||||
Jid jidValue = new FullJid(matcher.group(2), matcher.group(3), matcher.group(5), doUnescape, null);
|
||||
if (doUnescape) {
|
||||
UNESCAPED_CACHE.put(jid, jidValue);
|
||||
} else {
|
||||
ESCAPED_CACHE.put(jid, jidValue);
|
||||
}
|
||||
return jidValue;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Could not parse JID: " + jid);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a local part. The characters {@code "&'/:<>@} (+ whitespace) are replaced with their respective escape characters.
|
||||
*
|
||||
* @param localPart The local part.
|
||||
* @return The escaped local part or null.
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>
|
||||
*/
|
||||
private static String escape(final CharSequence localPart) {
|
||||
if (localPart != null) {
|
||||
final Matcher matcher = ESCAPE_PATTERN.matcher(localPart);
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
while (matcher.find()) {
|
||||
matcher.appendReplacement(sb, "\\\\" + Integer.toHexString(matcher.group().charAt(0)));
|
||||
}
|
||||
matcher.appendTail(sb);
|
||||
return sb.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String unescape(final CharSequence localPart) {
|
||||
if (localPart != null) {
|
||||
final Matcher matcher = UNESCAPE_PATTERN.matcher(localPart);
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
while (matcher.find()) {
|
||||
final char c = (char) Integer.parseInt(matcher.group(1), 16);
|
||||
if (c == '\\') {
|
||||
matcher.appendReplacement(sb, "\\\\");
|
||||
} else {
|
||||
matcher.appendReplacement(sb, String.valueOf(c));
|
||||
}
|
||||
}
|
||||
matcher.appendTail(sb);
|
||||
return sb.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void validateDomain(String domain) {
|
||||
if (domain == null) {
|
||||
throw new NullPointerException("domain must not be null.");
|
||||
}
|
||||
if (domain.contains("@")) {
|
||||
// Prevent misuse of API.
|
||||
throw new IllegalArgumentException("domain must not contain a '@' sign");
|
||||
}
|
||||
validateLength(domain, "domain");
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates that the length of a local, domain or resource part is not longer than 1023 characters.
|
||||
*
|
||||
* @param value The value.
|
||||
* @param part The part, only used to produce an exception message.
|
||||
*/
|
||||
private static void validateLength(CharSequence value, CharSequence part) {
|
||||
if (value != null) {
|
||||
if (value.length() == 0) {
|
||||
throw new IllegalArgumentException(part + " must not be empty.");
|
||||
}
|
||||
if (value.toString().getBytes(Charset.forName("UTF-8")).length > 1023) {
|
||||
throw new IllegalArgumentException(part + " must not be greater than 1023 bytes.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts this JID into a bare JID, i.e. removes the resource part.
|
||||
* <blockquote>
|
||||
* <p>The term "bare JID" refers to an XMPP address of the form <localpart@domainpart> (for an account at a server) or of the form <domainpart> (for a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The bare JID.
|
||||
* @see #withResource(CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public final Jid asBareJid() {
|
||||
return bareJid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the local part of the JID, also known as the name or node.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.3">3.3. Localpart</a></cite></p>
|
||||
* <p>The localpart of a JID is an optional identifier placed before the
|
||||
* domainpart and separated from the latter by the '@' character.
|
||||
* Typically, a localpart uniquely identifies the entity requesting and
|
||||
* using network access provided by a server (i.e., a local account),
|
||||
* although it can also represent other kinds of entities (e.g., a
|
||||
* chatroom associated with a multi-user chat service [XEP-0045]). The
|
||||
* entity represented by an XMPP localpart is addressed within the
|
||||
* context of a specific domain (i.e., <localpart@domainpart>).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The local part or null.
|
||||
*/
|
||||
@Override
|
||||
public final String getLocal() {
|
||||
return local;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getEscapedLocal() {
|
||||
return escapedLocal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the domain part.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.2">3.2. Domainpart</a></cite></p>
|
||||
* <p>The domainpart is the primary identifier and is the only REQUIRED
|
||||
* element of a JID (a mere domainpart is a valid JID). Typically,
|
||||
* a domainpart identifies the "home" server to which clients connect
|
||||
* for XML routing and data management functionality.</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The domain part.
|
||||
*/
|
||||
@Override
|
||||
public final String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the resource part.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.4">3.4. Resourcepart</a></cite></p>
|
||||
* <p>The resourcepart of a JID is an optional identifier placed after the
|
||||
* domainpart and separated from the latter by the '/' character. A
|
||||
* resourcepart can modify either a <localpart@domainpart> address or a
|
||||
* mere <domainpart> address. Typically, a resourcepart uniquely
|
||||
* identifies a specific connection (e.g., a device or location) or
|
||||
* object (e.g., an occupant in a multi-user chatroom [XEP-0045])
|
||||
* belonging to the entity associated with an XMPP localpart at a domain
|
||||
* (i.e., <localpart@domainpart/resourcepart>).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The resource part or null.
|
||||
*/
|
||||
@Override
|
||||
public final String getResource() {
|
||||
return resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new JID with a new local part and the same domain and resource part of the current JID.
|
||||
*
|
||||
* @param local The local part.
|
||||
* @return The JID with a new local part.
|
||||
* @throws IllegalArgumentException If the local is not a valid local part.
|
||||
* @see #withResource(CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public final Jid withLocal(CharSequence local) {
|
||||
if (local == this.getLocal() || local != null && local.equals(this.getLocal())) {
|
||||
return this;
|
||||
}
|
||||
return new FullJid(local, getDomain(), getResource(), false, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new full JID with a resource and the same local and domain part of the current JID.
|
||||
*
|
||||
* @param resource The resource.
|
||||
* @return The full JID with a resource.
|
||||
* @throws IllegalArgumentException If the resource is not a valid resource part.
|
||||
* @see #asBareJid()
|
||||
* @see #withLocal(CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public final Jid withResource(CharSequence resource) {
|
||||
if (resource == this.getResource() || resource != null && resource.equals(this.getResource())) {
|
||||
return this;
|
||||
}
|
||||
return new FullJid(getLocal(), getDomain(), resource, false, asBareJid());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new JID at a subdomain and at the same domain as this JID.
|
||||
*
|
||||
* @param subdomain The subdomain.
|
||||
* @return The JID at a subdomain.
|
||||
* @throws NullPointerException If subdomain is null.
|
||||
* @throws IllegalArgumentException If subdomain is not a valid subdomain name.
|
||||
*/
|
||||
@Override
|
||||
public final Jid atSubdomain(CharSequence subdomain) {
|
||||
if (subdomain != null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
return new FullJid(getLocal(), subdomain + "." + getDomain(), getResource(), false, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* A profile for applying the rules for IDN as in RFC 5895. Although IDN doesn't use Precis, it's still very similar so that we can use the base class.
|
||||
*
|
||||
* @see <a href="https://tools.ietf.org/html/rfc5895#section-2">RFC 5895</a>
|
||||
*/
|
||||
private static final class IDNProfile extends PrecisProfile {
|
||||
|
||||
private IDNProfile() {
|
||||
super(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String prepare(CharSequence input) {
|
||||
return IDN.toUnicode(input.toString(), IDN.USE_STD3_ASCII_RULES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String enforce(CharSequence input) {
|
||||
// 4. Map IDEOGRAPHIC FULL STOP character (U+3002) to dot.
|
||||
return applyAdditionalMappingRule(
|
||||
// 3. All characters are mapped using Unicode Normalization Form C (NFC).
|
||||
applyNormalizationRule(
|
||||
// 2. Fullwidth and halfwidth characters (those defined with
|
||||
// Decomposition Types <wide> and <narrow>) are mapped to their
|
||||
// decomposition mappings
|
||||
applyWidthMappingRule(
|
||||
// 1. Uppercase characters are mapped to their lowercase equivalents
|
||||
applyCaseMappingRule(prepare(input))))).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence applyWidthMappingRule(CharSequence charSequence) {
|
||||
return widthMap(charSequence);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence applyAdditionalMappingRule(CharSequence charSequence) {
|
||||
return LABEL_SEPARATOR.matcher(charSequence).replaceAll(".");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence applyCaseMappingRule(CharSequence charSequence) {
|
||||
return charSequence.toString().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence applyNormalizationRule(CharSequence charSequence) {
|
||||
return Normalizer.normalize(charSequence, Normalizer.Form.NFC);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence applyDirectionalityRule(CharSequence charSequence) {
|
||||
return charSequence;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,313 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2017 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.addr;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Represents the JID as described in <a href="https://tools.ietf.org/html/rfc7622">Extensible Messaging and Presence Protocol (XMPP): Address Format</a>.
|
||||
* <p>
|
||||
* A JID consists of three parts:
|
||||
* <p>
|
||||
* [ localpart "@" ] domainpart [ "/" resourcepart ]
|
||||
* </p>
|
||||
* The easiest way to create a JID is to use the {@link #of(CharSequence)} method:
|
||||
* ```java
|
||||
* Jid jid = Jid.of("juliet@capulet.lit/balcony");
|
||||
* ```
|
||||
* You can then get the parts from it via the respective methods:
|
||||
* ```java
|
||||
* String local = jid.getLocal(); // juliet
|
||||
* String domain = jid.getDomain(); // capulet.lit
|
||||
* String resource = jid.getResource(); // balcony
|
||||
* ```
|
||||
* Implementations of this interface should override <code>equals()</code> and <code>hashCode()</code>, so that different instances with the same value are equal:
|
||||
* ```java
|
||||
* Jid.of("romeo@capulet.lit/balcony").equals(Jid.of("romeo@capulet.lit/balcony")); // true
|
||||
* ```
|
||||
* The default implementation of this class also supports <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>, i.e.
|
||||
* ```java
|
||||
* Jid.of("d'artagnan@musketeers.lit")
|
||||
* ```
|
||||
* is escaped as <code>d\\27artagnan@musketeers.lit</code>.
|
||||
* <p>
|
||||
* Implementations of this interface should be thread-safe and immutable.
|
||||
*
|
||||
* @author Christian Schudt
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7622">RFC 7622 - Extensible Messaging and Presence Protocol (XMPP): Address Format</a>
|
||||
*/
|
||||
public interface Jid extends Comparable<Jid>, Serializable, CharSequence {
|
||||
|
||||
/**
|
||||
* The maximal length of a full JID, which is 3071.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.1">3.1. Fundamentals</a></cite></p>
|
||||
* <p>Each allowable portion of a JID (localpart, domainpart, and
|
||||
* resourcepart) is 1 to 1023 octets in length, resulting in a maximum
|
||||
* total size (including the '@' and '/' separators) of 3071 octets.
|
||||
* </p>
|
||||
* </blockquote>
|
||||
* Note that the length is based on bytes, not characters.
|
||||
*
|
||||
* @see #MAX_BARE_JID_LENGTH
|
||||
*/
|
||||
int MAX_FULL_JID_LENGTH = 3071;
|
||||
|
||||
/**
|
||||
* The maximal length of a bare JID, which is 2047 (1023 + 1 + 1023).
|
||||
* Note that the length is based on bytes, not characters.
|
||||
*
|
||||
* @see #MAX_FULL_JID_LENGTH
|
||||
*/
|
||||
int MAX_BARE_JID_LENGTH = 2047;
|
||||
|
||||
/**
|
||||
* The service discovery feature used for determining support of JID escaping (<code>jid\20escaping</code>).
|
||||
*/
|
||||
String ESCAPING_FEATURE = "jid\\20escaping";
|
||||
|
||||
/**
|
||||
* Returns a full JID with a domain and resource part, e.g. <code>capulet.com/balcony</code>
|
||||
*
|
||||
* @param local The local part.
|
||||
* @param domain The domain.
|
||||
* @param resource The resource part.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the domain is null.
|
||||
* @throws IllegalArgumentException If the domain, local or resource part are not valid.
|
||||
*/
|
||||
static Jid of(CharSequence local, CharSequence domain, CharSequence resource) {
|
||||
return new FullJid(local, domain, resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a bare JID with only the domain part, e.g. <code>capulet.com</code>
|
||||
*
|
||||
* @param domain The domain.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the domain is null.
|
||||
* @throws IllegalArgumentException If the domain or local part are not valid.
|
||||
*/
|
||||
static Jid ofDomain(CharSequence domain) {
|
||||
return new FullJid(null, domain, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a bare JID with a local and domain part, e.g. <code>juliet@capulet.com</code>
|
||||
*
|
||||
* @param local The local part.
|
||||
* @param domain The domain.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the domain is null.
|
||||
* @throws IllegalArgumentException If the domain or local part are not valid.
|
||||
*/
|
||||
static Jid ofLocalAndDomain(CharSequence local, CharSequence domain) {
|
||||
return new FullJid(local, domain, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a full JID with a domain and resource part, e.g. <code>capulet.com/balcony</code>
|
||||
*
|
||||
* @param domain The domain.
|
||||
* @param resource The resource part.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the domain is null.
|
||||
* @throws IllegalArgumentException If the domain or resource are not valid.
|
||||
*/
|
||||
static Jid ofDomainAndResource(CharSequence domain, CharSequence resource) {
|
||||
return new FullJid(null, domain, resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JID from an unescaped string. The format must be
|
||||
* <blockquote><p>[ localpart "@" ] domainpart [ "/" resourcepart ]</p></blockquote>
|
||||
* The input string will be escaped.
|
||||
*
|
||||
* @param jid The JID.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the jid is null.
|
||||
* @throws IllegalArgumentException If the jid could not be parsed or is not valid.
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>
|
||||
*/
|
||||
static Jid of(CharSequence jid) {
|
||||
if (jid instanceof Jid) {
|
||||
return (Jid) jid;
|
||||
}
|
||||
return FullJid.of(jid.toString(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JID from a escaped JID string. The format must be
|
||||
* <blockquote><p>[ localpart "@" ] domainpart [ "/" resourcepart ]</p></blockquote>
|
||||
* This method should be used, when parsing JIDs from the XMPP stream.
|
||||
*
|
||||
* @param jid The JID.
|
||||
* @return The JID.
|
||||
* @throws NullPointerException If the jid is null.
|
||||
* @throws IllegalArgumentException If the jid could not be parsed or is not valid.
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>
|
||||
*/
|
||||
static Jid ofEscaped(CharSequence jid) {
|
||||
return FullJid.of(jid.toString(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the JID is a full JID.
|
||||
* <blockquote>
|
||||
* <p>The term "full JID" refers to an XMPP address of the form <localpart@domainpart/resourcepart> (for a particular authorized client or device associated with an account) or of the form <domainpart/resourcepart> (for a particular resource or script associated with a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return True, if the JID is a full JID; otherwise false.
|
||||
*/
|
||||
boolean isFullJid();
|
||||
|
||||
/**
|
||||
* Checks if the JID is a bare JID.
|
||||
* <blockquote>
|
||||
* <p>The term "bare JID" refers to an XMPP address of the form <localpart@domainpart> (for an account at a server) or of the form <domainpart> (for a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return True, if the JID is a bare JID; otherwise false.
|
||||
*/
|
||||
boolean isBareJid();
|
||||
|
||||
/**
|
||||
* Checks if the JID is a domain JID, i.e. if it has no local part.
|
||||
*
|
||||
* @return True, if the JID is a domain JID, i.e. if it has no local part.
|
||||
*/
|
||||
boolean isDomainJid();
|
||||
|
||||
/**
|
||||
* Gets the bare JID representation of this JID, i.e. removes the resource part.
|
||||
* <blockquote>
|
||||
* <p>The term "bare JID" refers to an XMPP address of the form <localpart@domainpart> (for an account at a server) or of the form <domainpart> (for a server).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The bare JID.
|
||||
* @see #withResource(CharSequence)
|
||||
*/
|
||||
Jid asBareJid();
|
||||
|
||||
/**
|
||||
* Creates a new JID with a new local part and the same domain and resource part of the current JID.
|
||||
*
|
||||
* @param local The local part.
|
||||
* @return The JID with a new local part.
|
||||
* @throws IllegalArgumentException If the local is not a valid local part.
|
||||
* @see #withResource(CharSequence)
|
||||
*/
|
||||
Jid withLocal(CharSequence local);
|
||||
|
||||
/**
|
||||
* Creates a new full JID with a resource and the same local and domain part of the current JID.
|
||||
*
|
||||
* @param resource The resource.
|
||||
* @return The full JID with a resource.
|
||||
* @throws IllegalArgumentException If the resource is not a valid resource part.
|
||||
* @see #asBareJid()
|
||||
* @see #withLocal(CharSequence)
|
||||
*/
|
||||
Jid withResource(CharSequence resource);
|
||||
|
||||
/**
|
||||
* Creates a new JID at a subdomain and at the same domain as this JID.
|
||||
*
|
||||
* @param subdomain The subdomain.
|
||||
* @return The JID at a subdomain.
|
||||
* @throws NullPointerException If subdomain is null.
|
||||
* @throws IllegalArgumentException If subdomain is not a valid subdomain name.
|
||||
*/
|
||||
Jid atSubdomain(CharSequence subdomain);
|
||||
|
||||
/**
|
||||
* Gets the local part of the JID, also known as the name or node.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.3">3.3. Localpart</a></cite></p>
|
||||
* <p>The localpart of a JID is an optional identifier placed before the
|
||||
* domainpart and separated from the latter by the '@' character.
|
||||
* Typically, a localpart uniquely identifies the entity requesting and
|
||||
* using network access provided by a server (i.e., a local account),
|
||||
* although it can also represent other kinds of entities (e.g., a
|
||||
* chatroom associated with a multi-user chat service [XEP-0045]). The
|
||||
* entity represented by an XMPP localpart is addressed within the
|
||||
* context of a specific domain (i.e., <localpart@domainpart>).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The local part or null.
|
||||
* @see #getEscapedLocal()
|
||||
*/
|
||||
String getLocal();
|
||||
|
||||
/**
|
||||
* Gets the escaped local part of the JID.
|
||||
*
|
||||
* @return The escaped local part or null.
|
||||
* @see #getLocal()
|
||||
* @since 0.8.0
|
||||
*/
|
||||
String getEscapedLocal();
|
||||
|
||||
/**
|
||||
* Gets the domain part.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.2">3.2. Domainpart</a></cite></p>
|
||||
* <p>The domainpart is the primary identifier and is the only REQUIRED
|
||||
* element of a JID (a mere domainpart is a valid JID). Typically,
|
||||
* a domainpart identifies the "home" server to which clients connect
|
||||
* for XML routing and data management functionality.</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The domain part.
|
||||
*/
|
||||
String getDomain();
|
||||
|
||||
/**
|
||||
* Gets the resource part.
|
||||
* <blockquote>
|
||||
* <p><cite><a href="https://tools.ietf.org/html/rfc7622#section-3.4">3.4. Resourcepart</a></cite></p>
|
||||
* <p>The resourcepart of a JID is an optional identifier placed after the
|
||||
* domainpart and separated from the latter by the '/' character. A
|
||||
* resourcepart can modify either a <localpart@domainpart> address or a
|
||||
* mere <domainpart> address. Typically, a resourcepart uniquely
|
||||
* identifies a specific connection (e.g., a device or location) or
|
||||
* object (e.g., an occupant in a multi-user chatroom [XEP-0045])
|
||||
* belonging to the entity associated with an XMPP localpart at a domain
|
||||
* (i.e., <localpart@domainpart/resourcepart>).</p>
|
||||
* </blockquote>
|
||||
*
|
||||
* @return The resource part or null.
|
||||
*/
|
||||
String getResource();
|
||||
|
||||
/**
|
||||
* Returns the JID in escaped form as described in <a href="https://xmpp.org/extensions/xep-0106.html">XEP-0106: JID Escaping</a>.
|
||||
*
|
||||
* @return The escaped JID.
|
||||
* @see #toString()
|
||||
*/
|
||||
String toEscapedString();
|
||||
}
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2017 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.addr;
|
||||
|
||||
/**
|
||||
* Represents a malformed JID in order to handle the <code>jid-malformed</code> error.
|
||||
* <p>
|
||||
* This class is not intended to be publicly instantiable, but is used for malformed JIDs during parsing automatically.
|
||||
*
|
||||
* @author Christian Schudt
|
||||
* @see <a href="https://xmpp.org/rfcs/rfc6120.html#stanzas-error-conditions-jid-malformed">RFC 6120, 8.3.3.8. jid-malformed</a>
|
||||
*/
|
||||
public final class MalformedJid extends AbstractJid {
|
||||
|
||||
private static final long serialVersionUID = -2896737611021417985L;
|
||||
|
||||
private final String localPart;
|
||||
|
||||
private final String domainPart;
|
||||
|
||||
private final String resourcePart;
|
||||
|
||||
private final Throwable cause;
|
||||
|
||||
static MalformedJid of(final String jid, final Throwable cause) {
|
||||
// Do some basic parsing without any further checks or validation.
|
||||
final StringBuilder sb = new StringBuilder(jid);
|
||||
// 1. Remove any portion from the first '/' character to the end of the
|
||||
// string (if there is a '/' character present).
|
||||
final int indexOfResourceDelimiter = jid.indexOf('/');
|
||||
final String resourcePart;
|
||||
if (indexOfResourceDelimiter > -1) {
|
||||
resourcePart = sb.substring(indexOfResourceDelimiter + 1);
|
||||
sb.delete(indexOfResourceDelimiter, sb.length());
|
||||
} else {
|
||||
resourcePart = null;
|
||||
}
|
||||
// 2. Remove any portion from the beginning of the string to the first
|
||||
// '@' character (if there is an '@' character present).
|
||||
final int indexOfAt = jid.indexOf('@');
|
||||
final String localPart;
|
||||
if (indexOfAt > -1) {
|
||||
localPart = sb.substring(0, indexOfAt);
|
||||
sb.delete(0, indexOfAt + 1);
|
||||
} else {
|
||||
localPart = null;
|
||||
}
|
||||
return new MalformedJid(localPart, sb.toString(), resourcePart, cause);
|
||||
}
|
||||
|
||||
private MalformedJid(final String localPart, final String domainPart, final String resourcePart, final Throwable cause) {
|
||||
this.localPart = localPart;
|
||||
this.domainPart = domainPart;
|
||||
this.resourcePart = resourcePart;
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Jid asBareJid() {
|
||||
return new MalformedJid(localPart, domainPart, null, cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid withLocal(CharSequence local) {
|
||||
return new MalformedJid(local.toString(), domainPart, resourcePart, cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid withResource(CharSequence resource) {
|
||||
return new MalformedJid(localPart, domainPart, resource.toString(), cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Jid atSubdomain(CharSequence subdomain) {
|
||||
if (subdomain == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
return new MalformedJid(localPart, subdomain + "." + domainPart, resourcePart, cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getLocal() {
|
||||
return localPart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getEscapedLocal() {
|
||||
return localPart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getDomain() {
|
||||
return domainPart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getResource() {
|
||||
return resourcePart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the cause why the JID is malformed.
|
||||
*
|
||||
* @return The cause.
|
||||
*/
|
||||
public final Throwable getCause() {
|
||||
return cause;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Provides classes for the <a href="https://tools.ietf.org/html/rfc7622">XMPP Address Format</a> (JID).
|
||||
*
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7622">Extensible Messaging and Presence Protocol (XMPP): Address Format</a>
|
||||
*/
|
||||
package rocks.xmpp.addr;
|
||||
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.util.cache;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* A simple directory based cache for caching of persistent items like avatars or entity capabilities.
|
||||
*
|
||||
* @author Christian Schudt
|
||||
*/
|
||||
public final class DirectoryCache implements Map<String, byte[]> {
|
||||
|
||||
private final Path cacheDirectory;
|
||||
|
||||
public DirectoryCache(Path cacheDirectory) {
|
||||
this.cacheDirectory = cacheDirectory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int size() {
|
||||
try (final Stream<Path> files = cacheContent()) {
|
||||
return (int) Math.min(files.count(), Integer.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isEmpty() {
|
||||
try (final Stream<Path> files = cacheContent()) {
|
||||
return files.findAny().map(file -> Boolean.FALSE).orElse(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean containsKey(Object key) {
|
||||
return Files.exists(cacheDirectory.resolve(key.toString()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean containsValue(Object value) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte[] get(final Object key) {
|
||||
return Optional.ofNullable(key).map(Object::toString).filter(((Predicate<String>) String::isEmpty).negate()).map(cacheDirectory::resolve).filter(Files::isReadable).map(file -> {
|
||||
try {
|
||||
return Files.readAllBytes(file);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}).orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte[] put(String key, byte[] value) {
|
||||
// Make sure the directory exists.
|
||||
byte[] data = get(key);
|
||||
if (!Arrays.equals(data, value))
|
||||
try {
|
||||
if (Files.notExists(cacheDirectory)) {
|
||||
Files.createDirectories(cacheDirectory);
|
||||
}
|
||||
Path file = cacheDirectory.resolve(key);
|
||||
Files.write(file, value);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final byte[] remove(Object key) {
|
||||
byte[] data = get(key);
|
||||
try {
|
||||
Files.deleteIfExists(cacheDirectory.resolve(key.toString()));
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void putAll(Map<? extends String, ? extends byte[]> m) {
|
||||
m.forEach(this::put);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void clear() {
|
||||
try {
|
||||
Files.walkFileTree(cacheDirectory, new SimpleFileVisitor<Path>() {
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||
Files.deleteIfExists(file);
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
|
||||
// Don't delete the cache directory itself.
|
||||
if (!Files.isSameFile(dir, cacheDirectory)) {
|
||||
Files.deleteIfExists(dir);
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Set<String> keySet() {
|
||||
try (final Stream<Path> files = Files.list(cacheDirectory)) {
|
||||
return Collections.unmodifiableSet(files.map(Path::getFileName).map(Path::toString).collect(Collectors.toSet()));
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Collection<byte[]> values() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Set<Entry<String, byte[]>> entrySet() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void forEach(final BiConsumer<? super String, ? super byte[]> action) {
|
||||
if (Files.exists(cacheDirectory))
|
||||
try (final Stream<Path> files = cacheContent().filter(Files::isReadable)) {
|
||||
files.forEach(file -> {
|
||||
try {
|
||||
action.accept(file.getFileName().toString(), Files.readAllBytes(file));
|
||||
} catch (final IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("StreamResourceLeak")
|
||||
private final Stream<Path> cacheContent() {
|
||||
try {
|
||||
return Files.walk(cacheDirectory).filter(Files::isRegularFile);
|
||||
} catch (final IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package rocks.xmpp.util.cache;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* A simple concurrent implementation of a least-recently-used cache.
|
||||
* <p>
|
||||
* This cache is keeps a maximal number of items in memory and removes the least-recently-used item, when new items are added.
|
||||
*
|
||||
* @param <K> The key.
|
||||
* @param <V> The value.
|
||||
* @author Christian Schudt
|
||||
* @see <a href="http://javadecodedquestions.blogspot.de/2013/02/java-cache-static-data-loading.html">http://javadecodedquestions.blogspot.de/2013/02/java-cache-static-data-loading.html</a>
|
||||
* @see <a href="http://stackoverflow.com/a/22891780">http://stackoverflow.com/a/22891780</a>
|
||||
*/
|
||||
public final class LruCache<K, V> implements Map<K, V> {
|
||||
private final int maxEntries;
|
||||
|
||||
private final Map<K, V> map;
|
||||
|
||||
final Queue<K> queue;
|
||||
|
||||
public LruCache(final int maxEntries) {
|
||||
this.maxEntries = maxEntries;
|
||||
this.map = new ConcurrentHashMap<>(maxEntries);
|
||||
// Don't use a ConcurrentLinkedQueue here.
|
||||
// There's a JDK bug, leading to OutOfMemoryError and high CPU usage:
|
||||
// https://bugs.openjdk.java.net/browse/JDK-8054446
|
||||
this.queue = new ConcurrentLinkedDeque<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int size() {
|
||||
return map.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isEmpty() {
|
||||
return map.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean containsKey(final Object key) {
|
||||
return map.containsKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean containsValue(final Object value) {
|
||||
return map.containsValue(value);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public final V get(final Object key) {
|
||||
final V v = map.get(key);
|
||||
if (v != null) {
|
||||
// Remove the key from the queue and re-add it to the tail. It is now the most recently used key.
|
||||
keyUsed((K) key);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final V put(final K key, final V value) {
|
||||
V v = map.put(key, value);
|
||||
keyUsed(key);
|
||||
limit();
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V remove(final Object key) {
|
||||
queue.remove(key);
|
||||
return map.remove(key);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final void putAll(final Map<? extends K, ? extends V> m) {
|
||||
for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {
|
||||
put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void clear() {
|
||||
queue.clear();
|
||||
map.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Set<K> keySet() {
|
||||
return map.keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Collection<V> values() {
|
||||
return map.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Set<Entry<K, V>> entrySet() {
|
||||
return map.entrySet();
|
||||
}
|
||||
|
||||
|
||||
// Default methods
|
||||
|
||||
@Override
|
||||
public final V putIfAbsent(final K key, final V value) {
|
||||
final V v = map.putIfAbsent(key, value);
|
||||
if (v == null) {
|
||||
keyUsed(key);
|
||||
}
|
||||
limit();
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean remove(final Object key, final Object value) {
|
||||
final boolean removed = map.remove(key, value);
|
||||
if (removed) {
|
||||
queue.remove(key);
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean replace(final K key, final V oldValue, final V newValue) {
|
||||
final boolean replaced = map.replace(key, oldValue, newValue);
|
||||
if (replaced) {
|
||||
keyUsed(key);
|
||||
}
|
||||
return replaced;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V replace(final K key, final V value) {
|
||||
final V v = map.replace(key, value);
|
||||
if (v != null) {
|
||||
keyUsed(key);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V computeIfAbsent(final K key, final Function<? super K, ? extends V> mappingFunction) {
|
||||
return map.computeIfAbsent(key, mappingFunction.<V>andThen(v -> {
|
||||
keyUsed(key);
|
||||
limit();
|
||||
return v;
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V computeIfPresent(final K key, final BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
||||
return map.computeIfPresent(key, remappingFunction.<V>andThen(v -> {
|
||||
keyUsed(key);
|
||||
limit();
|
||||
return v;
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V compute(final K key, final BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
||||
return map.compute(key, remappingFunction.<V>andThen(v -> {
|
||||
keyUsed(key);
|
||||
limit();
|
||||
return v;
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
|
||||
return map.merge(key, value, remappingFunction.<V>andThen(v -> {
|
||||
keyUsed(key);
|
||||
limit();
|
||||
return v;
|
||||
}));
|
||||
}
|
||||
|
||||
private void limit() {
|
||||
while (queue.size() > maxEntries) {
|
||||
final K oldestKey = queue.poll();
|
||||
if (oldestKey != null) {
|
||||
map.remove(oldestKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void keyUsed(final K key) {
|
||||
// remove it from the queue and re-add it, to make it the most recently used key.
|
||||
queue.remove(key);
|
||||
queue.offer(key);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Christian Schudt
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Provides simple cache implementations.
|
||||
*/
|
||||
package rocks.xmpp.util.cache;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
• Rework Login with certificate UI
|
||||
• Add ability to pin chats on top (add to favorites)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Reduce echo during calls on some devices
|
||||
• Fix login when passwords contains special characters
|
||||
• Play dial and busy tones on speaker during video calls
|
||||
|
|
@ -0,0 +1 @@
|
|||
• Offer to record voice message when callee is busy
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Show help button if A/V call fails
|
||||
• Fixed some annoying crashes
|
||||
• Fixed Jingle connections (file transfer + calls) with bare JIDs
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
• Fixed notifications not showing up under certain conditions
|
||||
• Fixed compatibility issues and crashes related to A/V calls
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• add 'Return to chat' to audio call screen
|
||||
• Improve keyboard shortcuts
|
||||
• bug fixes
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Handle GPX files
|
||||
• Improve performance for backup restore
|
||||
• bug fixes
|
||||
|
|
@ -0,0 +1 @@
|
|||
• WebRTC update (with security fixes)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
• Search individual conversations
|
||||
• Notify user if message delivery fails
|
||||
• Remember display names (nicks) from Quicksy users across restarts
|
||||
• Add button to start Orbot (Tor) from notification if necessary
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Offer Easy Invite generation on supporting servers
|
||||
• Display GIFs send from Movim
|
||||
• store avatars in cache
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
• Fixed connectivity issues when different accounts used different SCRAM mechanisms
|
||||
• Add support for SCRAM-SHA-512
|
||||
• Allow P2P (Jingle) file transfer with self contact
|
||||
• minor stability improvements for A/V calls
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Show call button for offline contacts if they previously announced support
|
||||
• Back button no longer ends call when call is connected
|
||||
• bug fixes
|
||||
|
|
@ -0,0 +1 @@
|
|||
• fix crashes (error on internal database migration)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
• Ability to select incoming call ringtone
|
||||
• Fix OpenPGP key id discovery for OpenKeychain 5.6+
|
||||
• Properly verify punycode TLS certificates
|
||||
• Improve stability of RTP session establishment (calling)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
• Verify A/V calls with preexisting OMEMO sessions
|
||||
• Improve compatibility with non libwebrtc WebRTC implementations
|
||||
|
|
@ -0,0 +1 @@
|
|||
• Various bug fixes around Tor support
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Improve call compatibility with Dino
|
||||
• fix HTTP up/download for users that don’t trust system CAs
|
||||
• Fixed 'No Connectivity' issues on Android 7.1
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Always verify domain name. No user overwrite
|
||||
• Support roster pre authentication
|
||||
• minor A/V improvements
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
• Show black bars when remote video does not match aspect ratio of screen
|
||||
• Improve search performance
|
||||
• Add setting to prevent screenshots
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
• Fix issue with some videos not being compressed
|
||||
• Fix rare crash when opening notification
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
• Fix crash when rendering some quotes
|
||||
• Fix crash in welcome screen
|
||||
|
|
@ -0,0 +1 @@
|
|||
• Fix usage directTLS of manuelle enter an address
|
||||
|
|
@ -4,8 +4,7 @@ Changes to origin:
|
|||
• replace the hardcoded IPv4 preference to easy Happy Eyeball, for faster connection and fair to both IP version.
|
||||
• rebrands it as chat.sum7.eu (to run both version together)
|
||||
|
||||
Easy to use, reliable, battery friendly. With built-in support for images, group
|
||||
chats and e2e encryption.
|
||||
Easy to use, reliable, battery friendly. With built-in support for images, group chats and e2e encryption.
|
||||
|
||||
Design principles:
|
||||
|
||||
|
|
@ -18,6 +17,7 @@ Features:
|
|||
|
||||
• End-to-end encryption with either <a href="https://conversations.im/omemo/">OMEMO</a> or <a href="https://openpgp.org/about/">OpenPGP</a>
|
||||
• Sending and receiving images
|
||||
• Encrypted audio and video calls (DLTS-SRTP)
|
||||
• Intuitive UI that follows Android Design guidelines
|
||||
• Pictures / Avatars for your Contacts
|
||||
• Syncs with desktop client
|
||||
|
|
@ -26,19 +26,11 @@ Features:
|
|||
• Multiple accounts / unified inbox
|
||||
• Very low impact on battery life
|
||||
|
||||
Conversations makes it very easy to create an account on the chat.sum7.eu
|
||||
server. However Conversations will work with any other XMPP server as
|
||||
well. A lot of XMPP servers are run by volunteers and are free of charge.
|
||||
Conversations makes it very easy to create an account on the chat.sum7.eu server. However Conversations will work with any other XMPP server as well. A lot of XMPP servers are run by volunteers and are free of charge.
|
||||
|
||||
XMPP Features:
|
||||
|
||||
Conversations works with every XMPP server out there. However XMPP is an
|
||||
extensible protocol. These extensions are standardized as well in so called
|
||||
XEP’s. Conversations supports a couple of those to make the overall user
|
||||
experience better. There is a chance that your current XMPP server does not
|
||||
support these extensions. Therefore to get the most out of Conversations you
|
||||
should consider either switching to an XMPP server that does or - even better -
|
||||
run your own XMPP server for you and your friends.
|
||||
Conversations works with every XMPP server out there. However XMPP is an extensible protocol. These extensions are standardized as well in so called XEP’s. Conversations supports a couple of those to make the overall user experience better. There is a chance that your current XMPP server does not support these extensions. Therefore to get the most out of Conversations you should consider either switching to an XMPP server that does or - even better - run your own XMPP server for you and your friends.
|
||||
|
||||
These XEPs are - as of now:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,15 @@
|
|||
-dontwarn java.lang.**
|
||||
-dontwarn javax.lang.**
|
||||
|
||||
-dontwarn com.android.org.conscrypt.SSLParametersImpl
|
||||
-dontwarn org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
|
||||
-dontwarn org.bouncycastle.jsse.BCSSLParameters
|
||||
-dontwarn org.bouncycastle.jsse.BCSSLSocket
|
||||
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
|
||||
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
|
||||
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
|
||||
-dontwarn org.openjsse.net.ssl.OpenJSSE
|
||||
|
||||
-keepclassmembers class eu.siacs.conversations.http.services.** {
|
||||
!transient <fields>;
|
||||
}
|
||||
|
|
|
|||
BIN
screenshots.xcf
BIN
screenshots.xcf
Binary file not shown.
|
|
@ -1,2 +1 @@
|
|||
include ':libs:xmpp-addr'
|
||||
rootProject.name = 'Conversations'
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
package eu.siacs.conversations.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.text.emoji.widget.EmojiAppCompatEditText;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.emoji.widget.EmojiAppCompatEditText;
|
||||
|
||||
public class EmojiWrapperEditText extends EmojiAppCompatEditText {
|
||||
|
||||
public EmojiWrapperEditText(Context context) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
package eu.siacs.conversations.utils;
|
||||
|
||||
import android.support.text.emoji.EmojiCompat;
|
||||
import androidx.emoji.text.EmojiCompat;
|
||||
|
||||
public class EmojiWrapper {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
android:name=".ui.MagicCreateActivity"
|
||||
android:label="@string/create_new_account"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".ui.EasyOnboardingInviteActivity"
|
||||
android:label="@string/invite_to_app"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".ui.ImportBackupActivity"
|
||||
android:label="@string/restore_backup"
|
||||
|
|
@ -38,6 +42,40 @@
|
|||
<data android:mimeType="application/vnd.conversations.backup" />
|
||||
<data android:scheme="file" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="content" />
|
||||
<data android:host="*" />
|
||||
<data android:mimeType="*/*" />
|
||||
<data android:pathPattern=".*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="file" />
|
||||
<data android:host="*" />
|
||||
<data android:mimeType="*/*" />
|
||||
<data android:pathPattern=".*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package eu.siacs.conversations.entities;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class AccountConfiguration {
|
||||
|
||||
private static final Gson GSON = new GsonBuilder().create();
|
||||
|
||||
public Protocol protocol;
|
||||
public String address;
|
||||
public String password;
|
||||
|
||||
public Jid getJid() {
|
||||
return Jid.ofEscaped(address);
|
||||
}
|
||||
|
||||
public static AccountConfiguration parse(final String input) {
|
||||
final AccountConfiguration c;
|
||||
try {
|
||||
c = GSON.fromJson(input, AccountConfiguration.class);
|
||||
} catch (JsonSyntaxException e) {
|
||||
throw new IllegalArgumentException("Not a valid JSON string", e);
|
||||
}
|
||||
Preconditions.checkArgument(
|
||||
c.protocol == Protocol.XMPP,
|
||||
"Protocol must be XMPP"
|
||||
);
|
||||
Preconditions.checkArgument(
|
||||
c.address != null && c.getJid().isBareJid() && !c.getJid().isDomainJid(),
|
||||
"Invalid XMPP address"
|
||||
);
|
||||
Preconditions.checkArgument(
|
||||
c.password != null && c.password.length() > 0,
|
||||
"No password specified"
|
||||
);
|
||||
return c;
|
||||
}
|
||||
|
||||
public enum Protocol {
|
||||
@SerializedName("xmpp") XMPP,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.services;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
|
|
@ -10,9 +11,23 @@ import android.database.sqlite.SQLiteDatabase;
|
|||
import android.net.Uri;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.provider.OpenableColumns;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.io.CountingInputStream;
|
||||
|
||||
import org.bouncycastle.crypto.engines.AESEngine;
|
||||
import org.bouncycastle.crypto.io.CipherInputStream;
|
||||
import org.bouncycastle.crypto.modes.AEADBlockCipher;
|
||||
import org.bouncycastle.crypto.modes.GCMBlockCipher;
|
||||
import org.bouncycastle.crypto.params.AEADParameters;
|
||||
import org.bouncycastle.crypto.params.KeyParameter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
|
|
@ -33,10 +48,6 @@ import java.util.zip.GZIPInputStream;
|
|||
import java.util.zip.ZipException;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
|
@ -44,18 +55,13 @@ import eu.siacs.conversations.persistance.DatabaseBackend;
|
|||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.ui.ManageAccountActivity;
|
||||
import eu.siacs.conversations.utils.BackupFileHeader;
|
||||
import eu.siacs.conversations.utils.Compatibility;
|
||||
import eu.siacs.conversations.utils.SerialSingleThreadExecutor;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
|
||||
import static eu.siacs.conversations.services.ExportBackupService.CIPHERMODE;
|
||||
import static eu.siacs.conversations.services.ExportBackupService.KEYTYPE;
|
||||
import static eu.siacs.conversations.services.ExportBackupService.PROVIDER;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class ImportBackupService extends Service {
|
||||
|
||||
private static final int NOTIFICATION_ID = 21;
|
||||
private static AtomicBoolean running = new AtomicBoolean(false);
|
||||
private static final AtomicBoolean running = new AtomicBoolean(false);
|
||||
private final ImportBackupServiceBinder binder = new ImportBackupServiceBinder();
|
||||
private final SerialSingleThreadExecutor executor = new SerialSingleThreadExecutor(getClass().getSimpleName());
|
||||
private final Set<OnBackupProcessed> mOnBackupProcessedListeners = Collections.newSetFromMap(new WeakHashMap<>());
|
||||
|
|
@ -117,9 +123,9 @@ public class ImportBackupService extends Service {
|
|||
return running.get();
|
||||
}
|
||||
|
||||
public void loadBackupFiles(OnBackupFilesLoaded onBackupFilesLoaded) {
|
||||
public void loadBackupFiles(final OnBackupFilesLoaded onBackupFilesLoaded) {
|
||||
executor.execute(() -> {
|
||||
List<Jid> accounts = mDatabaseBackend.getAccountJids(false);
|
||||
final List<Jid> accounts = mDatabaseBackend.getAccountJids(false);
|
||||
final ArrayList<BackupFile> backupFiles = new ArrayList<>();
|
||||
final Set<String> apps = new HashSet<>(Arrays.asList("Conversations", "Quicksy", getString(R.string.app_name)));
|
||||
for (String app : apps) {
|
||||
|
|
@ -128,7 +134,12 @@ public class ImportBackupService extends Service {
|
|||
Log.d(Config.LOGTAG, "directory not found: " + directory.getAbsolutePath());
|
||||
continue;
|
||||
}
|
||||
for (File file : directory.listFiles()) {
|
||||
final File[] files = directory.listFiles();
|
||||
if (files == null) {
|
||||
onBackupFilesLoaded.onBackupFilesLoaded(backupFiles);
|
||||
return;
|
||||
}
|
||||
for (final File file : files) {
|
||||
if (file.isFile() && file.getName().endsWith(".ceb")) {
|
||||
try {
|
||||
final BackupFile backupFile = BackupFile.read(file);
|
||||
|
|
@ -149,24 +160,68 @@ public class ImportBackupService extends Service {
|
|||
}
|
||||
|
||||
private void startForegroundService() {
|
||||
startForeground(NOTIFICATION_ID, createImportBackupNotification(1, 0));
|
||||
}
|
||||
|
||||
private void updateImportBackupNotification(final long total, final long current) {
|
||||
final int max;
|
||||
final int progress;
|
||||
if (total == 0) {
|
||||
max = 1;
|
||||
progress = 0;
|
||||
} else {
|
||||
max = 100;
|
||||
progress = (int) (current * 100 / total);
|
||||
}
|
||||
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
try {
|
||||
notificationManager.notify(NOTIFICATION_ID, createImportBackupNotification(max, progress));
|
||||
} catch (final RuntimeException e) {
|
||||
Log.d(Config.LOGTAG, "unable to make notification", e);
|
||||
}
|
||||
}
|
||||
|
||||
private Notification createImportBackupNotification(final int max, final int progress) {
|
||||
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getBaseContext(), "backup");
|
||||
mBuilder.setContentTitle(getString(R.string.restoring_backup))
|
||||
.setSmallIcon(R.drawable.ic_unarchive_white_24dp)
|
||||
.setProgress(1, 0, true);
|
||||
startForeground(NOTIFICATION_ID, mBuilder.build());
|
||||
.setProgress(max, progress, max == 1 && progress == 0);
|
||||
return mBuilder.build();
|
||||
}
|
||||
|
||||
private boolean importBackup(Uri uri, String password) {
|
||||
private boolean importBackup(final Uri uri, final String password) {
|
||||
Log.d(Config.LOGTAG, "importing backup from " + uri);
|
||||
final Stopwatch stopwatch = Stopwatch.createStarted();
|
||||
try {
|
||||
SQLiteDatabase db = mDatabaseBackend.getWritableDatabase();
|
||||
final SQLiteDatabase db = mDatabaseBackend.getWritableDatabase();
|
||||
final InputStream inputStream;
|
||||
if ("file".equals(uri.getScheme())) {
|
||||
inputStream = new FileInputStream(new File(uri.getPath()));
|
||||
final String path = uri.getPath();
|
||||
final long fileSize;
|
||||
if ("file".equals(uri.getScheme()) && path != null) {
|
||||
final File file = new File(path);
|
||||
inputStream = new FileInputStream(file);
|
||||
fileSize = file.length();
|
||||
} else {
|
||||
final Cursor returnCursor = getContentResolver().query(uri, null, null, null, null);
|
||||
if (returnCursor == null) {
|
||||
fileSize = 0;
|
||||
} else {
|
||||
returnCursor.moveToFirst();
|
||||
fileSize = returnCursor.getLong(returnCursor.getColumnIndex(OpenableColumns.SIZE));
|
||||
returnCursor.close();
|
||||
}
|
||||
inputStream = getContentResolver().openInputStream(uri);
|
||||
}
|
||||
final DataInputStream dataInputStream = new DataInputStream(inputStream);
|
||||
if (inputStream == null) {
|
||||
synchronized (mOnBackupProcessedListeners) {
|
||||
for (final OnBackupProcessed l : mOnBackupProcessedListeners) {
|
||||
l.onBackupRestoreFailed();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
final CountingInputStream countingInputStream = new CountingInputStream(inputStream);
|
||||
final DataInputStream dataInputStream = new DataInputStream(countingInputStream);
|
||||
final BackupFileHeader backupFileHeader = BackupFileHeader.read(dataInputStream);
|
||||
Log.d(Config.LOGTAG, backupFileHeader.toString());
|
||||
|
||||
|
|
@ -179,15 +234,15 @@ public class ImportBackupService extends Service {
|
|||
return false;
|
||||
}
|
||||
|
||||
final Cipher cipher = Compatibility.twentyEight() ? Cipher.getInstance(CIPHERMODE) : Cipher.getInstance(CIPHERMODE, PROVIDER);
|
||||
byte[] key = ExportBackupService.getKey(password, backupFileHeader.getSalt());
|
||||
SecretKeySpec keySpec = new SecretKeySpec(key, KEYTYPE);
|
||||
IvParameterSpec ivSpec = new IvParameterSpec(backupFileHeader.getIv());
|
||||
cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);
|
||||
CipherInputStream cipherInputStream = new CipherInputStream(inputStream, cipher);
|
||||
final byte[] key = ExportBackupService.getKey(password, backupFileHeader.getSalt());
|
||||
|
||||
GZIPInputStream gzipInputStream = new GZIPInputStream(cipherInputStream);
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(gzipInputStream, "UTF-8"));
|
||||
final AEADBlockCipher cipher = new GCMBlockCipher(new AESEngine());
|
||||
cipher.init(false, new AEADParameters(new KeyParameter(key), 128, backupFileHeader.getIv()));
|
||||
final CipherInputStream cipherInputStream = new CipherInputStream(countingInputStream, cipher);
|
||||
|
||||
final GZIPInputStream gzipInputStream = new GZIPInputStream(cipherInputStream);
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(gzipInputStream, Charsets.UTF_8));
|
||||
db.beginTransaction();
|
||||
String line;
|
||||
StringBuilder multiLineQuery = null;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
|
|
@ -198,20 +253,24 @@ public class ImportBackupService extends Service {
|
|||
if (count % 2 == 1) {
|
||||
db.execSQL(multiLineQuery.toString());
|
||||
multiLineQuery = null;
|
||||
updateImportBackupNotification(fileSize, countingInputStream.getCount());
|
||||
}
|
||||
} else {
|
||||
if (count % 2 == 0) {
|
||||
db.execSQL(line);
|
||||
updateImportBackupNotification(fileSize, countingInputStream.getCount());
|
||||
} else {
|
||||
multiLineQuery = new StringBuilder(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
final Jid jid = backupFileHeader.getJid();
|
||||
Cursor countCursor = db.rawQuery("select count(messages.uuid) from messages join conversations on conversations.uuid=messages.conversationUuid join accounts on conversations.accountUuid=accounts.uuid where accounts.username=? and accounts.server=?", new String[]{jid.getEscapedLocal(), jid.getDomain()});
|
||||
final Cursor countCursor = db.rawQuery("select count(messages.uuid) from messages join conversations on conversations.uuid=messages.conversationUuid join accounts on conversations.accountUuid=accounts.uuid where accounts.username=? and accounts.server=?", new String[]{jid.getEscapedLocal(), jid.getDomain().toEscapedString()});
|
||||
countCursor.moveToFirst();
|
||||
int count = countCursor.getInt(0);
|
||||
Log.d(Config.LOGTAG, "restored " + count + " messages");
|
||||
final int count = countCursor.getInt(0);
|
||||
Log.d(Config.LOGTAG, String.format("restored %d messages in %s", count, stopwatch.stop().toString()));
|
||||
countCursor.close();
|
||||
stopBackgroundService();
|
||||
synchronized (mOnBackupProcessedListeners) {
|
||||
|
|
@ -220,8 +279,8 @@ public class ImportBackupService extends Service {
|
|||
}
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Throwable throwable = e.getCause();
|
||||
} catch (final Exception e) {
|
||||
final Throwable throwable = e.getCause();
|
||||
final boolean reasonWasCrypto = throwable instanceof BadPaddingException || e instanceof ZipException;
|
||||
synchronized (mOnBackupProcessedListeners) {
|
||||
for (OnBackupProcessed l : mOnBackupProcessedListeners) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
package eu.siacs.conversations.services;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
public class QuickConversationsService extends AbstractQuickConversationsService {
|
||||
|
||||
QuickConversationsService(XmppConnectionService xmppConnectionService) {
|
||||
|
|
@ -25,4 +30,9 @@ public class QuickConversationsService extends AbstractQuickConversationsService
|
|||
public void considerSyncBackground(boolean force) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSmsReceived(Intent intent) {
|
||||
Log.d(Config.LOGTAG,"ignoring received SMS");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityEasyInviteBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.services.BarcodeProvider;
|
||||
import eu.siacs.conversations.utils.EasyOnboardingInvite;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class EasyOnboardingInviteActivity extends XmppActivity implements EasyOnboardingInvite.OnInviteRequested {
|
||||
|
||||
private ActivityEasyInviteBinding binding;
|
||||
|
||||
private EasyOnboardingInvite easyOnboardingInvite;
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(final Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_easy_invite);
|
||||
setSupportActionBar(binding.toolbar);
|
||||
configureActionBar(getSupportActionBar(), true);
|
||||
this.binding.shareButton.setOnClickListener(v -> share());
|
||||
if (bundle != null && bundle.containsKey("invite")) {
|
||||
this.easyOnboardingInvite = bundle.getParcelable("invite");
|
||||
if (this.easyOnboardingInvite != null) {
|
||||
showInvite(this.easyOnboardingInvite);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.showLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.easy_onboarding_invite, menu);
|
||||
final MenuItem share = menu.findItem(R.id.action_share);
|
||||
share.setVisible(easyOnboardingInvite != null);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem menuItem) {
|
||||
if (menuItem.getItemId() == R.id.action_share) {
|
||||
share();
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void share() {
|
||||
final String shareText = getString(
|
||||
R.string.easy_invite_share_text,
|
||||
easyOnboardingInvite.getDomain(),
|
||||
easyOnboardingInvite.getShareableLink()
|
||||
);
|
||||
final Intent sendIntent = new Intent();
|
||||
sendIntent.setAction(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_TEXT, shareText);
|
||||
sendIntent.setType("text/plain");
|
||||
startActivity(Intent.createChooser(sendIntent, getString(R.string.share_invite_with)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshUiReal() {
|
||||
invalidateOptionsMenu();
|
||||
if (easyOnboardingInvite != null) {
|
||||
showInvite(easyOnboardingInvite);
|
||||
} else {
|
||||
showLoading();
|
||||
}
|
||||
}
|
||||
|
||||
private void showLoading() {
|
||||
this.binding.inProgress.setVisibility(View.VISIBLE);
|
||||
this.binding.invite.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void showInvite(final EasyOnboardingInvite invite) {
|
||||
this.binding.inProgress.setVisibility(View.GONE);
|
||||
this.binding.invite.setVisibility(View.VISIBLE);
|
||||
this.binding.tapToShare.setText(getString(R.string.tap_share_button_send_invite, invite.getDomain()));
|
||||
final Point size = new Point();
|
||||
getWindowManager().getDefaultDisplay().getSize(size);
|
||||
final int width = Math.min(size.x, size.y);
|
||||
final Bitmap bitmap = BarcodeProvider.create2dBarcodeBitmap(invite.getShareableLink(), width);
|
||||
binding.qrCode.setImageBitmap(bitmap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle bundle) {
|
||||
super.onSaveInstanceState(bundle);
|
||||
if (easyOnboardingInvite != null) {
|
||||
bundle.putParcelable("invite", easyOnboardingInvite);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void onBackendConnected() {
|
||||
if (easyOnboardingInvite != null) {
|
||||
return;
|
||||
}
|
||||
final Intent launchIntent = getIntent();
|
||||
final String accountExtra = launchIntent.getStringExtra(EXTRA_ACCOUNT);
|
||||
final Jid jid = accountExtra == null ? null : Jid.ofEscaped(accountExtra);
|
||||
if (jid == null) {
|
||||
return;
|
||||
}
|
||||
final Account account = xmppConnectionService.findAccountByJid(jid);
|
||||
xmppConnectionService.requestEasyOnboardingInvite(account, this);
|
||||
}
|
||||
|
||||
public static void launch(final Account account, final Activity context) {
|
||||
final Intent intent = new Intent(context, EasyOnboardingInviteActivity.class);
|
||||
intent.putExtra(EXTRA_ACCOUNT, account.getJid().asBareJid().toEscapedString());
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inviteRequested(EasyOnboardingInvite invite) {
|
||||
this.easyOnboardingInvite = invite;
|
||||
Log.d(Config.LOGTAG, "invite requested");
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inviteRequestFailed(final String message) {
|
||||
runOnUiThread(() -> {
|
||||
if (!Strings.isNullOrEmpty(message)) {
|
||||
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
finish();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -5,21 +5,21 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -29,6 +29,7 @@ import eu.siacs.conversations.databinding.ActivityImportBackupBinding;
|
|||
import eu.siacs.conversations.databinding.DialogEnterPasswordBinding;
|
||||
import eu.siacs.conversations.services.ImportBackupService;
|
||||
import eu.siacs.conversations.ui.adapter.BackupFileAdapter;
|
||||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
|
||||
public class ImportBackupActivity extends ActionBarActivity implements ServiceConnection, ImportBackupService.OnBackupFilesLoaded, BackupFileAdapter.OnItemClickedListener, ImportBackupService.OnBackupProcessed {
|
||||
|
|
@ -48,12 +49,18 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
|||
setTheme(this.mTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_import_backup);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
setSupportActionBar(binding.toolbar);
|
||||
setLoadingState(savedInstanceState != null && savedInstanceState.getBoolean("loading_state", false));
|
||||
this.backupFileAdapter = new BackupFileAdapter();
|
||||
this.binding.list.setAdapter(this.backupFileAdapter);
|
||||
this.backupFileAdapter.setOnItemClickedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume(){
|
||||
super.onResume();
|
||||
SettingsUtils.applyScreenshotPreventionSetting(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(final Menu menu) {
|
||||
|
|
@ -124,7 +131,8 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
|||
try {
|
||||
final ImportBackupService.BackupFile backupFile = ImportBackupService.BackupFile.read(this, uri);
|
||||
showEnterPasswordDialog(backupFile, finishOnCancel);
|
||||
} catch (IOException | IllegalArgumentException e) {
|
||||
} catch (final IOException | IllegalArgumentException e) {
|
||||
Log.d(Config.LOGTAG, "unable to open backup file " + uri, e);
|
||||
Snackbar.make(binding.coordinator, R.string.not_a_backup_file, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
|
@ -180,6 +188,7 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
|||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
super.onActivityResult(requestCode, resultCode, intent);
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (requestCode == 0xbac) {
|
||||
openBackupFileFromUri(intent.getData(), false);
|
||||
|
|
@ -224,15 +233,17 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
|||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == R.id.action_open_backup_file) {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.setType("*/*");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, false);
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
startActivityForResult(Intent.createChooser(intent, getString(R.string.open_backup)), 0xbac);
|
||||
openBackupFile();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void openBackupFile() {
|
||||
final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, false);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
startActivityForResult(Intent.createChooser(intent, getString(R.string.open_backup)), 0xbac);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ package eu.siacs.conversations.ui;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
|
@ -18,7 +18,7 @@ import eu.siacs.conversations.databinding.MagicCreateBinding;
|
|||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.utils.CryptoHelper;
|
||||
import eu.siacs.conversations.utils.InstallReferrerUtils;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class MagicCreateActivity extends XmppActivity implements TextWatcher {
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
|
|||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.magic_create);
|
||||
setSupportActionBar((Toolbar) this.binding.toolbar);
|
||||
setSupportActionBar(this.binding.toolbar);
|
||||
configureActionBar(getSupportActionBar(), this.domain == null);
|
||||
if (username != null && domain != null) {
|
||||
binding.title.setText(R.string.your_server_invitation);
|
||||
|
|
@ -79,13 +79,13 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
|
|||
final boolean fixedUsername;
|
||||
if (this.domain != null && this.username != null) {
|
||||
fixedUsername = true;
|
||||
jid = Jid.ofLocalAndDomain(this.username, this.domain);
|
||||
jid = Jid.ofLocalAndDomainEscaped(this.username, this.domain);
|
||||
} else if (this.domain != null) {
|
||||
fixedUsername = false;
|
||||
jid = Jid.ofLocalAndDomain(username, this.domain);
|
||||
jid = Jid.ofLocalAndDomainEscaped(username, this.domain);
|
||||
} else {
|
||||
fixedUsername = false;
|
||||
jid = Jid.ofLocalAndDomain(username, Config.MAGIC_CREATE_DOMAIN);
|
||||
jid = Jid.ofLocalAndDomainEscaped(username, Config.MAGIC_CREATE_DOMAIN);
|
||||
}
|
||||
if (!jid.getEscapedLocal().equals(jid.getLocal()) || (this.username == null && username.length() < 3)) {
|
||||
binding.username.setError(getString(R.string.invalid_username));
|
||||
|
|
@ -149,9 +149,9 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
|
|||
binding.fullJid.setVisibility(View.VISIBLE);
|
||||
final Jid jid;
|
||||
if (this.domain == null) {
|
||||
jid = Jid.ofLocalAndDomain(username, Config.MAGIC_CREATE_DOMAIN);
|
||||
jid = Jid.ofLocalAndDomainEscaped(username, Config.MAGIC_CREATE_DOMAIN);
|
||||
} else {
|
||||
jid = Jid.ofLocalAndDomain(username, this.domain);
|
||||
jid = Jid.ofLocalAndDomainEscaped(username, this.domain);
|
||||
}
|
||||
binding.fullJid.setText(getString(R.string.your_full_jid_will_be, jid.toEscapedString()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
|
|
|
|||
|
|
@ -5,21 +5,20 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.security.KeyChain;
|
||||
import android.security.KeyChainAliasCallback;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.Pair;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -33,8 +32,8 @@ import eu.siacs.conversations.services.XmppConnectionService;
|
|||
import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
|
||||
import eu.siacs.conversations.ui.adapter.AccountAdapter;
|
||||
import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
|
||||
import static eu.siacs.conversations.utils.PermissionUtils.allGranted;
|
||||
import static eu.siacs.conversations.utils.PermissionUtils.writeGranted;
|
||||
|
|
@ -87,7 +86,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
String jid = savedInstanceState.getString(STATE_SELECTED_ACCOUNT);
|
||||
if (jid != null) {
|
||||
try {
|
||||
this.selectedAccountJid = Jid.of(jid);
|
||||
this.selectedAccountJid = Jid.ofEscaped(jid);
|
||||
} catch (IllegalArgumentException e) {
|
||||
this.selectedAccountJid = null;
|
||||
}
|
||||
|
|
@ -113,7 +112,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
@Override
|
||||
public void onSaveInstanceState(final Bundle savedInstanceState) {
|
||||
if (selectedAccount != null) {
|
||||
savedInstanceState.putString(STATE_SELECTED_ACCOUNT, selectedAccount.getJid().asBareJid().toString());
|
||||
savedInstanceState.putString(STATE_SELECTED_ACCOUNT, selectedAccount.getJid().asBareJid().toEscapedString());
|
||||
}
|
||||
super.onSaveInstanceState(savedInstanceState);
|
||||
}
|
||||
|
|
@ -133,7 +132,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
menu.findItem(R.id.mgmt_account_announce_pgp).setVisible(false);
|
||||
menu.findItem(R.id.mgmt_account_publish_avatar).setVisible(false);
|
||||
}
|
||||
menu.setHeaderTitle(this.selectedAccount.getJid().asBareJid().toString());
|
||||
menu.setHeaderTitle(this.selectedAccount.getJid().asBareJid().toEscapedString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -228,7 +227,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) {
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (grantResults.length > 0) {
|
||||
if (allGranted(grantResults)) {
|
||||
switch (requestCode) {
|
||||
|
|
@ -288,7 +288,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
private void publishAvatar(Account account) {
|
||||
Intent intent = new Intent(getApplicationContext(),
|
||||
PublishProfilePictureActivity.class);
|
||||
intent.putExtra(EXTRA_ACCOUNT, account.getJid().toString());
|
||||
intent.putExtra(EXTRA_ACCOUNT, account.getJid().asBareJid().toEscapedString());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
}
|
||||
|
||||
private void deleteAccount(final Account account) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(getString(R.string.mgmt_account_are_you_sure));
|
||||
builder.setIconAttribute(android.R.attr.alertDialogIcon);
|
||||
builder.setMessage(getString(R.string.mgmt_account_delete_confirm_text));
|
||||
|
|
@ -408,15 +408,15 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
}
|
||||
|
||||
@Override
|
||||
public void alias(String alias) {
|
||||
public void alias(final String alias) {
|
||||
if (alias != null) {
|
||||
xmppConnectionService.createAccountFromKey(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAccountCreated(Account account) {
|
||||
Intent intent = new Intent(this, EditAccountActivity.class);
|
||||
public void onAccountCreated(final Account account) {
|
||||
final Intent intent = new Intent(this, EditAccountActivity.class);
|
||||
intent.putExtra("jid", account.getJid().asBareJid().toString());
|
||||
intent.putExtra("init", true);
|
||||
startActivity(intent);
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package eu.siacs.conversations.ui;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
|
|
@ -66,7 +66,7 @@ public class PickServerActivity extends XmppActivity {
|
|||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityPickServerBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_pick_server);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
setSupportActionBar(binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
binding.useCim.setOnClickListener(v -> {
|
||||
final Intent intent = new Intent(this, MagicCreateActivity.class);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -14,7 +10,7 @@ import eu.siacs.conversations.R;
|
|||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.ui.adapter.AccountAdapter;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class ShareViaAccountActivity extends XmppActivity {
|
||||
public static final String EXTRA_CONTACT = "contact";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,22 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.security.KeyChain;
|
||||
import android.security.KeyChainAliasCallback;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -21,15 +24,17 @@ import eu.siacs.conversations.Config;
|
|||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityWelcomeBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.utils.Compatibility;
|
||||
import eu.siacs.conversations.utils.InstallReferrerUtils;
|
||||
import eu.siacs.conversations.utils.SignupUtils;
|
||||
import eu.siacs.conversations.utils.XmppUri;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import static eu.siacs.conversations.utils.PermissionUtils.allGranted;
|
||||
import static eu.siacs.conversations.utils.PermissionUtils.writeGranted;
|
||||
|
||||
public class WelcomeActivity extends XmppActivity {
|
||||
public class WelcomeActivity extends XmppActivity implements XmppConnectionService.OnAccountCreated, KeyChainAliasCallback {
|
||||
|
||||
private static final int REQUEST_IMPORT_BACKUP = 0x63fb;
|
||||
|
||||
|
|
@ -42,35 +47,37 @@ public class WelcomeActivity extends XmppActivity {
|
|||
activity.overridePendingTransition(0, 0);
|
||||
}
|
||||
|
||||
public void onInstallReferrerDiscovered(final String referrer) {
|
||||
public void onInstallReferrerDiscovered(final Uri referrer) {
|
||||
Log.d(Config.LOGTAG, "welcome activity: on install referrer discovered " + referrer);
|
||||
if (referrer != null) {
|
||||
if ("xmpp".equalsIgnoreCase(referrer.getScheme())) {
|
||||
final XmppUri xmppUri = new XmppUri(referrer);
|
||||
runOnUiThread(() -> processXmppUri(xmppUri));
|
||||
} else {
|
||||
Log.i(Config.LOGTAG, "install referrer was not an XMPP uri");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean processXmppUri(final XmppUri xmppUri) {
|
||||
if (xmppUri.isValidJid()) {
|
||||
final String preauth = xmppUri.getParameter("preauth");
|
||||
final Jid jid = xmppUri.getJid();
|
||||
final Intent intent;
|
||||
if (xmppUri.isAction(XmppUri.ACTION_REGISTER)) {
|
||||
intent = SignupUtils.getTokenRegistrationIntent(this, jid, preauth);
|
||||
} else if (xmppUri.isAction(XmppUri.ACTION_ROSTER) && "y".equals(xmppUri.getParameter("ibr"))) {
|
||||
intent = SignupUtils.getTokenRegistrationIntent(this, Jid.ofDomain(jid.getDomain()), preauth);
|
||||
intent.putExtra(StartConversationActivity.EXTRA_INVITE_URI, xmppUri.toString());
|
||||
} else {
|
||||
intent = null;
|
||||
}
|
||||
if (intent != null) {
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
this.inviteUri = xmppUri;
|
||||
private void processXmppUri(final XmppUri xmppUri) {
|
||||
if (!xmppUri.isValidJid()) {
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
final String preAuth = xmppUri.getParameter(XmppUri.PARAMETER_PRE_AUTH);
|
||||
final Jid jid = xmppUri.getJid();
|
||||
final Intent intent;
|
||||
if (xmppUri.isAction(XmppUri.ACTION_REGISTER)) {
|
||||
intent = SignupUtils.getTokenRegistrationIntent(this, jid, preAuth);
|
||||
} else if (xmppUri.isAction(XmppUri.ACTION_ROSTER) && "y".equals(xmppUri.getParameter(XmppUri.PARAMETER_IBR))) {
|
||||
intent = SignupUtils.getTokenRegistrationIntent(this, jid.getDomain(), preAuth);
|
||||
intent.putExtra(StartConversationActivity.EXTRA_INVITE_URI, xmppUri.toString());
|
||||
} else {
|
||||
intent = null;
|
||||
}
|
||||
if (intent != null) {
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
this.inviteUri = xmppUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -99,7 +106,8 @@ public class WelcomeActivity extends XmppActivity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNewIntent(Intent intent) {
|
||||
public void onNewIntent(final Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
if (intent != null) {
|
||||
setIntent(intent);
|
||||
}
|
||||
|
|
@ -112,7 +120,7 @@ public class WelcomeActivity extends XmppActivity {
|
|||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityWelcomeBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_welcome);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
setSupportActionBar(binding.toolbar);
|
||||
configureActionBar(getSupportActionBar(), false);
|
||||
binding.registerNewAccount.setOnClickListener(v -> {
|
||||
final Intent intent = new Intent(this, PickServerActivity.class);
|
||||
|
|
@ -139,10 +147,12 @@ public class WelcomeActivity extends XmppActivity {
|
|||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.welcome_menu, menu);
|
||||
final MenuItem scan = menu.findItem(R.id.action_scan_qr_code);
|
||||
scan.setVisible(getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA));
|
||||
scan.setVisible(Compatibility.hasFeatureCamera(this));
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
|
|
@ -152,14 +162,47 @@ public class WelcomeActivity extends XmppActivity {
|
|||
}
|
||||
break;
|
||||
case R.id.action_scan_qr_code:
|
||||
UriHandlerActivity.scan(this);
|
||||
UriHandlerActivity.scan(this, true);
|
||||
break;
|
||||
case R.id.action_add_account_with_cert:
|
||||
addAccountFromKey();
|
||||
break;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void addAccountFromKey() {
|
||||
try {
|
||||
KeyChain.choosePrivateKeyAlias(this, this, null, null, null, -1, null);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(this, R.string.device_does_not_support_certificates, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void alias(final String alias) {
|
||||
if (alias != null) {
|
||||
xmppConnectionService.createAccountFromKey(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAccountCreated(final Account account) {
|
||||
final Intent intent = new Intent(this, EditAccountActivity.class);
|
||||
intent.putExtra("jid", account.getJid().asBareJid().toEscapedString());
|
||||
intent.putExtra("init", true);
|
||||
addInviteUri(intent);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void informUser(final int r) {
|
||||
runOnUiThread(() -> Toast.makeText(this, r, Toast.LENGTH_LONG).show());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
UriHandlerActivity.onRequestPermissionResult(this, requestCode, grantResults);
|
||||
if (grantResults.length > 0) {
|
||||
if (allGranted(grantResults)) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
package eu.siacs.conversations.ui.adapter;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -15,6 +12,10 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -26,7 +27,7 @@ import eu.siacs.conversations.services.AvatarService;
|
|||
import eu.siacs.conversations.services.ImportBackupService;
|
||||
import eu.siacs.conversations.utils.BackupFileHeader;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class BackupFileAdapter extends RecyclerView.Adapter<BackupFileAdapter.BackupFileViewHolder> {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package eu.siacs.conversations.utils;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class PhoneNumberUtilWrapper {
|
||||
public static String toFormattedPhoneNumber(Context context, Jid jid) {
|
||||
throw new AssertionError("This method is not implemented in Conversations");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package eu.siacs.conversations.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.AccountConfiguration;
|
||||
import eu.siacs.conversations.persistance.DatabaseBackend;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.ui.EditAccountActivity;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class ProvisioningUtils {
|
||||
|
||||
public static void provision(final Activity activity, final String json) {
|
||||
final AccountConfiguration accountConfiguration;
|
||||
try {
|
||||
accountConfiguration = AccountConfiguration.parse(json);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
Toast.makeText(activity, R.string.improperly_formatted_provisioning, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
final Jid jid = accountConfiguration.getJid();
|
||||
final List<Jid> accounts = DatabaseBackend.getInstance(activity).getAccountJids(true);
|
||||
if (accounts.contains(jid)) {
|
||||
Toast.makeText(activity, R.string.account_already_exists, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
final Intent serviceIntent = new Intent(activity, XmppConnectionService.class);
|
||||
serviceIntent.setAction(XmppConnectionService.ACTION_PROVISION_ACCOUNT);
|
||||
serviceIntent.putExtra("address", jid.asBareJid().toEscapedString());
|
||||
serviceIntent.putExtra("password", accountConfiguration.password);
|
||||
Compatibility.startService(activity, serviceIntent);
|
||||
final Intent intent = new Intent(activity, EditAccountActivity.class);
|
||||
intent.putExtra("jid", jid.asBareJid().toEscapedString());
|
||||
intent.putExtra("init", true);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ import eu.siacs.conversations.ui.ManageAccountActivity;
|
|||
import eu.siacs.conversations.ui.PickServerActivity;
|
||||
import eu.siacs.conversations.ui.StartConversationActivity;
|
||||
import eu.siacs.conversations.ui.WelcomeActivity;
|
||||
import rocks.xmpp.addr.Jid;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class SignupUtils {
|
||||
|
||||
|
|
@ -24,9 +24,9 @@ public class SignupUtils {
|
|||
public static Intent getTokenRegistrationIntent(final Activity activity, Jid jid, String preAuth) {
|
||||
final Intent intent = new Intent(activity, MagicCreateActivity.class);
|
||||
if (jid.isDomainJid()) {
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_DOMAIN, jid.getDomain());
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_DOMAIN, jid.getDomain().toEscapedString());
|
||||
} else {
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_DOMAIN, jid.getDomain());
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_DOMAIN, jid.getDomain().toEscapedString());
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_USERNAME, jid.getEscapedLocal());
|
||||
}
|
||||
intent.putExtra(MagicCreateActivity.EXTRA_PRE_AUTH, preAuth);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?attr/color_background_primary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/in_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/invite"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tap_to_share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tap_share_button_send_invite"
|
||||
android:textAppearance="@style/TextAppearance.Conversations.Body1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/scan_the_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tap_to_share"
|
||||
android:layout_marginTop="24sp"
|
||||
android:text="@string/if_contact_is_nearby_use_qr"
|
||||
android:textAppearance="@style/TextAppearance.Conversations.Body1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/qr_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_above="@+id/share_button"
|
||||
android:layout_below="@id/scan_the_code"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="24sp"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/share_button"
|
||||
style="@style/Widget.Conversations.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:minWidth="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/share"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
|
@ -26,20 +26,20 @@
|
|||
|
||||
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_primary">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_primary"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
android:text="@string/restore_warning"
|
||||
android:textAppearance="@style/TextAppearance.Conversations.Body1"/>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/account_password_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -42,6 +42,6 @@
|
|||
android:textColor="?attr/edit_text_color"
|
||||
style="@style/Widget.Conversations.EditText"/>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<item
|
||||
android:id="@+id/action_share"
|
||||
android:icon="?attr/icon_share"
|
||||
android:title="@string/invite"
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
@ -1,16 +1,22 @@
|
|||
<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/action_scan_qr_code"
|
||||
android:title="@string/scan_qr_code"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="?attr/icon_scan_qr_code"
|
||||
android:orderInCategory="10"
|
||||
android:title="@string/scan_qr_code"
|
||||
android:visible="@bool/show_qr_code_scan"
|
||||
android:icon="?attr/icon_scan_qr_code"/>
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_account_with_cert"
|
||||
android:title="@string/action_add_account_with_certificate"
|
||||
android:visible="true"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_import_backup"
|
||||
app:showAsAction="never"
|
||||
android:title="@string/restore_backup"/>
|
||||
android:title="@string/restore_backup"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
@ -3,4 +3,18 @@
|
|||
<string name="pick_a_server">اختر مزود خدمة XMPP الخاص بك</string>
|
||||
<string name="use_chat.sum7.eu">استخدِم chat.sum7.eu</string>
|
||||
<string name="create_new_account">أنشئ حسابًا جديدًا</string>
|
||||
</resources>
|
||||
<string name="do_you_have_an_account">هل تملك حساب XMPP؟؟ قد يكون ذلك ممكنا لو كنت تستعمل خدمة XMPP أخرى أو إستعملت تطبيق كونفرسايشنز سابقا. أو يمكنك صنع حساب XMPP جديد الآن.
|
||||
ملاحظة: بعض خدمات البريد الإلكتروني تقدم حسابات XMPP.</string>
|
||||
<string name="server_select_text">XMPP هي خدمة مستقلة للتواصل بشبكة الرسائل المباشرة. يمكنك إستعمال هذه الخدمة مع أي خادم XMPP تختاره.
|
||||
سعيا لراحتك جعلنا خلق حساب في كونفيرسايشنز سهلا مع مقدم خدمة خاص بالإستعمال مع كونفيرسايشنز.</string>
|
||||
<string name="magic_create_text_on_x">لقد تمت دعوتك لـ %1$s. سيتم دلّك على طريقة صنع حساب.
|
||||
عندما تختار %1$sكمقدّم خدمة سيصبح من الممكن لك التواصل مع مستعملين من أي خادم آخر عن طريق إعطائهم عنوانك الكامل على XMPP.</string>
|
||||
<string name="magic_create_text_fixed">تمّت دعوتك إلى %1$s. تم إختيار إسم مستخدم خاص بك. سيتم قيادتك عبر طريقة صنع حساب.
|
||||
سيمكنك التواصل مع مستخدمين من مزودين آخرين عبر إعطائهم كامل عنوانك XMPP.</string>
|
||||
<string name="your_server_invitation">سيرفر دعوتك</string>
|
||||
<string name="improperly_formatted_provisioning">لم يتم التقاط الكود بطريقة جيّدة</string>
|
||||
<string name="tap_share_button_send_invite">إضغط على زر مشاركة لترسل إلى المتصل بك دعوة إلى %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">إذا كان المتصل بك قريبا منك، يمكنه فحص الكود بالأسفل ليقبل دعوتك.</string>
|
||||
<string name="easy_invite_share_text">إنظم %1$s وتحدّث معي: %2$s</string>
|
||||
<string name="share_invite_with">شارك إستدعاء مع...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -5,4 +5,13 @@
|
|||
<string name="create_new_account">Създаване не нов профил</string>
|
||||
<string name="do_you_have_an_account">Имате ли вече XMPP профил? Това може да се случи, ако вече използвате друг клиент на XMPP или сте използвали преди това Conversations. Ако не, можете да създадете нов XMPP профил в момента.\nСъвет: Някои доставчици на имейл също предоставят XMPP профили.
|
||||
</string>
|
||||
</resources>
|
||||
<string name="server_select_text">XMPP е мрежа за общуване чрез мигновени съобщения, която не е обвързана с конкретен доставчик. Можете да използвате клиента с всеки сървър, който работи с XMPP.\nЗа Ваше удобство, ние предоставяме лесен начин да си създадете профил в chat.sum7.eu — сървър, пригоден да работи добре с Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Бяхте поканен(а) в %1$s. Ще Ви преведем през процеса на създаване на акаунт.\nИзбирайки %1$s за доставчик, Вие ще можете да общувате и с потребители на други доставчици, като им предоставите своя пълен адрес за XMPP.</string>
|
||||
<string name="magic_create_text_fixed">Бяхте поканен(а) в %1$s. Вече Ви избрахме потребителско име. Ще Ви преведем през процеса на създаване на акаунт.\nЩе можете да общувате и с потребители на други доставчици, като им предоставите своя пълен адрес за XMPP.</string>
|
||||
<string name="your_server_invitation">Вашата покана за сървъра</string>
|
||||
<string name="improperly_formatted_provisioning">Неправилно форматиран код за достъп</string>
|
||||
<string name="tap_share_button_send_invite">Докоснете бутона за споделяне, за да изпратите на контакта си покана за %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Ако контактът Ви е наблизо, може да сканира кода по-долу, за да приеме поканата Ви.</string>
|
||||
<string name="easy_invite_share_text">Присъедини се в %1$s и си пиши с мен: %2$s</string>
|
||||
<string name="share_invite_with">Споделяне на поканата чрез…</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">XMPP সার্ভার নির্বাচন করুন</string>
|
||||
<string name="use_chat.sum7.eu">chat.sum7.eu ব্যবহার করা যাক</string>
|
||||
<string name="create_new_account">নতুন অ্যকাউন্ট তৈরী করা যাক</string>
|
||||
<string name="do_you_have_an_account">আপনার কি একটা XMPP অ্যকাউন্ট ইতিমধ্যে করা আছে? সেরকমটা হতেই পারে যদি এর আগে আপনি কোনো অন্য XMPP প্রোগ্রাম বা অ্যাপ ব্যবহার করে থাকেন। এই মুহুর্তে আরেকটা অ্যকাউন্ট তৈরী করা সম্ভব না।\nHint: মাঝে মাঝে ইমেল অ্যকাউন্ট খুললেও এরকম অ্যকাউন্ট নিজে থেকেই তৈরী হয়ে যায়।</string>
|
||||
<string name="server_select_text">XMPP কোনো একটি নির্দিষ্ট সংস্থার উপরে নির্ভরশীল নয়। এই অ্যপটি আপনি যেকোনো সংস্থার XMPP সার্ভারের সাথে ব্যবহার করতে পারেন।\nমনে রাখবেন, সুধুমাত্র আপনার সুবিধার্থেই chat.sum7.eu -এ আপনার জন্যে একটি অ্যকাউন্ট তৈরী করে দেওয়া হয়েছে। Conversations অ্যপটি এই সার্ভারের সাথে সবথেকে বেশী কার্যকারী।</string>
|
||||
<string name="magic_create_text_on_x">আপনাকে %1$s-এ আমন্ত্রিত করা হয়েছে। অ্যকাউন্ট তৈরী করার সময় আপনাকে সাহায্য করা হবে।\n%1$s ব্যবহার করলেও, অন্য সেবা-প্রদানকারী সংস্থার ব্যবহারকারীদের সাথে আপনি কথা বলতে পারবেন, আপনার সম্পূর্ণ XMPP অ্যড্রেস তাদেরকে বলে দিয়ে।</string>
|
||||
<string name="magic_create_text_fixed">আপনাকে %1$s-এ নিমন্ত্রণ করা হয়েছে। একটি username-ও আপনার জন্যে নির্দিষ্ট করে রাখা হয়েছে। অ্যকাউন্ট তৈরী করার সময় আপনাকে সাহায্য করা হবে।\nঅন্য XMPP সেবা প্রদানকারী সংস্থার ব্যবহারকারীদের সাথে আপনিও কথা বলতে পারবেন, আপনার সম্পূর্ণ XMPP অ্যড্রেস তাদেরকে বলে দিয়ে।</string>
|
||||
<string name="your_server_invitation">আপনার নিমন্ত্রণপত্র, সার্ভার থেকে</string>
|
||||
<string name="improperly_formatted_provisioning">Provisioning code-এ গরমিল আছে</string>
|
||||
<string name="tap_share_button_send_invite">Share বোতামটা টিপে %1$s-কে একটি আমন্ত্রপত্র পাঠান</string>
|
||||
<string name="if_contact_is_nearby_use_qr">পরিচিত ব্যক্তি যদি নিকটেই থাকেন, তাহলে তারা এই কোডটাও স্ক্যান করে নিতে পারেন</string>
|
||||
<string name="easy_invite_share_text">%1$sতে এসো, আর আমার সাথে কথা বলো: %2$s</string>
|
||||
<string name="share_invite_with">একটি আমন্ত্রণপত্র দেওয়া যাক...</string>
|
||||
</resources>
|
||||
|
|
@ -2,4 +2,16 @@
|
|||
<resources>
|
||||
<string name="pick_a_server">Triï el seu proveïdor de XMPP
|
||||
</string>
|
||||
</resources>
|
||||
<string name="use_chat.sum7.eu">Fer servir chat.sum7.eu</string>
|
||||
<string name="create_new_account">Crear un compte nou</string>
|
||||
<string name="do_you_have_an_account">Ja tens un compte XMPP? Aquest podria ser el cas si ja estàs usant un client XMPP diferent o has usat Converses abans. Si no, pots crear un nou compte XMPP ara mateix.\nPista: Alguns proveïdors de correu electrònic també proporcionen comptes XMPP.</string>
|
||||
<string name="server_select_text">XMPP és una xarxa de missatgeria instantània independent del proveïdor. Pots usar aquest client amb qualsevol servidor XMPP que triïs. No obstant això, per a la teva conveniència, hem fet fàcil la creació d\'un compte en Conversaciones.im¹; un proveïdor especialment adequat per a l\'ús amb Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Has estat convidat a %1$s. Et guiarem a través del procés de creació d\'un compte.\nEn triar%1$s com a proveïdor podràs comunicar-se amb els usuaris d\'altres proveïdors donant-los la seva adreça XMPP completa.</string>
|
||||
<string name="magic_create_text_fixed">Has estat convidat a %1$s . Ja s\'ha triat un nom d\'usuari per a tu. Et guiarem en el procés de creació d\'un compte. Podràs comunicar-te amb usuaris d\'altres proveïdors donant-los la teva adreça XMPP completa.</string>
|
||||
<string name="your_server_invitation">La teva invitació al servidor</string>
|
||||
<string name="improperly_formatted_provisioning">Codi d\'aprovisionament mal formatat</string>
|
||||
<string name="tap_share_button_send_invite">Toca el botó de compartir per a enviar al teu contacte una invitació a %1$s .</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Si el teu contacte està a prop, també pot escanejar el codi de baix per a acceptar la teva invitació.</string>
|
||||
<string name="easy_invite_share_text">Uneix-te %1$s i xerra amb mi: %2$s</string>
|
||||
<string name="share_invite_with">Comparteix la invitació amb...</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Vælg din XMPP-udbyder</string>
|
||||
<string name="use_chat.sum7.eu">Brug chat.sum7.eu</string>
|
||||
<string name="create_new_account">Opret ny konto</string>
|
||||
<string name="do_you_have_an_account">Har du allerede en XMPP-konto? Dette kan være tilfældet, hvis du allerede bruger en anden XMPP-klient eller har brugt Conversations før. Hvis ikke, kan du lige nu oprette en ny XMPP-konto.\nTip: Nogle e-mail-udbydere leverer også XMPP-konti.</string>
|
||||
<string name="server_select_text">XMPP er et udbyderuafhængigt onlinemeddelelsesnetværk. Du kan bruge denne klient med hvilken XMPP-server du end vælger.\nMen for din nemhedsskyld har vi gjort vi det let at oprette en konto på chat.sum7.eu; en udbyder, der er specielt velegnet til brug med Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Du er blevet inviteret til %1$s. Vi guider dig gennem processen med at oprette en konto.\nNår du vælger %1$s som udbyder, kan du kommunikere med brugere fra andre udbydere ved at give dem din fulde XMPP-adresse.</string>
|
||||
<string name="magic_create_text_fixed">Du er blevet inviteret til %1$s. Der er allerede valgt et brugernavn til dig. Vi guider dig gennem processen med at oprette en konto.\nDu vil være i stand til at kommunikere med brugere fra andre udbydere ved at give dem din fulde XMPP-adresse.</string>
|
||||
<string name="your_server_invitation">Din server invitation</string>
|
||||
<string name="improperly_formatted_provisioning">Forkert formateret klargøringskode</string>
|
||||
<string name="tap_share_button_send_invite">Tryk på deleknappen for at sende din kontakt en invitation til %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Hvis din kontakt er i nærheden, kan de også skanne koden nedenfor for at acceptere din invitation.</string>
|
||||
<string name="easy_invite_share_text">Deltag med %1$s og chat med mig: %2$s</string>
|
||||
<string name="share_invite_with">Del invitation med...</string>
|
||||
</resources>
|
||||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Du wurdest zu %1$s eingeladen. Wir führen dich durch den Prozess der Kontoerstellung.\nWenn du %1$s als Provider wählst, kannst du mit Nutzern anderer Anbieter kommunizieren, indem du ihnen deine vollständige XMPP-Adresse gibst.</string>
|
||||
<string name="magic_create_text_fixed">Du wurdest zu %1$seingeladen. Ein Benutzername ist bereits für dich ausgewählt worden. Wir führen dich durch den Prozess der Kontoerstellung.\nDu kannst mit Nutzern anderer Anbieter kommunizieren, indem du ihnen deine vollständige XMPP-Adresse gibst.</string>
|
||||
<string name="your_server_invitation">Deine Einladung für den Server</string>
|
||||
<string name="improperly_formatted_provisioning">Falsch formatierter Provisionierungscode</string>
|
||||
<string name="tap_share_button_send_invite">Tippe auf die \"Teilen\"-Schaltfläche, um deinem Kontakt eine Einladung an %1$s zu senden.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Wenn dein Kontakt in der Nähe ist, kann er auch den untenstehenden Code einscannen, um deine Einladung anzunehmen.</string>
|
||||
<string name="easy_invite_share_text">Komme zu %1$s und chatte mit mir: %2$s</string>
|
||||
<string name="share_invite_with">Einladung teilen mit…</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@
|
|||
<string name="create_new_account">Δημιουργία νέου λογαριασμού</string>
|
||||
<string name="do_you_have_an_account">Έχετε ήδη λογαριασμό XMPP; Αυτό μπορεί να συμβαίνει αν ήδη χρησιμοποιείτε ένα άλλο πρόγραμμα XMPP ή έχετε χρησιμοποιήσει το Conversations παλιότερα. Αν όχι, μπορείτε να δημιουργήσετε ένα νέο λογαριασμό XMPP τώρα.\nΧρήσιμη πληροφορία: Κάποιοι πάροχοι e-mail παρέχουν επίσης και λογαριασμούς XMPP.</string>
|
||||
<string name="server_select_text">Το XMPP είναι ένα δίκτυο άμεσης ανταλλαγής μηνυμάτων ανεξάρτητο παρόχου. Μπορείτε να χρησιμοποιήσετε αυτό το πρόγραμμα με όποιον διακομιστή XMPP επιθυμείτε.\nΓια διευκόλυνση πάντως μπορείτε να δημιουργήσετε έναν λογαριασμό στο chat.sum7.eu, έναν πάροχο ειδικά σχεδιασμένο για χρήση με το Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Έχετε προσκληθεί στο %1$s. Ένα όνομα χρήστη έχει ήδη επιλεγεί για εσάς. Θα σας καθοδηγήσουμε στη διαδικασία δημιουργίας λογαριασμού.\nΕπιλέγοντας τον %1$s ως πάροχο θα μπορείτε να επικοινωνείτε με χρήστες άλλων παρόχων δίνοντάς τους την πλήρη διεύθυνση XMPP σας.</string>
|
||||
<string name="magic_create_text_on_x">Έχετε προσκληθεί στο %1$s. Θα σας καθοδηγήσουμε στη διαδικασία δημιουργίας λογαριασμού.\nΕπιλέγοντας τον %1$s ως πάροχο θα μπορείτε να επικοινωνείτε με χρήστες άλλων παρόχων δίνοντάς τους την πλήρη διεύθυνση XMPP σας.</string>
|
||||
<string name="magic_create_text_fixed">Έχετε προσκληθεί στο %1$s. Ένα όνομα χρήστη έχει ήδη επιλεγεί για εσάς. Θα σας καθοδηγήσουμε στη διαδικασία δημιουργίας λογαριασμού.\nΘα μπορείτε να επικοινωνείτε με χρήστες άλλων παρόχων δίνοντάς τους την πλήρη διεύθυνση XMPP σας.</string>
|
||||
<string name="your_server_invitation">Η πρόσκλησή σας στον διακομιστή</string>
|
||||
<string name="improperly_formatted_provisioning">Λάθος μορφοποίηση κώδικα παροχής</string>
|
||||
<string name="tap_share_button_send_invite">Πατήστε το πλήκτρο διαμοιρασμού για να στείλετε στην επαφή σας μια πρόσκληση στο %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Αν η επαφή σας βρίσκεται κοντά σας, μπορεί επίσης να σαρώσει τον κωδικό παρακάτω για να αποδεχτεί την πρόσκλησή σας.</string>
|
||||
<string name="easy_invite_share_text">Μπείτε στο %1$s και συνομιλήστε μαζί μου: %2$s</string>
|
||||
<string name="share_invite_with">Διαμοιρασμός πρόσκλησης με...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Has sido invitado a %1$s. Te guiaremos durante el proceso de creación de la cuenta.\nCuando selecciones %1$s como proveedor podrás comunicarte con usuarios de otros servidores proporcionándoles tu dirección XMPP completa. </string>
|
||||
<string name="magic_create_text_fixed">Has sido invitado a %1$s. Un nombre de usuario ya ha sido escogido para ti. Te guiaremos durante el proceso de creación de la cuenta.\nPodrás comunicarte con otros usuarios de otros servidores proporcionándoles tu dirección XMPP completa. </string>
|
||||
<string name="your_server_invitation">Tu invitación al servidor</string>
|
||||
<string name="improperly_formatted_provisioning">Código de abastecimiento formateado incorrectamente</string>
|
||||
<string name="tap_share_button_send_invite">Pulsa el botón de compartir para enviar a tu contacto una invitación a %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Si tu contacto está cerca, también puede escanear el código mostrado debajo para aceptar tu invitación.</string>
|
||||
<string name="easy_invite_share_text">Únete a %1$s y chatea conmigo: %2$s</string>
|
||||
<string name="share_invite_with">Compartir invitación con...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">لطفا سرویس دهنده پیام خود را انتخاب نمائید. برای مثال artalk.im</string>
|
||||
<string name="use_conversations.im">از Conversations.im استفاده کنید</string>
|
||||
<string name="use_chat.sum7.eu">از Conversations.im استفاده کنید</string>
|
||||
<string name="create_new_account">حساب کاربری جدیدی بسازید</string>
|
||||
</resources>
|
||||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Vous avez été invité à %1$s. Nous allons vous guider à travers le processus de création d’un compte.\nEn choisissant %1$s comme fournisseur, vous pourrez communiquer avec les utilisateurs des autres fournisseurs en leur donnant votre adresse XMPP complète.</string>
|
||||
<string name="magic_create_text_fixed">Vous avez été invité à %1$s. Un nom d’utilisateur a déjà été choisi pour vous. Nous allons vous guider à travers le processus de création d’un compte.\nVous pourrez communiquer avec les utilisateurs des autres fournisseurs en leur donnant votre adresse XMPP complète.</string>
|
||||
<string name="your_server_invitation">Votre invitation au serveur</string>
|
||||
<string name="improperly_formatted_provisioning">Code de provisionnement mal formaté</string>
|
||||
<string name="tap_share_button_send_invite">Appuyez sur le bouton partager pour envoyer à votre contact une invitation pour %1$s</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Si vos contacts sont à votre côté, ils peuvent aussi scanner le code ci dessous pour accepter votre invitation</string>
|
||||
<string name="easy_invite_share_text">Rejoignez %1$set discutez avec moi : %2$s</string>
|
||||
<string name="share_invite_with">Partager une invitation avec ...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Convidáronte a %1$s. Guiarémoste no proceso para crear unha conta.\nAo escoller %1$s como provedor poderás comunicarte con usuarias de outros provedores cando lles deas o teu enderezo XMPP completo.</string>
|
||||
<string name="magic_create_text_fixed">Convidáronte a %1$s. Escollemos un nome de usuaria por ti. Guiarémoste no proceso de crear unha conta.\nPoderás comunicarte con usuarias de outros provedores cando lles digas o teu enderezo XMPP completo.</string>
|
||||
<string name="your_server_invitation">O convite do teu servidor</string>
|
||||
<string name="improperly_formatted_provisioning">Código de aprovisionamento con formato non válido</string>
|
||||
<string name="tap_share_button_send_invite">Toca no botón compartir para convidar ó teu contacto a %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Se o contacto está preto de ti, pode escanear o código inferior para aceptar o teu convite.</string>
|
||||
<string name="easy_invite_share_text">Únete a %1$s e conversa conmigo: %2$s</string>
|
||||
<string name="share_invite_with">Enviar convite a...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Meghívást kapott a(z) %1$s kiszolgálóra. Végig fogjuk vezetni egy fiók létrehozásának folyamatán.\nHa a(z) %1$s kiszolgálót választja szolgáltatóként, akkor képes lesz más szolgáltatók felhasználóival is kommunikálni, ha megadja nekik a teljes XMPP-címét.</string>
|
||||
<string name="magic_create_text_fixed">Meghívást kapott a(z) %1$s kiszolgálóra. Már kiválasztottak Önnek egy felhasználónevet. Végig fogjuk vezetni egy fiók létrehozásának folyamatán.\nKépes lesz más szolgáltatók felhasználóival is kommunikálni, ha megadja nekik a teljes XMPP-címét.</string>
|
||||
<string name="your_server_invitation">Az Ön kiszolgálómeghívása</string>
|
||||
<string name="improperly_formatted_provisioning">Helytelenül formázott kiépítési kód</string>
|
||||
<string name="tap_share_button_send_invite">Koppintson a megosztás gombra, hogy meghívót küldjön a partnerének erre: %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Ha a partnere a közelben van, akkor a meghívás elfogadásához leolvashatja a lenti kódot.</string>
|
||||
<string name="easy_invite_share_text">Csatlakozzon ehhez: %1$s, és csevegjen velem: %2$s</string>
|
||||
<string name="share_invite_with">Meghívás megosztása…</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Pilih XMPP server anda</string>
|
||||
<string name="use_chat.sum7.eu">Gunakan chat.sum7.eu</string>
|
||||
<string name="create_new_account">Buat akun baru</string>
|
||||
<string name="do_you_have_an_account">Anda sudah memiliki akun XMPP? Ini mungkin terjadi jika Anda sudah menggunakan aplikasi XMPP yang berbeda atau pernah menggunakan Conversations sebelumnya. Jika tidak, Anda dapat membuat akun XMPP baru. \ NPetunjuk: Beberapa penyedia layanan email juga menyediakan akun XMPP.</string>
|
||||
<string name="server_select_text">XMPP adalah jaringan penyedia pesan instan independen. Anda dapat menggunakan aplikasi ini dengan server XMPP pilihan Anda. \ NNamun demi kenyamanan Anda, kami permudah untuk membuat akun di Conversations.im¹; provider yang sangat cocok digunakan dengan Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Anda telah diundang ke %1$s. Kami akan memandu Anda melalui proses pembuatan akun. \nSaat memilih %1$s sebagai penyedia, Anda akan dapat berkomunikasi dengan pengguna provider lain dengan memberikan alamat XMPP lengkap Anda kepada mereka.</string>
|
||||
<string name="magic_create_text_fixed">Anda telah diundang ke%1$s. Username telah dipilihkan untuk Anda. Kami akan memandu Anda melalui proses pembuatan akun. \nAnda dapat berkomunikasi dengan pengguna provider lain dengan memberi mereka alamat XMPP lengkap Anda.</string>
|
||||
<string name="your_server_invitation">Undangan server Anda</string>
|
||||
<string name="improperly_formatted_provisioning">Kode provisioning tidak diformat dengan benar</string>
|
||||
<string name="tap_share_button_send_invite">Klik tombol bagikan untuk mengirim undangan ke kontak Anda %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Jika kontak Anda di dekat Anda, mereka juga dapat memindai kode di bawah ini untuk menerima undangan Anda</string>
|
||||
<string name="easy_invite_share_text">Bergabung %1$s dan mengobrol dengan saya: %2$s</string>
|
||||
<string name="share_invite_with">Bagikan undangan dengan...</string>
|
||||
</resources>
|
||||
|
|
@ -1,13 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Scegli il tuo provider XMPP</string>
|
||||
<string name="pick_a_server">Scegli il tuo fornitore XMPP</string>
|
||||
<string name="use_chat.sum7.eu">Usa chat.sum7.eu</string>
|
||||
<string name="create_new_account">Crea un nuovo account</string>
|
||||
<string name="do_you_have_an_account">Possiedi già un account XMPP? Questo succede se stai già usando un diverso client XMPP o hai già usato prima Conversations. In caso negativo puoi creare un account XMPP adesso.
|
||||
<string name="create_new_account">Crea un nuovo profilo</string>
|
||||
<string name="do_you_have_an_account">Possiedi già un profilo XMPP? Questo succede se stai già usando un diverso client XMPP o hai già usato prima Conversations. In caso negativo puoi creare un profilo XMPP adesso.
|
||||
Suggerimento: alcuni provider di email forniscono anche un account XMPP.</string>
|
||||
<string name="server_select_text">XMPP è una rete di instant messaging indipendente dal provider. Puoi usare questo client con qualsiasi server XMPP.
|
||||
In ogni caso per facilitare puoi creare facilmente un account su chat.sum7.eu, un provider pensato apposta per essere usato con Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Sei stato invitato su %1$s. Ti guideremo nel procedimento per creare un account.\nQuando scegli %1$s come fornitore sarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
|
||||
<string name="magic_create_text_fixed">Sei stato invitato su %1$s. È già stato scelto un nome utente per te. Ti guideremo nel procedimento per creare un account.\nSarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
|
||||
<string name="server_select_text">XMPP è una rete di messaggistica istantanea indipendente dal fornitore. Puoi usare questo client con qualsiasi server XMPP.
|
||||
In ogni caso per facilitare puoi creare facilmente un account su chat.sum7.eu, un fornitore pensato apposta per essere usato con Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Hai ricevuto un invito per %1$s. Ti guideremo nel procedimento per creare un profilo.\nQuando scegli %1$s come fornitore sarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
|
||||
<string name="magic_create_text_fixed">Hai ricevuto un invito per %1$s. È già stato scelto un nome utente per te. Ti guideremo nel procedimento per creare un profilo.\nSarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
|
||||
<string name="your_server_invitation">Il tuo invito al server</string>
|
||||
<string name="improperly_formatted_provisioning">Codice di approvvigionamento formattato male</string>
|
||||
<string name="tap_share_button_send_invite">Tocca il pulsante condividi per inviare al contatto un invito per %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Se il contatto è vicino, può anche scansionare il codice sottostante per accettare il tuo invito.</string>
|
||||
<string name="easy_invite_share_text">Unisciti a %1$s e chatta con me: %2$s</string>
|
||||
<string name="share_invite_with">Condividi invito con...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">XMPP プロバイダーを選択してください</string>
|
||||
<string name="use_chat.sum7.eu">chat.sum7.eu を利用する</string>
|
||||
<string name="create_new_account">新規アカウントを作成</string>
|
||||
<string name="do_you_have_an_account">XMPP アカウントをお持ちですか?既にほかの XMPP クライアントを利用しているか、 Conversations を利用したことがある場合はこちら。初めての方は、今すぐ新規 XMPP アカウントを作成できます。\nヒント: e メールのプロバイダーが XMPP アカウントも提供している場合があります。</string>
|
||||
<string name="server_select_text">XMPP は、プロバイダーに依存しないインスタントメッセージのプロトコルです。 XMPP サーバーならどこでも、このクライアントを使用することができます。\nよろしければ、 Conversations に最適化されたプロバイダー chat.sum7.eu で簡単にアカウントを作成することもできます。</string>
|
||||
<string name="magic_create_text_on_x">%1$s へ招待されました。アカウント作成手順をご案内します。 \n%1$s をプロバイダーに選択してほかのプロバイダーのユーザーと会話するには、 XMPP のフルアドレスを相手にお知らせください。</string>
|
||||
<string name="magic_create_text_fixed">%1$s へ招待されました。ユーザー名は既に選択されています。アカウント作成手順をご案内します。 \nほかのプロバイダーのユーザーと会話するには、 XMPP のフルアドレスを相手にお知らせください。</string>
|
||||
<string name="your_server_invitation">サーバーの招待</string>
|
||||
<string name="improperly_formatted_provisioning">仮コードの書式が不正です</string>
|
||||
<string name="tap_share_button_send_invite">共有ボタンを叩いて、連絡先の %1$s に招待を送信する。</string>
|
||||
<string name="if_contact_is_nearby_use_qr">あなたの連絡先が近くにいる場合は、下のコードをスキャンして、あなたの招待を受け取ることもできます。</string>
|
||||
<string name="easy_invite_share_text">%1$s に参加して私とお話しましょう: %2$s</string>
|
||||
<string name="share_invite_with">…で招待を共有</string>
|
||||
</resources>
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
<string name="magic_create_text_on_x">Je ontving een uitnodiging voor %1$s. We zullen je helpen een account aan te maken.\nWanneer je %1$s als je provider kiest kan je met gebruikers van andere providers communiceren door hen je volledige XMPP-adres te geven.</string>
|
||||
<string name="magic_create_text_fixed">Je ontving een uitnodiging voor %1$s. Er werd reeds een gebruikersnaam voor jou gekozen. We zullen je helpen een account aan te maken.\nJe zal met gebruikers van andere providers communiceren door hen je volledige XMPP-adres te geven.</string>
|
||||
<string name="your_server_invitation">Je server uitnodiging</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Zostałeś zaproszony do %1$s. Poprowadzimy ciebie przez proces tworzenia konta.\nWybierając %1$s jako dostawcę będziesz mógł komunikować się z innymi użytkownikami podając swój pełny adres XMPP.</string>
|
||||
<string name="magic_create_text_fixed">Zostałeś zaproszony do %1$s. Nazwa użytkownika została już dla ciebie wybrana. Poprowadzimy ciebie przez proces tworzenia konta.\nBęziesz mógł komunikować się z innymi użytkownikami podając swój adres XMPP.</string>
|
||||
<string name="your_server_invitation">Zaproszenie twojego serwera</string>
|
||||
<string name="improperly_formatted_provisioning">Niepoprawnie sformatowany kod zaopatrywania</string>
|
||||
<string name="tap_share_button_send_invite">Użyj przycisku udostępniania aby wysłać swojemu kontaktowi zaproszenie do %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Jeśli twój kontakt jest blisko może przeskanować kod poniżej aby zaakceptować twoje zaproszenie.</string>
|
||||
<string name="easy_invite_share_text">Dołącz do %1$s aby porozmawiać ze mną: %2$s</string>
|
||||
<string name="share_invite_with">Udostępnij zaproszenie...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Você foi convidado para %1$s. Nós iremos guiá-lo ao longo do processo de criação de uma conta.\nAo escolher %1$s como um provedor você conseguirá se comunicar com usuários de outros provedores dando a eles seu endereço XMPP completo.</string>
|
||||
<string name="magic_create_text_fixed">Você foi convidado para %1$s. Um nome de usuário já foi escolhido para você. Nós iremos guiá-lo ao longo do processo de criação de uma conta.\nVocê conseguirá se comunicar com usuários de outros provedores dando a eles seu endereço XMPP completo.</string>
|
||||
<string name="your_server_invitation">Seu convite do servidor</string>
|
||||
<string name="improperly_formatted_provisioning">Código de provisionamento formatado de maneira imprópria</string>
|
||||
<string name="tap_share_button_send_invite">Toque no botão compartilhar para enviar, para seu contato, um convite para %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Se seu contato estiver por perto, ele também pode escanear o código abaixo para aceitar seu convite.</string>
|
||||
<string name="easy_invite_share_text">Junte-se a %1$s e converse comigo: %2$s</string>
|
||||
<string name="share_invite_with">Compartilhe o convite com...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">Ați fost invitați la %1$s. Vă vom ghida prin procesul de creare al unui cont.\nCând alegeți %1$s ca furnizor veți putea comunica cu utilizatorii altor furnizori oferindu-le adresa dumneavoastră completă XMPP.</string>
|
||||
<string name="magic_create_text_fixed">Ați fost invitați la %1$s. Un nume de utilizator a fost deja ales pentru dumneavoastră. Vă vom ghida prin procesul de creare al unui cont.\nVeți putea comunica cu utilizatorii altor furnizori oferindu-le adresa dumneavoastră completă XMPP.</string>
|
||||
<string name="your_server_invitation">Invitația serverului dumneavoastră</string>
|
||||
<string name="improperly_formatted_provisioning">Cod de acces formatat necorespunzător</string>
|
||||
<string name="tap_share_button_send_invite">Atingeți butonul de partajare pentru a trimite contactului o invitație la %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Dacă e în apropiere, contactul poate scana codul de mai jos pentru a vă accepta invitația.</string>
|
||||
<string name="easy_invite_share_text">Alătură-te %1$s și discută cu mine: %2$s</string>
|
||||
<string name="share_invite_with">Partajează invitația cu…</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -3,4 +3,14 @@
|
|||
<string name="pick_a_server">Выберите своего XMPP-провайдера</string>
|
||||
<string name="use_chat.sum7.eu">Использовать chat.sum7.eu</string>
|
||||
<string name="create_new_account">Создать новый аккаунт</string>
|
||||
</resources>
|
||||
<string name="do_you_have_an_account">У вас есть аккаунт XMPP? Если вы использовали Conversations или другой XMPP-клиент в прошлом, то скорее всего, он у вас есть. Если у вас нет аккаунта, вы можете создать его прямо сейчас.\nНекоторые провайдеры электронной почты также регистрируют аккаунты XMPP. </string>
|
||||
<string name="server_select_text">XMPP - это независимая сеть обмена сообщениями. Conversations позволяет вам подключиться к любому XMPP-серверу на ваш выбор.\nЕсли у вас нет сервера, предлагаем вам зарегистрировать аккаунт на chat.sum7.eu, сервере, специально предназначенном для работы с Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Вас пригласили на %1$s. Мы проведём вас через процесс создания аккаунта. Аккаунт на %1$s позволит вам общаться с пользователями и на этом, и на других серверах, используя ваш полный XMPP-адрес.</string>
|
||||
<string name="magic_create_text_fixed">Вас пригласили на %1$s. Вам уже назначили имя пользователя. Мы проведём вас через процесс создания аккаунта. Этот аккаунт позволит вам общаться с пользователями и на этом, и на других серверах, используя ваш полный XMPP-адрес.</string>
|
||||
<string name="your_server_invitation">Ваше приглашение</string>
|
||||
<string name="improperly_formatted_provisioning">Неправильный формат кода</string>
|
||||
<string name="tap_share_button_send_invite">Нажмите кнопку «Поделиться», чтобы отправить вашему контакту приглашение в %1$s.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Если ваш контакт находится поблизости, он также может отсканировать приведенный ниже код, чтобы принять ваше приглашение.</string>
|
||||
<string name="easy_invite_share_text">Присоединяйтесь к %1$s и пообщайтесь со мной: %2$s</string>
|
||||
<string name="share_invite_with">Поделиться приглашением с…</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Vyberte si svojho XMPP poskytovateľa</string>
|
||||
<string name="use_chat.sum7.eu">Použiť chat.sum7.eu</string>
|
||||
<string name="create_new_account">Vytvoriť nové konto</string>
|
||||
<string name="do_you_have_an_account">Máte už svoje XMPP konto? Môže to tak byť v prípade, že už používate iného klienta XMPP alebo ste predtým používali Conversations. Ak nie, môžete si vytvoriť nové XMPP konto práve teraz.\nHint: Niektorí poskytovatelia emailu zároveň poskytujú aj XMPP kontá.</string>
|
||||
<string name="server_select_text">XMPP je sieť pre okamžité správy nezávislá od poskytovateľa. Tohto klienta môžete používať s akýmkoľvek XMPP serverom, ktorý si vyberiete..\nAvšak pre vaše pohodlie sme zjednodušili vytvorenie konta na chat.sum7.eu; poskytovateľ špeciálne vhodný na používanie s Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Boli ste pozvaný do %1$s. Prevedieme vás procesom vytvorenia konta..\nPo výbere %1$s ako poskytovateľa, budete môcť komunikovať s užívateľmi iných poskytovateľov tak, že im dáte vašu úplnú XMPP adresu.</string>
|
||||
<string name="magic_create_text_fixed">Boli ste pozvaný do %1$s . Užívateľské meno vám už bolo vopred vybrané. Prevedieme vás procesom vytvorenia konta..\nBudete môcť komunikovať s užívateľmi iných poskytovateľov tak, že im dáte vašu úplnú XMPP adresu.</string>
|
||||
<string name="tap_share_button_send_invite">Ťuknite na tlačidlo zdieľať na odoslanie pozvánky do %1$s vášmu kontaktu.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Ak je váš kontakt blízko, na prijatie vašej pozvánky si môže nasnímať kód nižšie.</string>
|
||||
<string name="easy_invite_share_text">Pripojte sa k %1$sa rozprávajte sa so mnou: %2$s</string>
|
||||
<string name="share_invite_with">Zdieľať pozvánku s...</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Одаберите вашег ИксМПП провајдера</string>
|
||||
<string name="use_chat.sum7.eu">Користи chat.sum7.eu</string>
|
||||
<string name="create_new_account">Направи нови налог</string>
|
||||
<string name="do_you_have_an_account">Да ли већ имате ИксМПП налог? Извесно је да га имате ако користите неки ИксМПП клијент или сте раније користили Конверзацију. Ако немате, сада можете направити нови ИксМПП налог.\nСавет: неки поштански провајдери такође омогућавају и ИксМПП налоге.</string>
|
||||
<string name="server_select_text">ИксМПП је мрежа брзих порука, независна од провајдера. Овај клијент можете користити уз било који сервер по вашем избору.\nДа бисмо вам олакшали, омогућили смо креирање налога на chat.sum7.eu; провајдеру специјално прилаг.ођеном за коришћење уз Конверзацију</string>
|
||||
<string name="your_server_invitation">Ваша серверска позивница</string>
|
||||
</resources>
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Välj din XMPP leverantör</string>
|
||||
<string name="use_chat.sum7.eu">Använd chat.sum7.eu</string>
|
||||
<string name="create_new_account">Skapa nytt konto</string>
|
||||
</resources>
|
||||
<string name="your_server_invitation">Din server inbjudan</string>
|
||||
<string name="share_invite_with">Dela inbjudan med...</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">XMPP sağlayıcınızı seçin</string>
|
||||
<string name="use_chat.sum7.eu">chat.sum7.eu kullan</string>
|
||||
<string name="create_new_account">Yeni hesap oluştur</string>
|
||||
<string name="do_you_have_an_account">Zaten bir XMPP hesabınız var mı? Bunun sebebi, zaten başka bir XMPP istemcisi kullanıyor oluşunuz veya Conversations\'ı önceden kullanmış olmanız olabilir. Eğer durum bu değilse şimdi yeni bir XMPP hesabı oluşturabilirsiniz.\nİpucu: Bağzı e-posta sağlayıcıları da XMPP hesapları kullanabilir.</string>
|
||||
<string name="server_select_text">XMPP; anlık yazışmalar için bağımsız bir sağlayıcıdır. Bu istemciyi istediğiniz herhangi bir XMPP sunucusu ile birlikte kullanabilirsiniz.\nAncak kullanım rahatlığı adına sizin için chat.sum7.eu; Conversations için özellikle tasarlanmış bir sağlayıcıda hesap açmanızı kolaylaştırdık.</string>
|
||||
<string name="magic_create_text_on_x">%1$s sağlayıcısına davet edildiniz. Sizi hesap oluşturulması konusunda yönlendireceğiz.\n%1$s bir sağlayıcı olark seçildiğinde, başka sağlayıcılar kullanan kullanıcılarla, onlara tam XMPP adresinizi vererek iletişim kurabileceksiniz.</string>
|
||||
<string name="magic_create_text_fixed">%1$s sağlayıcısına davet edildiniz. Sizin için zaten bir kullanıcı adı seçildi. Sizi hesap oluşturulması konusunda yönlendireceğiz.\nBaşka sağlayıcılar kullanan kullanıcılarla, onlara tam XMPP adresinizi vererek iletişim kurabileceksiniz.</string>
|
||||
<string name="your_server_invitation">Sunucu davetiyeniz</string>
|
||||
<string name="improperly_formatted_provisioning">Yanlış ayarlanmış düzenleme kodu</string>
|
||||
<string name="tap_share_button_send_invite">Kişinize, %1$s grubuna davet etmek için Paylaş düğmesine basın.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Kişiniz yakınınızda ise, aşağıdaki kodu tarayak daveti kabul edebilirler.</string>
|
||||
<string name="easy_invite_share_text">%1$s grubuna katıl ve benimle sohpet et: %2$s</string>
|
||||
<string name="share_invite_with">Daveti şununla paylaş...</string>
|
||||
</resources>
|
||||
|
|
@ -3,9 +3,10 @@
|
|||
<string name="pick_a_server">Виберіть постачальника послуг обміну повідомленнями XMPP</string>
|
||||
<string name="use_chat.sum7.eu">Скористатися chat.sum7.eu</string>
|
||||
<string name="create_new_account">Створити новий обліковий запис</string>
|
||||
<string name="do_you_have_an_account">Вже маєте обліковий запис XMPP? Можливо, користуєтеся іншою програмою XMPP або користувалися цією програмою раніше. Якщо ні, можете створити новий обліковий запис XMPP просто зараз.\nЗверніть увагу: Деякі постачальники електронної пошти водночас надають облікові записи XMPP.</string>
|
||||
<string name="server_select_text">XMPP — це мережа обміну повідомленнями, незалежна від постачальників. Можете використовувати цю програму з будь-яким XMPP сервером, який оберете.\nПроте, для зручності, ми спростили створення облікового запису на chat.sum7.eu — в постачальника, який спеціально налаштований на роботу з цією програмою.</string>
|
||||
<string name="magic_create_text_on_x">Вас запросили до %1$s. Ми проведемо Вас крок за кроком, щоб створити обліковий запис.\nОбираючи %1$s в якості свого постачальника, Ви зможете спілкуватися з користувачами інших постачальників, повідомивши їм свою повну адресу XMPP.</string>
|
||||
<string name="magic_create_text_fixed">Вас запросили до %1$s. Для Вас уже обрали ім\'я користувача. Ми проведемо Вас крок за кроком, щоб створити обліковий запис.\nВи зможете спілкуватися з користувачами інших постачальників, повідомивши їм свою повну адресу XMPP.</string>
|
||||
<string name="do_you_have_an_account">Вже маєте обліковий запис XMPP? Можливо, користуєтеся іншою програмою XMPP або користувалися цією програмою раніше. Якщо ні, можете створити новий обліковий запис XMPP просто зараз.\nЗверніть увагу, що деякі постачальники електронної пошти у той же час надають облікові записи XMPP.</string>
|
||||
<string name="server_select_text">XMPP — це мережа обміну повідомленнями, незалежна від постачальників. Можете використовувати цю програму з будь-яким XMPP сервером, який оберете.\nПроте, для зручності, ми спростили створення облікового запису на chat.sum7.eu — у постачальника, який спеціально налаштований на роботу з цією програмою.</string>
|
||||
<string name="magic_create_text_on_x">Вас запросили до %1$s. Ми проведемо вас крок за кроком, щоб створити обліковий запис.\nОбираючи %1$s в якості свого постачальника, ви зможете спілкуватися з користувачами інших постачальників, для цього повідомте їм свою повну адресу XMPP.</string>
|
||||
<string name="magic_create_text_fixed">Вас запросили до %1$s. Для вас створено ім\'я користувача. Ми проведемо вас крок за кроком, щоб створити обліковий запис.\nВи зможете спілкуватися з користувачами інших постачальників, для цього повідомите їм свою повну адресу XMPP.</string>
|
||||
<string name="your_server_invitation">Ваше запрошення до сервера</string>
|
||||
</resources>
|
||||
<string name="improperly_formatted_provisioning">Неправильно відформатований код забезпечення</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="pick_a_server">Chọn nhà cung cấp XMPP của bạn</string>
|
||||
<string name="use_chat.sum7.eu">Sử dụng chat.sum7.eu</string>
|
||||
<string name="create_new_account">Tạo tài khoản mới</string>
|
||||
<string name="do_you_have_an_account">Bạn đã có tài khoản XMPP chưa? Điều này có thể đúng nếu bạn đang dùng một ứng dụng khách cho XMPP khác hoặc đã sử dụng Conversations trước đó. Nếu không, bạn có thể tạo tài khoản XMPP mới ngay bây giờ.\nGợi ý: Một số nhà cung cấp email cũng cung cấp tài khoản XMPP.</string>
|
||||
<string name="server_select_text">XMPP là một mạng nhắn tin ngay lập tức không phụ thuộc vào nhà cung cấp. Bạn có thể sử dụng ứng dụng khách này với bất kỳ máy chủ XMPP nào mà bạn chọn.\nTuy nhiên, vì sự thuận tiện của bạn, chúng tôi đã làm cho việc tạo tài khoản trên chat.sum7.eu được dễ dàng; một nhà cung cấp đặc biệt phù hợp với việc sử dụng Conversations.</string>
|
||||
<string name="magic_create_text_on_x">Bạn đã được mời vào %1$s. Chúng tôi sẽ hướng dẫn bạn trong quá trình tạo tài khoản.\nKhi chọn %1$s là nhà cung cấp, bạn sẽ có thể giao tiếp với những người dùng của các nhà cung cấp khác bằng cách đưa cho họ địa chỉ XMPP đầy đủ của bạn.</string>
|
||||
<string name="magic_create_text_fixed">Bạn đã được mời vào %1$s. Một tên người dùng đã được chọn sẵn cho bạn. Chúng tôi sẽ hướng dẫn bạn trong quá trình tạo tài khoản.\nBạn sẽ có thể giao tiếp với những người dùng của các nhà cung cấp khác bằng cách đưa cho họ địa chỉ XMPP đầy đủ của bạn.</string>
|
||||
<string name="your_server_invitation">Lời mời vào máy chủ của bạn</string>
|
||||
<string name="improperly_formatted_provisioning">Mã cung cấp không được định dạng đúng</string>
|
||||
<string name="tap_share_button_send_invite">Nhấn nút chia sẻ để gửi lời mời vào %1$s đến liên hệ của bạn.</string>
|
||||
<string name="if_contact_is_nearby_use_qr">Nếu liên hệ của bạn ở gần đây, họ cũng có thể quét mã ở dưới để chấp nhận lời mời của bạn.</string>
|
||||
<string name="easy_invite_share_text">Hãy tham gia vào %1$s và trò chuyện với tôi: %2$s</string>
|
||||
<string name="share_invite_with">Chia sẻ lời mời với...</string>
|
||||
</resources>
|
||||
|
|
@ -8,4 +8,9 @@
|
|||
<string name="magic_create_text_on_x">您已受邀参加%1$s。 我们将指导您完成创建帐户的过程。\n选择%1$s作为提供者后,您可以通过提供其他人的完整XMPP地址与其他提供者的用户进行交流。</string>
|
||||
<string name="magic_create_text_fixed">您已受邀参加%1$s。 已经为您选择了一个用户名。 我们将指导您完成创建帐户的过程。\n您可以通过向其他提供商的用户提供完整的XMPP地址来与他们进行交流。</string>
|
||||
<string name="your_server_invitation">你的服务器邀请</string>
|
||||
<string name="improperly_formatted_provisioning">格式不正确的配置代码</string>
|
||||
<string name="tap_share_button_send_invite">点击分享按钮向您的联系人发送加入 %1$s 的邀请。</string>
|
||||
<string name="if_contact_is_nearby_use_qr">如果你的联系人在附近,他们也可以扫描下面的代码来接受你的邀请。</string>
|
||||
<string name="easy_invite_share_text">加入 %1$s 和我聊天:%2$s</string>
|
||||
<string name="share_invite_with">分享邀请</string>
|
||||
</resources>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue