Compare commits
590 Commits
6.4.4_fix_
...
dev_memory
| Author | SHA1 | Date | |
|---|---|---|---|
| b184d5255f | |||
| 4d9dbadea5 | |||
| 0294296ada | |||
| d36ece4c54 | |||
| 11cf971514 | |||
|
|
3d5ac05d36 | ||
|
|
d3268e57bc | ||
|
|
3549c25cca | ||
|
|
859f54b1e1 | ||
| af00538101 | |||
| a808cd13c0 | |||
|
|
cd0067d77b | ||
|
|
894e264fb3 | ||
| 5dd5b2e0ea | |||
|
|
8f58c485c8 | ||
|
|
11e809a978 | ||
|
|
20aa6002f8 | ||
|
|
ffcb0e8790 | ||
|
|
3de7160538 | ||
|
|
1e595ec526 | ||
| 344bbcdfc8 | |||
| c1aeaa0e1b | |||
| e108494bd5 | |||
| bc0e698a77 | |||
| b82c87d5d6 | |||
| 80fe5271f6 | |||
| 944d703e36 | |||
| 911869ed9f | |||
| 543336af99 | |||
| 5d7cff6707 | |||
| 1bbab7ac9e | |||
|
|
16592aaecb | ||
|
|
3de9ff57c3 | ||
| e932238fc2 | |||
|
|
df436bbe1e | ||
|
|
49bd97f646 | ||
| 731f941298 | |||
|
|
c21df55c06 | ||
| 9acbc60db2 | |||
| 5f2dda021a | |||
| 1244010c3d | |||
| 7226d54277 | |||
| eaafcdd444 | |||
| 9f9c02b7e7 | |||
|
|
7bffdda6b9 | ||
| 50d01ccd92 | |||
|
|
420573736d | ||
|
|
aca98cb7e6 | ||
|
|
f26fb83fec | ||
| 1ad9effe91 | |||
| 418d306d72 | |||
| 3606815a41 | |||
| 518e57ee44 | |||
| 872245c9c9 | |||
| 749f756d58 | |||
|
|
a22dfb6214 | ||
|
|
652e569e2b | ||
| d480986485 | |||
| 2e6efc69e8 | |||
| e2761049e5 | |||
| ee6a4288b0 | |||
| 7070f5c1b4 | |||
| cc4cc2f746 | |||
| 93e2a8af02 | |||
| 207811c41d | |||
|
|
8730a6396f | ||
| 05ff51bd48 | |||
| 1904eeb3ba | |||
|
|
70126171c6 | ||
|
|
ee084d6f33 | ||
| bacf4fd32f | |||
|
|
eaae58db31 | ||
|
|
13146595bf | ||
| b3083cdd18 | |||
| cf85870810 | |||
| 182e46799a | |||
| 27bd65d3da | |||
|
|
9fcc04cef2 | ||
| a1f07b8c20 | |||
|
|
65efa88d4a | ||
| 01a2d66585 | |||
| 098e9bf6ba | |||
| ddf56963bb | |||
|
|
eadcaf826b | ||
|
|
36248eaeef | ||
| 04496c3888 | |||
| 494aa6b52d | |||
|
|
4bb51506e3 | ||
|
|
112bec58df | ||
| 0b7a3cc50e | |||
| 9f517199fe | |||
| 2393a53466 | |||
| 80993c7d2d | |||
| 8c0a23d39a | |||
| a0949f0903 | |||
|
|
42052b7465 | ||
| a37a92e211 | |||
|
|
c3ddc62b95 | ||
|
|
0a3409f98a | ||
|
|
d26a687385 | ||
| 2f413e260e | |||
| 6fcb194995 | |||
| 7cea6b4f8d | |||
| 16d02c6936 | |||
| 289c93d824 | |||
| 8f99d68b6f | |||
| e0d7137727 | |||
|
|
7a9ed22ec9 | ||
|
|
af58ec755d | ||
| 4ad2020b57 | |||
| 1db24dae4b | |||
| 76055543c3 | |||
| a1d95d6a94 | |||
| 2143e3eb77 | |||
|
|
4a0901ea93 | ||
|
|
488bee514d | ||
|
|
bafea09e44 | ||
|
|
54923304dc | ||
|
|
8b357233c2 | ||
| 06b5f99930 | |||
| 0b5598346e | |||
|
|
d81e6b9f04 | ||
| 87e3dddac5 | |||
| 55f3ac577b | |||
| 0c053a028e | |||
| df36529619 | |||
| 7555510d94 | |||
|
|
2e986db686 | ||
| 660853d5be | |||
| 956bef4b90 | |||
|
|
43c22fca7c | ||
| 5db84c1e61 | |||
| 00c3e0cb77 | |||
| f4b6c46075 | |||
| 181bb5b445 | |||
|
|
90f58054fa | ||
| 137dbc72d8 | |||
|
|
a7cef3c6f8 | ||
| 339d460c0f | |||
| c8ba78f39b | |||
|
|
d31af73479 | ||
| 13c53644a2 | |||
| 0f9bd6aa3c | |||
|
|
874800c19d | ||
|
|
404d45893f | ||
| ed6e95f380 | |||
| c4cfa0becd | |||
|
|
a069562bbe | ||
|
|
9158424a25 | ||
| 7488143037 | |||
| 99938f6ed6 | |||
|
|
1bde99f6c9 | ||
|
|
e3a9a037ba | ||
| 33ee465a43 | |||
| b1d342f791 | |||
| 7639a70887 | |||
| f690cf0b62 | |||
| 4dcb12eb4f | |||
|
|
af5d8dbf19 | ||
| 9cd1638d55 | |||
| dd1570c10e | |||
| 3af7ca5d94 | |||
| 2d2cc21e15 | |||
| f872029c9d | |||
| 6198489dd4 | |||
| cce8e43c24 | |||
| cae0599307 | |||
|
|
2c6e88500a | ||
| efc20c644a | |||
| bdc43baaa8 | |||
| dc529b6640 | |||
|
|
488cc192b2 | ||
|
|
269f6c64a9 | ||
|
|
51186169ca | ||
|
|
325e57d1d5 | ||
| 862ec98fa3 | |||
| b827f7bfa6 | |||
|
|
786dfb54a3 | ||
|
|
a373738d70 | ||
| 6929276512 | |||
| 64c33f5709 | |||
| 7330e1ae2b | |||
| f359c9994d | |||
| d49b60a1e1 | |||
|
|
ee2cebdc41 | ||
| 1407ecc2f2 | |||
|
|
606fc64262 | ||
| a5516ebfb3 | |||
| dd7214a945 | |||
| a20571e050 | |||
| 8f7adb3079 | |||
| adcf005e62 | |||
|
|
8cff0195ad | ||
| 98940d7554 | |||
| 4a8c29365c | |||
| b641a65117 | |||
|
|
d747407d6b | ||
| f302155912 | |||
|
|
3d60814538 | ||
| 1293368d59 | |||
|
|
d1e1f5f4e8 | ||
|
|
b804c20ba0 | ||
| e030db04b9 | |||
| 0fcadde670 | |||
| e522d04ead | |||
|
|
ce0061e86e | ||
| 7ed4043a1f | |||
|
|
0b97d7bbaf | ||
| 5317f6d88f | |||
| 092b2ac519 | |||
| c9725875b3 | |||
| 6c33ac15f8 | |||
| af91783b9f | |||
| 5755aa5232 | |||
| ddc246e11c | |||
|
|
869ad9adf7 | ||
| 5356d91fef | |||
|
|
f024283e80 | ||
| 49167f332d | |||
| ea69f4bcb7 | |||
|
|
eaf973b927 | ||
| fdbf5aee04 | |||
| e4c490577d | |||
|
|
b5247df69b | ||
| d39ee17cc4 | |||
| 07da7acacd | |||
|
|
28add09f32 | ||
|
|
9d69610713 | ||
|
|
32969a58db | ||
| b188613035 | |||
| 308d5acc21 | |||
|
|
284b9784d6 | ||
| 26f02065df | |||
| eef852c283 | |||
| e0287899f8 | |||
| ae020b105a | |||
| 62c3cdcb30 | |||
| 01c657fdcb | |||
| 3a75e24601 | |||
| e28c393f88 | |||
| bfe8034b24 | |||
| c056dfe246 | |||
| a7cf09de1e | |||
| 7c4c22d69e | |||
| 3747f214b1 | |||
|
|
503fb0d7f1 | ||
|
|
6b0500b5ff | ||
| ae8c6cc23d | |||
| ad028c69d0 | |||
| 03b3398bce | |||
| 4a84283000 | |||
| c49c560e8d | |||
| 8d3ac7761f | |||
| a1d9b1f75b | |||
|
|
afed0c8833 | ||
| 415ed2fc9b | |||
| 8e45e17768 | |||
|
|
576a30d1be | ||
|
|
e380c8dcbc | ||
| 5e9f23286e | |||
| 1bbc78fb32 | |||
| b56368412c | |||
| 4ad75a11a8 | |||
| 3fa259c5b9 | |||
|
|
4cd4939c58 | ||
| b20141de02 | |||
| 9eff246f06 | |||
| 285a33ff9a | |||
|
|
7ebd935eba | ||
| f62a093092 | |||
| 28b4a36800 | |||
| ec59fce097 | |||
| e134ef8d54 | |||
| 29ddc68870 | |||
| 9ead9a6fb8 | |||
| 2a2672587c | |||
| 98122c25d8 | |||
| 84c89d7530 | |||
| 4268816539 | |||
| 721172d48a | |||
| 3e7942dbd4 | |||
| 17d18eff98 | |||
| 0d422177ac | |||
| 6336eab32a | |||
| f91a3f3fc1 | |||
| a489a6d00d | |||
| 8d8cff8d1b | |||
|
|
5f487f74bd | ||
| 857206e3da | |||
|
|
4ebe56913a | ||
|
|
efcc2591c2 | ||
|
|
455b330b7d | ||
|
|
ed2879e263 | ||
| 3b1c5ac1ec | |||
|
|
d243ffb380 | ||
| 6bdd81038b | |||
| 1eff58aca1 | |||
|
|
fa6eda5936 | ||
|
|
72f7e00dd5 | ||
| 707e083684 | |||
| 8b4f88c766 | |||
|
|
ae3ac93248 | ||
|
|
f43ccea32a | ||
|
|
73684b9962 | ||
|
|
80a1508dfc | ||
| 0b1393615c | |||
|
|
4481b102ef | ||
| cab59a5f4a | |||
| 9f6cd3fd6f | |||
|
|
4c5730d3bf | ||
|
|
1222aa9819 | ||
|
|
e58915edb6 | ||
|
|
4d4c251ebd | ||
|
|
6a416aaba1 | ||
| bbb25cde50 | |||
| 210749ebd3 | |||
| 637fedcbe6 | |||
|
|
70b05b85d7 | ||
| 9a1cefdb70 | |||
| 6ca8fb0c29 | |||
|
|
8e7de87c6b | ||
| cb55c09624 | |||
|
|
a41a58dc26 | ||
| f257c2b5a9 | |||
|
|
f5bd17f832 | ||
| 1b7296c13b | |||
| a965a83653 | |||
|
|
5cc521d93c | ||
| 6f2a893a4e | |||
| 1548b6f252 | |||
|
|
0c6b62ed1a | ||
|
|
1fcb3d312c | ||
| 35b24c261e | |||
| e5c5a2e5f5 | |||
| 9934d53390 | |||
| 030fdb6ad0 | |||
|
|
cf4948a3e2 | ||
| afd4cb6e41 | |||
| 596c9f9962 | |||
| 020bbf322d | |||
| 05b1a9bc74 | |||
| 7f001ba887 | |||
|
|
744de267dd | ||
|
|
af26dc24c7 | ||
|
|
e9fa533e5a | ||
| 3bd4301cda | |||
| 23be58c4e8 | |||
| 718d4a5d2f | |||
| 733678532a | |||
| 6fb29bbf60 | |||
| ecbfa57276 | |||
| fc59a6f182 | |||
| 83039d7b29 | |||
|
|
e405965298 | ||
|
|
e6766dc5eb | ||
| fe027e53db | |||
|
|
546d9b5728 | ||
| 7008ccc505 | |||
| 1fc8977f99 | |||
| 4acba02c6a | |||
|
|
491427feba | ||
|
|
249d251708 | ||
|
|
96eee88c82 | ||
|
|
7005895d90 | ||
|
|
3bdee09402 | ||
| 2843131151 | |||
| a8d4d64174 | |||
| 1853acd5eb | |||
|
|
03a4054ee5 | ||
| fe66792935 | |||
|
|
082c9d7d12 | ||
| e35eb5ac7f | |||
|
|
5e631652a9 | ||
| 4eb9adad78 | |||
| 4a9a8c3ec3 | |||
|
|
450047aae2 | ||
| eb65c0e101 | |||
| 6bd29ec63e | |||
| f0231be306 | |||
| b12547cd88 | |||
| ed6b531b8d | |||
| 47b9487e13 | |||
| ec40f8fa0d | |||
| 86a0a19fec | |||
| e0b69be2d4 | |||
| a2ad006a7e | |||
| 9b17c1225a | |||
|
|
32881d3f35 | ||
| e8367b8f1a | |||
| fc1bada607 | |||
| 1eca5b0309 | |||
| 08906e028a | |||
|
|
6e36e15ef3 | ||
| d71fe7d92e | |||
| 72ca2b7b04 | |||
| 5768ff5518 | |||
| 8a03b194b2 | |||
| 0d18a135ec | |||
| 91fdef55c7 | |||
|
|
4d437be248 | ||
| d42835231e | |||
| 3d117dbcb4 | |||
| 202aedbcf3 | |||
|
|
14a4bc4343 | ||
|
|
011322dd8e | ||
|
|
0d219e4b6d | ||
|
|
1972144384 | ||
|
|
08e7e6b461 | ||
| dbba33f085 | |||
| 4a637d0a69 | |||
|
|
a9d323354b | ||
|
|
4cd1c22d01 | ||
|
|
55ff7a1649 | ||
|
|
3deb3693b3 | ||
| 009efc2c86 | |||
| 40b37b49f9 | |||
| a3ad9a17c7 | |||
|
|
2c13c3dce1 | ||
|
|
859d884941 | ||
| 4a28abf5b7 | |||
| 527bb0f1d9 | |||
| 0429e7ca36 | |||
|
|
e8f13d7590 | ||
| 7eb3e567f6 | |||
| 17ec4753b6 | |||
| 2371ef1dee | |||
| c99d139940 | |||
| e0a2f7c798 | |||
| a12524dc9c | |||
|
|
c08cf6ea57 | ||
| 20746185e0 | |||
| 54cf0e213f | |||
|
|
6654fe0434 | ||
| 324917672c | |||
| d0a373123a | |||
| 86b7ad6d92 | |||
| c949667b94 | |||
| a61a41a068 | |||
| 06d241c66c | |||
| 62ed0ae78e | |||
| 1ee335abf2 | |||
|
|
05ee59618b | ||
|
|
fffa7cdabd | ||
| b8ec25c94e | |||
| 38029f7268 | |||
| d2fdccadf2 | |||
|
|
b1d06a4f1a | ||
|
|
ecf3a94b64 | ||
|
|
99b9af2980 | ||
|
|
267d07f3a5 | ||
| 977bfa910c | |||
| fe3c9c1563 | |||
|
|
8c11818b49 | ||
| ee0d8dd1a0 | |||
|
|
1d50f8e4f5 | ||
| e8f9884365 | |||
| 38f6f2f451 | |||
| a664ff7464 | |||
| a4ab6df974 | |||
| dc8f32062c | |||
| 0a090301df | |||
| d53d250e6f | |||
|
|
897a47bee7 | ||
| 0f457efce6 | |||
| 7842c1b838 | |||
| 02a5ceaacc | |||
| 6b1c223acd | |||
|
|
09a9e023d3 | ||
| 9b37374066 | |||
| 45257e8fe1 | |||
|
|
85971339d4 | ||
|
|
383e8c0859 | ||
| 749ac197de | |||
| d20210f291 | |||
|
|
da3398f1f9 | ||
| 81763110d7 | |||
| 6ac610e1aa | |||
|
|
362cc3814e | ||
| 37dfa05a25 | |||
|
|
2df205218c | ||
|
|
cceb697739 | ||
| 7d63869d44 | |||
| 3b1cecf8a3 | |||
| e52ec4a2b8 | |||
|
|
ed300eec30 | ||
| 8455c360fc | |||
| 059bfaf1d9 | |||
|
|
9f0b6897f1 | ||
| 2119d75e5b | |||
| af39c4bac0 | |||
| 93ac837148 | |||
| c4f3d10419 | |||
| 3f9cf21b8f | |||
| e9a8a4dc02 | |||
|
|
84f352a7fb | ||
| 834170e272 | |||
| 042f53e134 | |||
| 0b041bad7b | |||
| fe124dad0c | |||
|
|
7fe7178b27 | ||
|
|
9dcc23960e | ||
|
|
140e5740e6 | ||
|
|
752fae680c | ||
| e2f8e52583 | |||
| 4d573767f7 | |||
| 56475e729c | |||
| 8f0a1a09a6 | |||
|
|
c6b8b61b1e | ||
| 862295ff03 | |||
|
|
d13e42e33d | ||
| 134cdf2e2a | |||
| 44a05ea0d5 | |||
| 7f34c50b71 | |||
|
|
77682d310a | ||
| 2b0846f939 | |||
|
|
0b6c188e0a | ||
| f51f440b43 | |||
|
|
f74a01efc0 | ||
| 6dafa64e0b | |||
|
|
60453c756c | ||
|
|
350f17915a | ||
| ffcb847b02 | |||
| 8eae2c29ae | |||
|
|
5e55a5b94c | ||
| 1eee54fef1 | |||
| 24f691d4b8 | |||
| 1fc417ec25 | |||
| 71713e5b37 | |||
|
|
ef4c377990 | ||
| 88e27df986 | |||
| 628d9c7a1b | |||
|
|
7836c57479 | ||
|
|
939675fe58 | ||
| 5ed5b15737 | |||
| 783685942c | |||
| 30c09b0e26 | |||
| 96f21643b4 | |||
| 977067eda5 | |||
| 3e7279b4de | |||
| 34dd3ca883 | |||
|
|
d0d36ef207 | ||
| a66a32038c | |||
| 80d5bf3007 | |||
| cb39253785 | |||
| 3ec3350c97 | |||
| 7a01f62490 | |||
| 4a6bb9fd56 | |||
| 40532a0972 | |||
|
|
e059d9bbb2 | ||
| ab953b4785 | |||
|
|
6e38ef2962 | ||
|
|
6656aebff9 | ||
| 50b598d8a1 | |||
| cf08f8197b | |||
| 62f1912a7a | |||
| eae7f3d1a0 | |||
| b3e9836d7c | |||
| c3c91ba9a2 | |||
|
|
1075f7252a | ||
| 302435c068 | |||
| 41fb743bda | |||
|
|
823075c0ad | ||
|
|
c57486b69c | ||
| 8b3b0ce2ea | |||
| e3f9f21287 | |||
| b10d9ada46 | |||
| b48ceea571 | |||
|
|
0f2fbeb114 | ||
| 1623743b26 | |||
| 703f542abf | |||
| a2de293e10 | |||
|
|
a50abb5b2c | ||
|
|
2102acd9e5 | ||
|
|
b8ee197e52 | ||
|
|
ba81a46e2f | ||
|
|
6841f47ac3 | ||
| a2fef0990a | |||
| 8d14c06284 | |||
| 8b3f8d783e | |||
| b5ebc085b4 | |||
| 7e169e882d | |||
| 50f83939cc | |||
| f856188a68 | |||
| 7e9b794c7f | |||
|
|
e70a5e09f6 | ||
| 3e8db9ec7e | |||
| 34f70bb4cd | |||
|
|
12f78dc3b8 | ||
| 89a54276b3 | |||
| 73fb523ddc |
@@ -71,7 +71,7 @@ public class FaceManager implements SensorEventListener {
|
||||
* 配置美颜SDK
|
||||
*/
|
||||
public void initFURender(Context context) {
|
||||
|
||||
initFaceUnity(context);
|
||||
mFURenderer = FURenderer.getInstance();
|
||||
mFURenderer.setInputTextureType(FUInputTextureEnum.FU_ADM_FLAG_COMMON_TEXTURE);
|
||||
mFURenderer.setCameraFacing(CameraFacingEnum.CAMERA_FRONT);
|
||||
@@ -105,9 +105,11 @@ public class FaceManager implements SensorEventListener {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void loadConfig(){
|
||||
|
||||
public void loadConfig() {
|
||||
initFaceBeauty();
|
||||
}
|
||||
|
||||
public void initFaceBeauty() {
|
||||
FaceBeautyDataFactory faceBeautyDataFactory;
|
||||
faceBeautyDataFactory = new FaceBeautyDataFactory();
|
||||
@@ -115,9 +117,13 @@ public class FaceManager implements SensorEventListener {
|
||||
for (String key : configMap.keySet()) {
|
||||
if ("FilterViewHolder_".equals(key)) {
|
||||
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
||||
if (filter.getKey().equals(configMap.get(key))&&!"origin".equals(configMap.get(key))) {
|
||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val")))/100, filter.getDesRes());
|
||||
Log.i(TAG, "test: 设置滤镜 ="+filter.getKey()+" val = "+configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||
if (filter.getKey().equals(configMap.get(key)) && !"origin".equals(configMap.get(key))) {
|
||||
try {
|
||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"))) / 100, filter.getDesRes());
|
||||
Log.i(TAG, "test: 设置滤镜 =" + filter.getKey() + " val = " + configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -125,17 +131,25 @@ public class FaceManager implements SensorEventListener {
|
||||
String name = key.replace("BeautySkinViewHolder_", "");
|
||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||
if (bean.getKey().equals(name)) {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美颜 = "+bean.getKey()+" val = "+configMap.get(key));
|
||||
try {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美颜 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else if(key.startsWith("BeautyShapeViewHolder")){
|
||||
} else if (key.startsWith("BeautyShapeViewHolder")) {
|
||||
String name = key.replace("BeautyShapeViewHolder_", "");
|
||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||
if (bean.getKey().equals(name)) {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美肤 = "+bean.getKey()+" val = "+configMap.get(key));
|
||||
try {
|
||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||
Log.i(TAG, "test: 设置美肤 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -277,6 +291,7 @@ public class FaceManager implements SensorEventListener {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
isInit = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@ public class ContainerRecyclerAdapter extends RecyclerView.Adapter<BaseViewHolde
|
||||
}
|
||||
|
||||
public void hideSeekBar() {
|
||||
if (seekBar.getVisibility() == View.GONE) {
|
||||
if (seekBar.getVisibility() == View.INVISIBLE) {
|
||||
return;
|
||||
}
|
||||
seekBar.setOnProgressChangeListener(null);
|
||||
seekBar.setVisibility(View.GONE);
|
||||
seekBar.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="colorPrimary">#FF8D41</color>
|
||||
<color name="colorPrimaryDark">#FF8D41</color>
|
||||
<color name="colorAccent">#FF8D41</color>
|
||||
|
||||
<!--fulive demo 主配色-->
|
||||
<color name="primary_background">#050F14</color>
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
<string name="beautify_hip_slim">Hip</string>
|
||||
<string name="beautify_head_slim">Head shrink</string>
|
||||
<string name="beautify_leg_thin_slim">Thin leg</string>
|
||||
<string name="toast_not_detect_body">No body tracking</string>
|
||||
<string name="toast_not_detect_body">No message tracking</string>
|
||||
<string name="pta_human_full_body">Body driver</string>
|
||||
<string name="pta_human_half_body">Bust driver</string>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'img-optimizer'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
android {
|
||||
dexOptions {
|
||||
jumboMode = true
|
||||
@@ -230,6 +230,7 @@ dependencies {
|
||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||
|
||||
// implementation rootProject.ext.dependencies["leakcanary"]
|
||||
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -78,10 +78,10 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
|
||||
<!-- Android11新增 -->
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||
<application
|
||||
android:name="com.shayu.phonelive.AppContext"
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -17,10 +17,6 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustConfig;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.adjust.sdk.LogLevel;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
@@ -28,6 +24,7 @@ import com.fm.openinstall.OpenInstall;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.shayu.phonelive.utils.LogUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||
@@ -37,8 +34,6 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
@@ -46,7 +41,6 @@ import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.faceunity.FaceManager;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
@@ -86,12 +80,10 @@ public class AppContext extends CommonAppContext {
|
||||
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {
|
||||
Adjust.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(Activity activity) {
|
||||
Adjust.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,6 +129,7 @@ public class AppContext extends CommonAppContext {
|
||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||
registerError();
|
||||
registerFirebaseCrash();
|
||||
LogUtils.start(this);
|
||||
sInstance = this;
|
||||
L.setDeBug(BuildConfig.DEBUG);
|
||||
AppEventsLogger.activateApp(this);
|
||||
@@ -161,38 +154,8 @@ public class AppContext extends CommonAppContext {
|
||||
OpenInstall.init(this);
|
||||
}
|
||||
|
||||
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
|
||||
AdjustConfig config = new AdjustConfig(this, "3om5fbglyqdc", environment);
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
config.setDefaultTracker("xa7k5ut");
|
||||
}
|
||||
Adjust.onCreate(config);
|
||||
|
||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||
config.setLogLevel(LogLevel.WARN);
|
||||
//激活操作记录
|
||||
AdjustEvent adjustEvent = new AdjustEvent("m7wk0c");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_activation", null);
|
||||
|
||||
//FB激活
|
||||
logger.logEvent("FB_activation");
|
||||
|
||||
AdjustEvent adjustEvent2 = new AdjustEvent("p7igfz");
|
||||
Adjust.trackEvent(adjustEvent2);
|
||||
CommonHttpUtil.setAdvertisingChannels("p7igfz", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_complete_1st_loading", null);
|
||||
//FB激活
|
||||
logger.logEvent("FB_complete_1st_loading");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化 AndroidUtilCode
|
||||
Utils.init(this);
|
||||
liveImDeletUtil = new LiveImDeletUtil();
|
||||
@@ -268,10 +231,11 @@ public class AppContext extends CommonAppContext {
|
||||
mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
configSPApp();
|
||||
//初始化美颜SDK
|
||||
FaceManager.initFaceUnity(this);
|
||||
// FaceManager.initFaceUnity(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -314,17 +278,17 @@ public class AppContext extends CommonAppContext {
|
||||
Log.e("ApplicationError", "主线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||
e.printStackTrace();
|
||||
//闪退后finish所有Activity并且杀死进程
|
||||
for (WeakReference<Activity> activity : activities) {
|
||||
/* for (WeakReference<Activity> activity : activities) {
|
||||
if (activity != null && activity.get() != null) {
|
||||
activity.get().finish();
|
||||
}
|
||||
}
|
||||
/* Process.killProcess(Process.myPid());
|
||||
System.exit(0);*/
|
||||
*//* Process.killProcess(Process.myPid());
|
||||
System.exit(0);*//*
|
||||
setFirebaseCrashData();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
throw new RuntimeException(e);
|
||||
}, 100);
|
||||
}, 100);*/
|
||||
})
|
||||
.setUncaughtCrashHandler((t, e) -> {
|
||||
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||
|
||||
@@ -101,10 +101,10 @@ public class NeverCrashUtils {
|
||||
Log.e(TAG, "未捕获的主线程异常行为", e);
|
||||
}
|
||||
e.printStackTrace();
|
||||
Toast.makeText(application, "发生闪退", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.shayu.phonelive.activity;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -21,9 +19,8 @@ import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -107,14 +104,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
EventBus.getDefault().register(this);
|
||||
setStatusBar();
|
||||
setContentView(R.layout.activity_launcher);
|
||||
//开屏
|
||||
AdjustEvent adjustEvent = new AdjustEvent("vjqk8g");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//谷歌激活
|
||||
mFirebaseAnalytics.logEvent("FS_screen", null);
|
||||
//FB激活
|
||||
logger.logEvent("FB_screen");
|
||||
mContext = this;
|
||||
mRoot = findViewById(R.id.root);
|
||||
mCover = findViewById(R.id.cover);
|
||||
@@ -140,6 +129,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
};
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,10 @@ package com.shayu.phonelive.utils;
|
||||
|
||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
@@ -17,6 +20,7 @@ import android.graphics.PorterDuffXfermode;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@@ -31,9 +35,12 @@ import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.phonelive.AppContext;
|
||||
import com.shayu.phonelive.activity.LauncherActivity;
|
||||
import com.yunbao.common.bean.NotificationMsgBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -52,7 +59,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
NotificationManager manager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
||||
NotificationChannel channel = new NotificationChannel(channelID, channelNAME, level);
|
||||
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"),null);
|
||||
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"), null);
|
||||
manager.createNotificationChannel(channel);
|
||||
return channelID;
|
||||
} else {
|
||||
@@ -81,6 +88,26 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
@Override
|
||||
public boolean onNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage) {
|
||||
Log.i("gmc", notificationMessage.getPushContent() + "VVV" + notificationMessage.getPushTitle() + "gmc11112222" + notificationMessage.getExtra());
|
||||
if (!SpUtil.getInstance().getBooleanValue("NOTIFICATION")) {
|
||||
if (AppContext.activityWeakReference != null) {
|
||||
Activity activity = AppContext.activityWeakReference.get();
|
||||
if (activity != null) {
|
||||
DialogUitl.showSimpleDialog(activity, "应用需要通知权限", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
|
||||
intent.putExtra("app_package", context.getPackageName());
|
||||
intent.putExtra("app_uid", context.getApplicationInfo().uid);
|
||||
// for Android 8 and above
|
||||
intent.putExtra("android.provider.extra.APP_PACKAGE", context.getPackageName());
|
||||
activity.startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (notificationMessage.getExtra() == null) {
|
||||
msg.setImg("" + notificationMessage.getSenderPortrait());
|
||||
msg.setTitle(notificationMessage.getPushTitle());
|
||||
@@ -199,7 +226,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
@@ -233,7 +260,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
@@ -276,7 +303,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
PendingIntent pendingIntent;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}else {
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||
|
||||
89
app/src/main/java/com/shayu/phonelive/utils/LogUtils.java
Normal file
89
app/src/main/java/com/shayu/phonelive/utils/LogUtils.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package com.shayu.phonelive.utils;
|
||||
|
||||
import static java.text.DateFormat.DEFAULT;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
public class LogUtils {
|
||||
/**
|
||||
* 采集所有日志
|
||||
*/
|
||||
public static void start(Context context) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
String[] exec = new String[]{"logcat", "-c"};
|
||||
Runtime.getRuntime().exec(exec).waitFor();
|
||||
|
||||
exec = new String[]{"logcat", "-v", "UTC", "-D"};
|
||||
|
||||
Process process = Runtime.getRuntime().exec(exec);
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line;
|
||||
PrintWriter writer = null;
|
||||
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||
if (dir.listFiles() != null) {
|
||||
for (File file : dir.listFiles()) {
|
||||
if (file.getName().endsWith(".log") && !"error.log".equals(file.getName())) {
|
||||
String fileName = file.getName().replace(".log", "").split("_")[1];
|
||||
if (isDelLog(fileName)) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File saveFile = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".log");
|
||||
FileOutputStream os = new FileOutputStream(saveFile, true);
|
||||
writer = new PrintWriter(os);
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
writer.append(line).write("\n");
|
||||
}
|
||||
writer.flush();
|
||||
writer.close();
|
||||
exec = new String[]{"logcat", "-c"};
|
||||
Runtime.getRuntime().exec(exec).waitFor();
|
||||
bufferedReader.close();
|
||||
start(context);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是要删除的日志
|
||||
**/
|
||||
private static boolean isDelLog(String time) {
|
||||
try {
|
||||
Calendar timeCal = Calendar.getInstance(Locale.CHINA);
|
||||
timeCal.setTime(Objects.requireNonNull(SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).parse(time)));
|
||||
Calendar calendar = Calendar.getInstance(Locale.CHINA);
|
||||
calendar.setTime(new Date());
|
||||
calendar.add(Calendar.DATE, -3);
|
||||
return calendar.after(timeCal);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">PDLIVE</string>
|
||||
<string name="leak_canary_test_class_name">assertk.Assert</string>
|
||||
</resources>
|
||||
@@ -22,6 +22,7 @@ buildscript {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||
classpath "com.alibaba:arouter-register:1.0.2"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@ dependencies {
|
||||
//谷歌支付
|
||||
//谷歌内购
|
||||
api 'com.android.billingclient:billing:5.0.0'
|
||||
implementation 'com.teprinciple:updateapputils:2.3.0'
|
||||
api 'com.squareup.picasso:picasso:2.5.2'
|
||||
api "com.immomo.cosmos.mediax:beautyutils:2.2.1_01071700"
|
||||
api files('libs/liteavsdk.jar')
|
||||
@@ -155,9 +154,11 @@ dependencies {
|
||||
//腾讯im
|
||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||
api 'com.google.code.gson:gson:2.8.8'
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.5.8' // 音视频通话基础能力库
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
||||
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_lib:5.2.5.4' // 即时通讯基础能力库
|
||||
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
||||
//融云小视频模块
|
||||
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
||||
@@ -168,7 +169,6 @@ dependencies {
|
||||
transitive = true
|
||||
}
|
||||
api 'com.linecorp:linesdk:5.0.1'
|
||||
api 'com.adjust.sdk:adjust-android:4.30.1'
|
||||
api 'com.android.installreferrer:installreferrer:2.2'
|
||||
//Retrofit2库
|
||||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
@@ -188,4 +188,6 @@ dependencies {
|
||||
api 'com.github.princekin-f:EasyFloat:2.0.4'
|
||||
api files('libs/Msc.jar')
|
||||
|
||||
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<!--
|
||||
|
||||
<!--支付宝-->
|
||||
支付宝
|
||||
<activity
|
||||
android:name="com.alipay.sdk.app.H5PayActivity"
|
||||
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
|
||||
@@ -46,7 +47,8 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize|stateHidden"></activity>
|
||||
<!--支付宝 end-->
|
||||
支付宝 end
|
||||
-->
|
||||
|
||||
<activity
|
||||
android:name="com.yunbao.common.activity.ErrorActivity"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,22 +1,24 @@
|
||||
package com.yunbao.common;
|
||||
|
||||
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
||||
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.facebook.FacebookSdk;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.rong.imlib.RongIMClient;
|
||||
@@ -24,9 +26,6 @@ import io.rong.push.RongPushClient;
|
||||
import io.rong.push.pushconfig.PushConfig;
|
||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
|
||||
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
||||
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
@@ -35,13 +34,13 @@ import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||
public class CommonAppContext extends MultiDexApplication {
|
||||
|
||||
public static CommonAppContext sInstance;
|
||||
public static WeakReference<Activity> activityWeakReference;
|
||||
public static List<WeakReference<Activity>> activityList=new ArrayList<>();
|
||||
private int mCount;
|
||||
private boolean mFront;//是否前台
|
||||
public static int jpushMsgNum;
|
||||
public static int Ingroup = 0;
|
||||
public static String lang = "chinese";
|
||||
public static FirebaseAnalytics mFirebaseAnalytics;
|
||||
public static AppEventsLogger logger;
|
||||
public static boolean isReady = false;
|
||||
public static String home_zdy_img_us = "";
|
||||
public static String home_zdy_img_cn = "";
|
||||
@@ -67,33 +66,29 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
//初始化友盟统计
|
||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||
FacebookSdk.sdkInitialize(getApplicationContext());
|
||||
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
||||
mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
|
||||
mFirebaseAnalytics.setUserProperty("ALLOW_AD_PERSONALIZATION_SIGNALS", "true" );
|
||||
|
||||
|
||||
|
||||
logger = AppEventsLogger.newLogger(this);
|
||||
setAutoLogAppEventsEnabled(true);
|
||||
FacebookSdk.fullyInitialize();
|
||||
setAdvertiserIDCollectionEnabled(true);
|
||||
registerActivityLifecycleCallbacks();
|
||||
|
||||
Locale locale;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
locale = getResources().getConfiguration().getLocales().get(0);
|
||||
} else {
|
||||
locale = getResources().getConfiguration().locale;
|
||||
}
|
||||
if(locale.getLanguage().equals("en")){
|
||||
lang = "english";
|
||||
}else{
|
||||
lang = "chinese";
|
||||
}
|
||||
Log.i("lang",lang);
|
||||
Locale locale;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
locale = getResources().getConfiguration().getLocales().get(0);
|
||||
} else {
|
||||
locale = getResources().getConfiguration().locale;
|
||||
}
|
||||
if (locale.getLanguage().equals("en")) {
|
||||
lang = "english";
|
||||
} else {
|
||||
lang = "chinese";
|
||||
}
|
||||
Log.i("lang", lang);
|
||||
|
||||
}
|
||||
|
||||
public static Activity getTopActivity() {
|
||||
return activityWeakReference.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context base) {
|
||||
@@ -111,13 +106,15 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
@Override
|
||||
public void onActivityStarted(Activity activity) {
|
||||
mCount++;
|
||||
activityWeakReference = new WeakReference<>(activity);
|
||||
if (!mFront) {
|
||||
mFront = true;
|
||||
L.e("AppContext------->处于前台");
|
||||
ShortcutBadger.applyCount(activity,0);
|
||||
jpushMsgNum=0;
|
||||
ShortcutBadger.applyCount(activity, 0);
|
||||
jpushMsgNum = 0;
|
||||
CommonAppConfig.getInstance().setFrontGround(true);
|
||||
}
|
||||
activityList.add(activityWeakReference);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,6 +135,12 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
L.e("AppContext------->处于后台");
|
||||
CommonAppConfig.getInstance().setFrontGround(false);
|
||||
}
|
||||
for (WeakReference<Activity> reference : activityList) {
|
||||
if (reference.get() == activity) {
|
||||
activityList.remove(reference);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,8 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public class Constants {
|
||||
public static final String NEW_ENTER_ROOM = "enterRoom";
|
||||
|
||||
public static final String URL = "url";
|
||||
public static final String PAYLOAD = "payload";
|
||||
public static final String SEX = "sex";
|
||||
@@ -74,7 +76,7 @@ public class Constants {
|
||||
public static final String PAY_BUY_COIN_ALI = "Charge.getAliOrder";
|
||||
public static final String PAY_BUY_COIN_WX = "Charge.getWxOrder";
|
||||
|
||||
public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
||||
// public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
||||
public static final String PACKAGE_NAME_WX = "com.tencent.mm";//微信的包名
|
||||
public static final String PACKAGE_NAME_QQ = "com.tencent.mobileqq";//QQ的包名
|
||||
public static final String LAT = "lat";
|
||||
@@ -130,6 +132,8 @@ public class Constants {
|
||||
public static final int LIVE_FUNC_MIC = 2013;//語音
|
||||
public static final int LIVE_FUNC_WKS = 2014;//語音
|
||||
public static final int LIVE_FUNC_ZSLK = 2015;//語音
|
||||
public static final int LIVE_FUNC_RANDOM_PK = 2016;//随机PK
|
||||
public static final int LIVE_ROBOT= 2017;//机器人
|
||||
|
||||
//socket
|
||||
public static final String SOCKET_CONN = "conn";
|
||||
@@ -143,6 +147,7 @@ public class Constants {
|
||||
public static final String SOCKET_ALL_SERVER_NOTIFY = "AllServerNotify";//全服通知
|
||||
public static final String SOCKET_SEND_BARRAGE = "SendBarrage";//发弹幕
|
||||
public static final String SOCKET_LIVE_DRPK = "LiveDRPK";//多人PK
|
||||
public static final String SOCKET_LIVE_DRPK_RANDOM = "LiveRandomPK";//随机PK
|
||||
public static final String SOCKET_LEAVE_ROOM = "disconnect";//用户离开房间
|
||||
public static final String SOCKET_LIVE_END = "StartEndLive";//主播关闭直播
|
||||
public static final String SOCKET_SYSTEM = "SystemNot";//系统消息
|
||||
@@ -167,7 +172,11 @@ public class Constants {
|
||||
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
||||
public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力
|
||||
public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手
|
||||
public static final String AI_AUTOMATIC_SPEECH_LIVE = "aiAutomaticSpeechNew";//机器人助手
|
||||
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
||||
public static final String SUPER_VISION = "supervision";//超级发言警告
|
||||
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
||||
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
||||
|
||||
//游戏socket
|
||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||
@@ -182,6 +191,7 @@ public class Constants {
|
||||
public static final String LOVE_CHECK = "LoveCheck";//热度卡消息
|
||||
public static final String TRUMPET_NOTIFY = "TrumpetNotify";//全栈喇叭
|
||||
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
||||
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
||||
|
||||
public static final int SOCKET_WHAT_CONN = 0;
|
||||
public static final int SOCKET_WHAT_DISCONN = 2;
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
@@ -54,8 +55,8 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
Intent intent=getIntent();
|
||||
if(intent!=null) {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
isFullWindow = getIntent().getBooleanExtra("isFull", false);
|
||||
if (isFullWindow) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
@@ -358,4 +359,15 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrimMemory(int level) {
|
||||
super.onTrimMemory(level);
|
||||
Log.i("memory", "onTrimMemory: " + level);
|
||||
switch (level) {
|
||||
case TRIM_MEMORY_RUNNING_CRITICAL://内存低值危险值
|
||||
break;
|
||||
case TRIM_MEMORY_RUNNING_LOW://内存过低
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,9 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
@@ -23,16 +20,23 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/25.
|
||||
*/
|
||||
@@ -64,14 +68,13 @@ public class WebViewActivity extends AbsActivity {
|
||||
btnEdit = (ImageView) findViewById(R.id.btn_edit);
|
||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
mWebView = new WebView(mContext);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = DpUtil.dp2px(1);
|
||||
mWebView.setLayoutParams(params);
|
||||
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
rootView.addView(mWebView);
|
||||
// mWebView.setLayoutParams(params);
|
||||
//mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
@@ -93,6 +96,11 @@ public class WebViewActivity extends AbsActivity {
|
||||
if (url.contains("for")) {
|
||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||
}
|
||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||
if (!navigationGestureEnabled(mContext)) {
|
||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@@ -136,7 +144,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
});
|
||||
mWebView.addJavascriptInterface(new JsInteration(), "androidObject");
|
||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(mContext, mWebView).setPageClose(true).setLiveZhuangBana(false), "androidObject");
|
||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mWebView.getSettings().setDomStorageEnabled(true);
|
||||
@@ -165,58 +173,6 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
}
|
||||
|
||||
//js调用原生
|
||||
public class JsInteration {
|
||||
@JavascriptInterface
|
||||
public void onBack() {
|
||||
finish();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void modifyMydata() {
|
||||
indexInto = 1;
|
||||
RouteUtil.forwardEditProfileActivity();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void reportUser(String touid) {
|
||||
RouteUtil.forwardLiveReportActivity(touid);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void gotoHomePage(String indexStr) {
|
||||
Log.e("tgasss","indexStr4"+indexStr);
|
||||
|
||||
if (!"".equals(indexStr) && indexStr != null) {
|
||||
int index = -1;
|
||||
if ("0".equals(indexStr)) {
|
||||
index = 0;
|
||||
} else if ("1".equals(indexStr)) {
|
||||
index = 1;
|
||||
} else if ("2".equals(indexStr)) {
|
||||
index = 2;
|
||||
} else if ("3".equals(indexStr)) {
|
||||
index = 3;
|
||||
}
|
||||
if (index != -1) {
|
||||
finish();
|
||||
Constants.isShowPage = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openWebView(String url) {
|
||||
Constants.isTitle = false;
|
||||
RouteUtil.forwardZhuangBanActivity(url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openWebViewTitle(String url) {
|
||||
Constants.isTitle = true;
|
||||
RouteUtil.forwardZhuangBanActivity(url);
|
||||
}
|
||||
}
|
||||
|
||||
private void openImageChooserActivity(ValueCallback<Uri> valueCallback) {
|
||||
mValueCallback = valueCallback;
|
||||
@@ -348,11 +304,10 @@ public class WebViewActivity extends AbsActivity {
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
// new Handler().postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// mWebView.reload();
|
||||
// }
|
||||
// }, 100);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onJavascriptInterfaceEvent(JavascriptInterfaceEvent event) {
|
||||
indexInto = event.getIndexInto();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.http.main.MainNetManager;
|
||||
import com.yunbao.common.views.DrawerRecommendViewHolder;
|
||||
import com.yunbao.common.views.DrawerTaskViewHolder;
|
||||
import com.yunbao.common.views.FunGamesViewHolder;
|
||||
import com.yunbao.common.views.RecommendViewHolder;
|
||||
import com.yunbao.common.views.RigtsInterestsViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新侧边栏适配器
|
||||
*/
|
||||
public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
// "type": 1,//模块类型 1 充值送好礼类型2 任务中心类型 3趣味游戏类4 权益 ,5为你推荐
|
||||
private final int GOOD_GIFTS = 1;
|
||||
private final int TASK_CENTER = 2;
|
||||
private final int FUN_GAMES = 3;
|
||||
private final int RIGHTS_INTERESTS = 4;
|
||||
private final int RECOMMEND = 5;
|
||||
private String liveId;
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
|
||||
private List<CustomSidebarInfoModel> infoModels = new ArrayList<>();
|
||||
|
||||
public CustomDrawerPopupAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
|
||||
public CustomDrawerPopupAdapter setLiveId(String liveId) {
|
||||
this.liveId = liveId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupAdapter setList(List<AnchorRecommendItemModel> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
switch (viewType) {
|
||||
case GOOD_GIFTS:
|
||||
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_good_gifts, parent, false);
|
||||
return new DrawerRecommendViewHolder(goodGiftsView);
|
||||
case TASK_CENTER:
|
||||
View taskCenterView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_tsak_center, parent, false);
|
||||
return new DrawerTaskViewHolder(taskCenterView);
|
||||
case FUN_GAMES:
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games_view, parent, false);
|
||||
return new FunGamesViewHolder(runGamesView);
|
||||
case RIGHTS_INTERESTS:
|
||||
View rightsInterestsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_rights_interests, parent, false);
|
||||
return new RigtsInterestsViewHolder(rightsInterestsView);
|
||||
default:
|
||||
View recommendView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_recommend, parent, false);
|
||||
return new RecommendViewHolder(recommendView);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof DrawerRecommendViewHolder) {
|
||||
DrawerRecommendViewHolder recommendViewHolder = (DrawerRecommendViewHolder) holder;
|
||||
recommendViewHolder.setData(infoModels.get(position));
|
||||
} else if (holder instanceof DrawerTaskViewHolder) {
|
||||
DrawerTaskViewHolder taskViewHolder = (DrawerTaskViewHolder) holder;
|
||||
taskViewHolder.setData(infoModels.get(position));
|
||||
} else if (holder instanceof FunGamesViewHolder) {
|
||||
FunGamesViewHolder funGamesViewHolder = (FunGamesViewHolder) holder;
|
||||
funGamesViewHolder.setData(infoModels.get(position));
|
||||
} else if (holder instanceof RigtsInterestsViewHolder) {
|
||||
RigtsInterestsViewHolder rigtsInterestsViewHolder = (RigtsInterestsViewHolder) holder;
|
||||
rigtsInterestsViewHolder.setData(infoModels.get(position));
|
||||
} else if (holder instanceof RecommendViewHolder) {
|
||||
|
||||
RecommendViewHolder recommendViewHolder = (RecommendViewHolder) holder;
|
||||
recommendViewHolder.setData(infoModels.get(position));
|
||||
recommendViewHolder.updateData(list);
|
||||
|
||||
recommendViewHolder.setListener(new RecommendViewHolder.RecommendViewListener() {
|
||||
@Override
|
||||
public void changeOneBatch() {
|
||||
//推荐位
|
||||
MainNetManager.get((Activity) mContext)
|
||||
.anchorRecommend("9", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
|
||||
|
||||
List<AnchorRecommendItemModel> models = anchorRecommendModel.getList();
|
||||
int userIndex = -1;
|
||||
for (int i = 0; i < models.size(); i++) {
|
||||
if (TextUtils.equals(models.get(i).getUid(), liveId)) {
|
||||
userIndex = i;
|
||||
}
|
||||
}
|
||||
if (userIndex != -1) {
|
||||
models.remove(userIndex);
|
||||
}
|
||||
recommendViewHolder.updateData(models);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToLive(AnchorRecommendItemModel model) {
|
||||
if (listener != null) {
|
||||
listener.goToLive(model);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return infoModels.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
CustomSidebarInfoModel model = infoModels.get(position);
|
||||
switch (model.getType()) {
|
||||
case "1":
|
||||
return GOOD_GIFTS;
|
||||
case "2":
|
||||
return TASK_CENTER;
|
||||
case "3":
|
||||
return FUN_GAMES;
|
||||
case "4":
|
||||
return RIGHTS_INTERESTS;
|
||||
case "5":
|
||||
return RECOMMEND;
|
||||
}
|
||||
return super.getItemViewType(position);
|
||||
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarInfoModel> mInfoModels) {
|
||||
infoModels.clear();
|
||||
infoModels.addAll(mInfoModels);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private CustomDrawerListener listener;
|
||||
|
||||
public CustomDrawerPopupAdapter setListener(CustomDrawerListener listener) {
|
||||
this.listener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface CustomDrawerListener {
|
||||
void goToLive(AnchorRecommendItemModel model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.views.DrawerRecommendChildViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DrawerRecommendAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||
|
||||
public DrawerRecommendAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_drawer_recommend_child, parent, false);
|
||||
return new DrawerRecommendChildViewHolder(goodGiftsView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
DrawerRecommendChildViewHolder childViewHolder = (DrawerRecommendChildViewHolder) holder;
|
||||
childViewHolder.setData(child.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return child.size();
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
child.clear();
|
||||
child.addAll(mChild);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.DrawerTaskChildViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DrawerTaskAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||
|
||||
public DrawerTaskAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View taskCenterView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_tsak_center_child, parent, false);
|
||||
return new DrawerTaskChildViewHolder(taskCenterView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
DrawerTaskChildViewHolder taskChildViewHolder = (DrawerTaskChildViewHolder) holder;
|
||||
taskChildViewHolder.setData(child.get(position), position);
|
||||
taskChildViewHolder.setListener(new DrawerTaskChildViewHolder.DrawerTaskChildListener() {
|
||||
@Override
|
||||
public void giftSuccess(CustomSidebarChildModel model, int index) {
|
||||
//将领取的任务移动至任务列表尾部
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(false).setRefresh(true));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
child.clear();
|
||||
child.addAll(mChild);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.views.FunGamesChildViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FunGamesAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private boolean rigts;
|
||||
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||
|
||||
public FunGamesAdapter(Context mContext, boolean rigts) {
|
||||
this.mContext = mContext;
|
||||
this.rigts = rigts;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games_child_view, parent, false);
|
||||
return new FunGamesChildViewHolder(runGamesView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
FunGamesChildViewHolder childViewHolder = (FunGamesChildViewHolder) holder;
|
||||
childViewHolder.setData(child.get(position), rigts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return child.size();
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
child.clear();
|
||||
if (mChild.size() > 8) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
child.add(mChild.get(i));
|
||||
}
|
||||
} else {
|
||||
child.addAll(mChild);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void selectAll(List<CustomSidebarChildModel> mChild){
|
||||
child.clear();
|
||||
child.addAll(mChild);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.views.RecommendChildViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RecommendAdapter extends RecyclerView.Adapter {
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
private Context mContext;
|
||||
|
||||
public RecommendAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new RecommendChildViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_sidebar_lives_new, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
|
||||
RecommendChildViewHolder itemViewHolder = (RecommendChildViewHolder) holder;
|
||||
itemViewHolder.setData(list.get(position));
|
||||
itemViewHolder.setListener(new RecommendChildViewHolder.RecommendChildListener() {
|
||||
@Override
|
||||
public void goToLive(AnchorRecommendItemModel model) {
|
||||
if (callback != null) {
|
||||
callback.goToLive(model);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public void updateData(List<AnchorRecommendItemModel> mList) {
|
||||
list.clear();
|
||||
list.addAll(mList);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private RecommendCallback callback;
|
||||
|
||||
public RecommendAdapter setCallback(RecommendCallback callback) {
|
||||
this.callback = callback;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface RecommendCallback {
|
||||
void goToLive(AnchorRecommendItemModel model);
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
return position;
|
||||
}
|
||||
|
||||
protected boolean canClick() {
|
||||
protected static boolean canClick() {
|
||||
return ClickUtil.canClick();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.views.RobotMessageViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RobotMessageAdapter extends RecyclerView.Adapter {
|
||||
private List<LiveAiRobotBean.Message> messageList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View robotMessageView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_robot_message, parent, false);
|
||||
return new RobotMessageViewHolder(robotMessageView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
RobotMessageViewHolder messageViewHolder = (RobotMessageViewHolder) holder;
|
||||
messageViewHolder.setData(messageList.get(position), position + 1);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return messageList.size();
|
||||
}
|
||||
|
||||
|
||||
public void setDataAll(List<LiveAiRobotBean.Message> messages) {
|
||||
messageList.clear();
|
||||
messageList.addAll(messages);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
// 删除数据
|
||||
public void removeData(int position) {
|
||||
messageList.remove(position);
|
||||
//删除动画
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.views.RobotSayHelloViewHoler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RobotSayHelloAdapter extends RecyclerView.Adapter {
|
||||
private List<LiveAiRobotBean.Message> messageList = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_robot_message, parent, false);
|
||||
return new RobotSayHelloViewHoler(robotSayHelloView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
RobotSayHelloViewHoler robotSayHelloViewHoler = (RobotSayHelloViewHoler) holder;
|
||||
robotSayHelloViewHoler.setData(messageList.get(position), position + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return messageList.size();
|
||||
}
|
||||
|
||||
|
||||
public void setDataAll(List<LiveAiRobotBean.Message> messages) {
|
||||
messageList.clear();
|
||||
messageList.addAll(messages);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
// 删除数据
|
||||
public void removeData(int position) {
|
||||
messageList.remove(position);
|
||||
//删除动画
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class AnchorRecommendItemModel extends BaseModel {
|
||||
private String avatarThumb = "";
|
||||
@SerializedName("avatar2")
|
||||
private String avatar2 = "";
|
||||
@SerializedName("user_nicename")
|
||||
@SerializedName(value = "user_nicename", alternate = "userNiceName")
|
||||
private String userNicename = "";
|
||||
@SerializedName("level")
|
||||
private String level = "";
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class CheckLiveModel extends BaseModel {
|
||||
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
@SerializedName("type_val")
|
||||
private String typeVal;
|
||||
@SerializedName("type_msg")
|
||||
private String typeMsg;
|
||||
@SerializedName("live_sdk")
|
||||
private String liveSdk;
|
||||
|
||||
public static CheckLiveModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, CheckLiveModel.class);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeVal() {
|
||||
return typeVal;
|
||||
}
|
||||
|
||||
public void setTypeVal(String typeVal) {
|
||||
this.typeVal = typeVal;
|
||||
}
|
||||
|
||||
public String getTypeMsg() {
|
||||
return typeMsg;
|
||||
}
|
||||
|
||||
public void setTypeMsg(String typeMsg) {
|
||||
this.typeMsg = typeMsg;
|
||||
}
|
||||
|
||||
public String getLiveSdk() {
|
||||
return liveSdk;
|
||||
}
|
||||
|
||||
public void setLiveSdk(String liveSdk) {
|
||||
this.liveSdk = liveSdk;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
|
||||
import android.app.Activity;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,7 +15,7 @@ public class CrashSaveBean {
|
||||
private long enterRoom;//进入房间次数
|
||||
private long slidingRoom;//滑动直播间次数
|
||||
private long playSvga;//加载播放svga次数
|
||||
private List<WeakReference<Activity>> activities;//Activity数量
|
||||
private List<WeakReference<Activity>> activities = new ArrayList<>();//Activity数量
|
||||
|
||||
private CrashSaveBean() {
|
||||
|
||||
@@ -60,10 +61,14 @@ public class CrashSaveBean {
|
||||
}
|
||||
|
||||
public String getActivitySize() {
|
||||
StringBuilder builder=new StringBuilder();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (WeakReference<Activity> activity : activities) {
|
||||
if(activity.get()!=null){
|
||||
builder.append(activity.get()).append(",");
|
||||
try {
|
||||
if (activity.get() != null) {
|
||||
builder.append(activity.get().getClass().getSimpleName()).append(",");
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
return builder.toString();
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class CustomSidebarChildModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("parent_id")
|
||||
private String parentId;
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
@SerializedName("subtitle")
|
||||
private String subtitle;
|
||||
@SerializedName("icon")
|
||||
private String icon;
|
||||
@SerializedName("src")
|
||||
private String src;
|
||||
@SerializedName("show_type")
|
||||
private String showType;
|
||||
@SerializedName("sort")
|
||||
private String sort;
|
||||
@SerializedName("english")
|
||||
private String english;
|
||||
//奖励领取状态 0未达到领取要求 1已领取 2未领取
|
||||
@SerializedName("status")
|
||||
private String status;
|
||||
@SerializedName("need_num")
|
||||
private String needNum;
|
||||
@SerializedName("now_num")
|
||||
private String nowNum;
|
||||
@SerializedName("activity_id")
|
||||
private String activityId;
|
||||
@SerializedName("flag")
|
||||
private String flag;
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setActivityId(String activityId) {
|
||||
this.activityId = activityId;
|
||||
return this;
|
||||
}
|
||||
|
||||
private int resIcon;
|
||||
|
||||
public int getResIcon() {
|
||||
return resIcon;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setResIcon(int resIcon) {
|
||||
this.resIcon = resIcon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSubtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSrc() {
|
||||
return src;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setSrc(String src) {
|
||||
this.src = src;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setSort(String sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEnglish() {
|
||||
return english;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setEnglish(String english) {
|
||||
this.english = english;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setStatus(String status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedNum() {
|
||||
return needNum;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setNeedNum(String needNum) {
|
||||
this.needNum = needNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNowNum() {
|
||||
return nowNum;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setNowNum(String nowNum) {
|
||||
this.nowNum = nowNum;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新版自定义侧边栏
|
||||
*/
|
||||
public class CustomSidebarInfoModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
//一级标题
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
//二级标题
|
||||
@SerializedName("subtitle")
|
||||
private String subtitle;
|
||||
@SerializedName("sort")
|
||||
private String sort;
|
||||
//1全屏 2半屏
|
||||
@SerializedName("show_type")
|
||||
private String showType;
|
||||
//跳转链接
|
||||
@SerializedName("src")
|
||||
private String src;
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("child")
|
||||
private List<CustomSidebarChildModel> child;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSubtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setSort(String sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSrc() {
|
||||
return src;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setSrc(String src) {
|
||||
this.src = src;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<CustomSidebarChildModel> getChild() {
|
||||
return child;
|
||||
}
|
||||
|
||||
public CustomSidebarInfoModel setChild(List<CustomSidebarChildModel> child) {
|
||||
this.child = child;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,554 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnterRoomInfoModel extends BaseModel {
|
||||
@SerializedName("votestotal")
|
||||
private String votestotal;
|
||||
@SerializedName("medalRankNum")
|
||||
private String medalRankNum;
|
||||
@SerializedName("barrage_fee")
|
||||
private String barrageFee;
|
||||
@SerializedName("userlist_time")
|
||||
private String userlistTime;
|
||||
@SerializedName("chatserver")
|
||||
private String chatserver;
|
||||
@SerializedName("linkmic_uid")
|
||||
private String linkmicUid;
|
||||
@SerializedName("linkmic_pull")
|
||||
private String linkmicPull;
|
||||
@SerializedName("nums")
|
||||
private String nums;
|
||||
@SerializedName("game")
|
||||
private List<?> game;
|
||||
@SerializedName("gamebet")
|
||||
private List<String> gamebet;
|
||||
@SerializedName("gametime")
|
||||
private String gametime;
|
||||
@SerializedName("gameid")
|
||||
private String gameid;
|
||||
@SerializedName("gameaction")
|
||||
private String gameaction;
|
||||
@SerializedName("game_bankerid")
|
||||
private String gameBankerid;
|
||||
@SerializedName("game_banker_name")
|
||||
private String gameBankerName;
|
||||
@SerializedName("game_banker_avatar")
|
||||
private String gameBankerAvatar;
|
||||
@SerializedName("game_banker_coin")
|
||||
private String gameBankerCoin;
|
||||
@SerializedName("game_banker_limit")
|
||||
private String gameBankerLimit;
|
||||
@SerializedName("shut_time")
|
||||
private String shutTime;
|
||||
@SerializedName("kick_time")
|
||||
private String kickTime;
|
||||
@SerializedName("speak_limit")
|
||||
private String speakLimit;
|
||||
@SerializedName("barrage_limit")
|
||||
private String barrageLimit;
|
||||
@SerializedName("coin")
|
||||
private String coin;
|
||||
@SerializedName("vip")
|
||||
private VipModel vip;
|
||||
@SerializedName("liang")
|
||||
private LiangModel liang;
|
||||
@SerializedName("medal_level")
|
||||
private String medalLevel;
|
||||
@SerializedName("medal_name")
|
||||
private String medalName;
|
||||
@SerializedName("issuper")
|
||||
private String issuper;
|
||||
@SerializedName("usertype")
|
||||
private String usertype;
|
||||
@SerializedName("front_task")
|
||||
private String frontTask;
|
||||
@SerializedName("ismic")
|
||||
private String ismic;
|
||||
@SerializedName("isattention")
|
||||
private String isattention;
|
||||
@SerializedName("userlists")
|
||||
private List<LiveUserGiftBean> userlists;
|
||||
@SerializedName("guard")
|
||||
private GuardModel guard;
|
||||
@SerializedName("guard_nums")
|
||||
private String guardNums;
|
||||
@SerializedName("pkinfo")
|
||||
private PkinfoModel pkinfo;
|
||||
@SerializedName("lminfo")
|
||||
private LminfoModel lminfo;
|
||||
@SerializedName("isred")
|
||||
private String isred;
|
||||
@SerializedName("is_fans")
|
||||
private String isFans;
|
||||
@SerializedName("count_fans")
|
||||
private String countFans;
|
||||
@SerializedName("isconnection")
|
||||
private String isconnection;
|
||||
@SerializedName("isleave")
|
||||
private String isleave;
|
||||
@SerializedName("landscape")
|
||||
private String landscape;
|
||||
@SerializedName("un_charge")
|
||||
private String unCharge;
|
||||
@SerializedName("see_time")
|
||||
private String seeTime;
|
||||
@SerializedName("greetings")
|
||||
private List<String> greetings;
|
||||
@SerializedName("live_bg")
|
||||
private String liveBg;
|
||||
@SerializedName("anchor_goodnum")
|
||||
private String anchorGoodnum;
|
||||
@SerializedName("jackpot_level")
|
||||
private String jackpotLevel="-1";
|
||||
|
||||
public String getJackpotLevel() {
|
||||
|
||||
return jackpotLevel;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setJackpotLevel(String jackpotLevel) {
|
||||
this.jackpotLevel = jackpotLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVotestotal() {
|
||||
return votestotal;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setVotestotal(String votestotal) {
|
||||
this.votestotal = votestotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalRankNum() {
|
||||
return medalRankNum;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalRankNum(String medalRankNum) {
|
||||
this.medalRankNum = medalRankNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarrageFee() {
|
||||
return barrageFee;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setBarrageFee(String barrageFee) {
|
||||
this.barrageFee = barrageFee;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserlistTime() {
|
||||
return userlistTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUserlistTime(String userlistTime) {
|
||||
this.userlistTime = userlistTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getChatserver() {
|
||||
return chatserver;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setChatserver(String chatserver) {
|
||||
this.chatserver = chatserver;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLinkmicUid() {
|
||||
return linkmicUid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLinkmicUid(String linkmicUid) {
|
||||
this.linkmicUid = linkmicUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLinkmicPull() {
|
||||
return linkmicPull;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLinkmicPull(String linkmicPull) {
|
||||
this.linkmicPull = linkmicPull;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNums() {
|
||||
return nums;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setNums(String nums) {
|
||||
this.nums = nums;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<?> getGame() {
|
||||
return game;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGame(List<?> game) {
|
||||
this.game = game;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGamebet() {
|
||||
return gamebet;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGamebet(List<String> gamebet) {
|
||||
this.gamebet = gamebet;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGametime() {
|
||||
return gametime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGametime(String gametime) {
|
||||
this.gametime = gametime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameid() {
|
||||
return gameid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameid(String gameid) {
|
||||
this.gameid = gameid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameaction() {
|
||||
return gameaction;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameaction(String gameaction) {
|
||||
this.gameaction = gameaction;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerid() {
|
||||
return gameBankerid;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerid(String gameBankerid) {
|
||||
this.gameBankerid = gameBankerid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerName() {
|
||||
return gameBankerName;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerName(String gameBankerName) {
|
||||
this.gameBankerName = gameBankerName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerAvatar() {
|
||||
return gameBankerAvatar;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerAvatar(String gameBankerAvatar) {
|
||||
this.gameBankerAvatar = gameBankerAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerCoin() {
|
||||
return gameBankerCoin;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerCoin(String gameBankerCoin) {
|
||||
this.gameBankerCoin = gameBankerCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGameBankerLimit() {
|
||||
return gameBankerLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGameBankerLimit(String gameBankerLimit) {
|
||||
this.gameBankerLimit = gameBankerLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShutTime() {
|
||||
return shutTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setShutTime(String shutTime) {
|
||||
this.shutTime = shutTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getKickTime() {
|
||||
return kickTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setKickTime(String kickTime) {
|
||||
this.kickTime = kickTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSpeakLimit() {
|
||||
return speakLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setSpeakLimit(String speakLimit) {
|
||||
this.speakLimit = speakLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarrageLimit() {
|
||||
return barrageLimit;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setBarrageLimit(String barrageLimit) {
|
||||
this.barrageLimit = barrageLimit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setCoin(String coin) {
|
||||
this.coin = coin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public VipModel getVip() {
|
||||
return vip;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setVip(VipModel vip) {
|
||||
this.vip = vip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiangModel getLiang() {
|
||||
return liang;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLiang(LiangModel liang) {
|
||||
this.liang = liang;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalLevel() {
|
||||
return medalLevel;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalLevel(String medalLevel) {
|
||||
this.medalLevel = medalLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalName() {
|
||||
return medalName;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setMedalName(String medalName) {
|
||||
this.medalName = medalName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIssuper() {
|
||||
return issuper;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIssuper(String issuper) {
|
||||
this.issuper = issuper;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUsertype() {
|
||||
return usertype;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUsertype(String usertype) {
|
||||
this.usertype = usertype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFrontTask() {
|
||||
return frontTask;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setFrontTask(String frontTask) {
|
||||
this.frontTask = frontTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsmic() {
|
||||
return ismic;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsmic(String ismic) {
|
||||
this.ismic = ismic;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsattention() {
|
||||
return isattention;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsattention(String isattention) {
|
||||
this.isattention = isattention;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<LiveUserGiftBean> getUserlists() {
|
||||
return userlists;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUserlists(List<LiveUserGiftBean> userlists) {
|
||||
this.userlists = userlists;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuardModel getGuard() {
|
||||
return guard;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGuard(GuardModel guard) {
|
||||
this.guard = guard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardNums() {
|
||||
return guardNums;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGuardNums(String guardNums) {
|
||||
this.guardNums = guardNums;
|
||||
return this;
|
||||
}
|
||||
|
||||
public PkinfoModel getPkinfo() {
|
||||
return pkinfo;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setPkinfo(PkinfoModel pkinfo) {
|
||||
this.pkinfo = pkinfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LminfoModel getLminfo() {
|
||||
return lminfo;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLminfo(LminfoModel lminfo) {
|
||||
this.lminfo = lminfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsred() {
|
||||
return isred;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsred(String isred) {
|
||||
this.isred = isred;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsFans() {
|
||||
return isFans;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsFans(String isFans) {
|
||||
this.isFans = isFans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountFans() {
|
||||
return countFans;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setCountFans(String countFans) {
|
||||
this.countFans = countFans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsconnection() {
|
||||
if(StringUtil.isEmpty(isconnection)){
|
||||
isconnection="0";
|
||||
}
|
||||
return isconnection;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsconnection(String isconnection) {
|
||||
this.isconnection = isconnection;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsleave() {
|
||||
return isleave;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setIsleave(String isleave) {
|
||||
this.isleave = isleave;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLandscape() {
|
||||
return landscape;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLandscape(String landscape) {
|
||||
this.landscape = landscape;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUnCharge() {
|
||||
return unCharge;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setUnCharge(String unCharge) {
|
||||
this.unCharge = unCharge;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSeeTime() {
|
||||
return seeTime;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setSeeTime(String seeTime) {
|
||||
this.seeTime = seeTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGreetings() {
|
||||
return greetings;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGreetings(List<String> greetings) {
|
||||
this.greetings = greetings;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveBg() {
|
||||
return liveBg;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setLiveBg(String liveBg) {
|
||||
this.liveBg = liveBg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnchorGoodnum() {
|
||||
return anchorGoodnum;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setAnchorGoodnum(String anchorGoodnum) {
|
||||
this.anchorGoodnum = anchorGoodnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 整合进入直播间接口
|
||||
*/
|
||||
public class EnterRoomNewModel extends BaseModel {
|
||||
|
||||
@SerializedName("liveInfo")
|
||||
private LiveInfoModel liveInfo = new LiveInfoModel();//直播间信息
|
||||
@SerializedName("enterRoomInfo")
|
||||
private EnterRoomInfoModel enterRoomInfo = new EnterRoomInfoModel();//原接口进入直播间数据返回
|
||||
@SerializedName("rankHour")
|
||||
private RankHourModel rankHour = new RankHourModel();//.热度卡
|
||||
@SerializedName("newPeopleTask")
|
||||
private NewPeopleTaskModel newPeopleTask = new NewPeopleTaskModel();//新人任务
|
||||
@SerializedName("wishList")
|
||||
private WishListModel wishList = new WishListModel();//心愿单
|
||||
@SerializedName("guardUser")
|
||||
private GuardUserModel guardUserAvatar = new GuardUserModel();//守护
|
||||
@SerializedName("activeList")
|
||||
private List<ActiveModel> activeList = new ArrayList<>();//活动列表
|
||||
@SerializedName("isUseHotCard")
|
||||
private String isUseHotCard = "";//是否使用热度卡
|
||||
@SerializedName("liveRoomActivity")
|
||||
private List<LiveRoomActivityModel> liveRoomActivityModels = new ArrayList<>();//活动列表
|
||||
@SerializedName("clarityType")
|
||||
private int clarityType;
|
||||
|
||||
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
|
||||
return liveRoomActivityModels;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setLiveRoomActivityModels(List<LiveRoomActivityModel> liveRoomActivityModels) {
|
||||
this.liveRoomActivityModels = liveRoomActivityModels;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveInfoModel getLiveInfo() {
|
||||
return liveInfo;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setLiveInfo(LiveInfoModel liveInfo) {
|
||||
this.liveInfo = liveInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel getEnterRoomInfo() {
|
||||
return enterRoomInfo;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setEnterRoomInfo(EnterRoomInfoModel enterRoomInfo) {
|
||||
this.enterRoomInfo = enterRoomInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RankHourModel getRankHour() {
|
||||
return rankHour;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setRankHour(RankHourModel rankHour) {
|
||||
this.rankHour = rankHour;
|
||||
return this;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel getNewPeopleTask() {
|
||||
return newPeopleTask;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setNewPeopleTask(NewPeopleTaskModel newPeopleTask) {
|
||||
this.newPeopleTask = newPeopleTask;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WishListModel getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setWishList(WishListModel wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuardUserModel getGuardUserAvatar() {
|
||||
return guardUserAvatar;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setGuardUserAvatar(GuardUserModel guardUserAvatar) {
|
||||
this.guardUserAvatar = guardUserAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<ActiveModel> getActiveList() {
|
||||
return activeList;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setActiveList(List<ActiveModel> activeList) {
|
||||
this.activeList = activeList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsUseHotCard() {
|
||||
return isUseHotCard;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setIsUseHotCard(String isUseHotCard) {
|
||||
this.isUseHotCard = isUseHotCard;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getClarityType() {
|
||||
return clarityType;
|
||||
}
|
||||
|
||||
public void setClarityType(int clarityType) {
|
||||
this.clarityType = clarityType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnterRoomNewModel{" +
|
||||
"liveInfo=" + liveInfo +
|
||||
", enterRoomInfo=" + enterRoomInfo +
|
||||
", rankHour=" + rankHour +
|
||||
", newPeopleTask=" + newPeopleTask +
|
||||
", wishList=" + wishList +
|
||||
", guardUserAvatar=" + guardUserAvatar +
|
||||
", activeList=" + activeList +
|
||||
", isUseHotCard='" + isUseHotCard + '\'' +
|
||||
", liveRoomActivityModels=" + liveRoomActivityModels +
|
||||
", clarityType=" + clarityType +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GiftModel extends BaseModel{
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("sendtype")
|
||||
private String sendtype;
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("mark")
|
||||
private String mark;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("needcoin")
|
||||
private String needcoin;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
@SerializedName("swf")
|
||||
private String swf;
|
||||
@SerializedName("gift_uid")
|
||||
private String giftUid;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GiftModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendtype() {
|
||||
return sendtype;
|
||||
}
|
||||
|
||||
public GiftModel setSendtype(String sendtype) {
|
||||
this.sendtype = sendtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GiftModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMark() {
|
||||
return mark;
|
||||
}
|
||||
|
||||
public GiftModel setMark(String mark) {
|
||||
this.mark = mark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname() {
|
||||
return giftname;
|
||||
}
|
||||
|
||||
public GiftModel setGiftname(String giftname) {
|
||||
this.giftname = giftname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public GiftModel setNeedcoin(String needcoin) {
|
||||
this.needcoin = needcoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public GiftModel setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSwf() {
|
||||
return swf;
|
||||
}
|
||||
|
||||
public GiftModel setSwf(String swf) {
|
||||
this.swf = swf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftUid() {
|
||||
return giftUid;
|
||||
}
|
||||
|
||||
public GiftModel setGiftUid(String giftUid) {
|
||||
this.giftUid = giftUid;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
29
common/src/main/java/com/yunbao/common/bean/GuardModel.java
Normal file
29
common/src/main/java/com/yunbao/common/bean/GuardModel.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardModel extends BaseModel {
|
||||
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GuardModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardModel setEndtime(String endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardUserModel extends BaseModel{
|
||||
|
||||
@SerializedName("guardUserAvatar")
|
||||
private String guardUserAvatar;
|
||||
@SerializedName("guardType")
|
||||
private String guardType;
|
||||
|
||||
public static GuardUserModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, GuardUserModel.class);
|
||||
}
|
||||
|
||||
public String getGuardUserAvatar() {
|
||||
return guardUserAvatar;
|
||||
}
|
||||
|
||||
public void setGuardUserAvatar(String guardUserAvatar) {
|
||||
this.guardUserAvatar = guardUserAvatar;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public void setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
|
||||
public class HttpCallbackModel extends BaseModel {
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
public HttpCallbackModel() {
|
||||
}
|
||||
|
||||
public HttpCallbackModel(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
@@ -64,6 +66,7 @@ public class IMLoginModel extends BaseModel {
|
||||
* noble_name : 贵族
|
||||
* sex : 1
|
||||
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||
* users_type : A
|
||||
* votes : 0.00
|
||||
* votestotal : 0
|
||||
@@ -222,6 +225,126 @@ public class IMLoginModel extends BaseModel {
|
||||
//超皇字体颜色
|
||||
@SerializedName("contentColor")
|
||||
private String contentColor = "";
|
||||
//创建时间
|
||||
@SerializedName("create_time")
|
||||
private String createTime = "";
|
||||
|
||||
@SerializedName("is_guess")
|
||||
private String isGuess = "";
|
||||
|
||||
@SerializedName("goodnum_expire_time")
|
||||
private String goodnumExpireTime = "";
|
||||
|
||||
@SerializedName("version")
|
||||
private String version = "";
|
||||
|
||||
@SerializedName("max_noble_end_time")
|
||||
private String maxNobleEndTime = "";
|
||||
|
||||
@SerializedName("custom_color_id")
|
||||
private String customColorId = "";
|
||||
|
||||
@SerializedName("is_chat")
|
||||
private String isChat = "";
|
||||
|
||||
@SerializedName("is_rong")
|
||||
private String isRong = "";
|
||||
|
||||
@SerializedName("contribution")
|
||||
private String contribution = "";
|
||||
|
||||
@SerializedName("guard_type")
|
||||
private String guardType = "";
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsGuess() {
|
||||
return isGuess;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsGuess(String isGuess) {
|
||||
this.isGuess = isGuess;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoodnumExpireTime() {
|
||||
return goodnumExpireTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setGoodnumExpireTime(String goodnumExpireTime) {
|
||||
this.goodnumExpireTime = goodnumExpireTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public IMLoginModel setVersion(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMaxNobleEndTime() {
|
||||
return maxNobleEndTime;
|
||||
}
|
||||
|
||||
public IMLoginModel setMaxNobleEndTime(String maxNobleEndTime) {
|
||||
this.maxNobleEndTime = maxNobleEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCustomColorId() {
|
||||
return customColorId;
|
||||
}
|
||||
|
||||
public IMLoginModel setCustomColorId(String customColorId) {
|
||||
this.customColorId = customColorId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsChat() {
|
||||
return isChat;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsChat(String isChat) {
|
||||
this.isChat = isChat;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsRong() {
|
||||
return isRong;
|
||||
}
|
||||
|
||||
public IMLoginModel setIsRong(String isRong) {
|
||||
this.isRong = isRong;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getContribution() {
|
||||
return contribution;
|
||||
}
|
||||
|
||||
public IMLoginModel setContribution(String contribution) {
|
||||
this.contribution = contribution;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public IMLoginModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNobleEndTime() {
|
||||
return nobleEndTime;
|
||||
@@ -679,6 +802,15 @@ public class IMLoginModel extends BaseModel {
|
||||
return usersType;
|
||||
}
|
||||
|
||||
/**
|
||||
* usersType ==C 是主播身份
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean anchorUserType() {
|
||||
return TextUtils.equals("C", usersType);
|
||||
}
|
||||
|
||||
public IMLoginModel setUsersType(String usersType) {
|
||||
this.usersType = usersType;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LinkMicUserBean extends BaseModel {
|
||||
@SerializedName("user_nicename")
|
||||
private String uname;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("dress_avatar")
|
||||
private String dress_avatar;
|
||||
private String uid = "";
|
||||
private String action;
|
||||
@SerializedName("id")
|
||||
private String id;//连麦显示右侧头像时要用
|
||||
@SerializedName("level")
|
||||
private int level;
|
||||
@SerializedName("sex")
|
||||
private int sex;
|
||||
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public void setUname(String uname) {
|
||||
this.uname = uname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getDress_avatar() {
|
||||
return dress_avatar;
|
||||
}
|
||||
|
||||
public void setDress_avatar(String dress_avatar) {
|
||||
this.dress_avatar = dress_avatar;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LinkMicUserBean{" +
|
||||
"uname='" + uname + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", dress_avatar='" + dress_avatar + '\'' +
|
||||
", uid='" + uid + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", level=" + level +
|
||||
", sex=" + sex +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LinkMicUserBeanV2 extends BaseModel {
|
||||
private String roomuserid;
|
||||
private int status;
|
||||
private List<LinkMicUserBean> userlist;
|
||||
|
||||
public String getRoomuserid() {
|
||||
return roomuserid;
|
||||
}
|
||||
|
||||
public void setRoomuserid(String roomuserid) {
|
||||
this.roomuserid = roomuserid;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public List<LinkMicUserBean> getUserlist() {
|
||||
return userlist;
|
||||
}
|
||||
|
||||
public void setUserlist(List<LinkMicUserBean> userlist) {
|
||||
this.userlist = userlist;
|
||||
}
|
||||
}
|
||||
138
common/src/main/java/com/yunbao/common/bean/LiveAiRobotBean.java
Normal file
138
common/src/main/java/com/yunbao/common/bean/LiveAiRobotBean.java
Normal file
@@ -0,0 +1,138 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 机器人bean
|
||||
*/
|
||||
public class LiveAiRobotBean extends BaseModel {
|
||||
@SerializedName("ai_name")
|
||||
private String name;
|
||||
@SerializedName("ai_state")
|
||||
private int status;//1=开 0=关
|
||||
@SerializedName("ai_time")
|
||||
private int time;
|
||||
@SerializedName("ai_sayhi")
|
||||
private int autoSeyHiNumber;// 自动打招呼已配置数量
|
||||
@SerializedName("ai_gz")
|
||||
private int autoRequestFollowNumber;//自动求关注已配置数量
|
||||
|
||||
public LiveAiRobotBean() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(int time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public int getAutoSeyHiNumber() {
|
||||
return autoSeyHiNumber;
|
||||
}
|
||||
|
||||
public void setAutoSeyHiNumber(int autoSeyHiNumber) {
|
||||
this.autoSeyHiNumber = autoSeyHiNumber;
|
||||
}
|
||||
|
||||
public int getAutoRequestFollowNumber() {
|
||||
return autoRequestFollowNumber;
|
||||
}
|
||||
|
||||
public void setAutoRequestFollowNumber(int autoRequestFollowNumber) {
|
||||
this.autoRequestFollowNumber = autoRequestFollowNumber;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveAiRobotBean{" +
|
||||
"name='" + name + '\'' +
|
||||
", status=" + status +
|
||||
", time=" + time +
|
||||
", autoSeyHiNumber=" + autoSeyHiNumber +
|
||||
", autoRequestFollowNumber=" + autoRequestFollowNumber +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* 机器人消息
|
||||
*/
|
||||
public static class Message {
|
||||
public static final int TYPE_SAY_HI=1;//自动打招呼
|
||||
public static final int TYPE_FOLLOW=3;//自动求关注
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("uid")
|
||||
private int uid;
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
@SerializedName("content")
|
||||
private String content;
|
||||
|
||||
public Message() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Message{" +
|
||||
"id=" + id +
|
||||
", uid=" + uid +
|
||||
", type=" + type +
|
||||
", content='" + content + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,10 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/9.
|
||||
@@ -53,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
return recommendCardIconSizeTwo;
|
||||
}
|
||||
@@ -83,6 +84,14 @@ public class LiveBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getRecommendcardtype() {
|
||||
return recommendCardtype;
|
||||
}
|
||||
@@ -378,27 +387,28 @@ public class LiveBean implements Parcelable {
|
||||
*/
|
||||
public String getLiangNameTip() {
|
||||
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
|
||||
return WordUtil.getString(R.string.live_liang) + ":" + this.goodNum;
|
||||
return this.goodNum;
|
||||
}
|
||||
return "ID:" + this.uid;
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
public LiveBean() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private LiveBean(Parcel in) {
|
||||
this.uid = in.readString();
|
||||
this.avatar = in.readString();
|
||||
this.avatarThumb = in.readString();
|
||||
this.userNiceName = in.readString();
|
||||
this.sex = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.city = in.readString();
|
||||
this.stream = in.readString();
|
||||
this.pull = in.readString();
|
||||
this.thumb = in.readString();
|
||||
this.nums = in.readString();
|
||||
this.sex = in.readInt();
|
||||
this.distance = in.readString();
|
||||
this.levelAnchor = in.readInt();
|
||||
this.type = in.readInt();
|
||||
@@ -406,6 +416,23 @@ public class LiveBean implements Parcelable {
|
||||
this.goodNum = in.readString();
|
||||
this.gameAction = in.readInt();
|
||||
this.game = in.readString();
|
||||
this.islive = in.readString();
|
||||
this.isTop = in.readString();
|
||||
this.pk_avatar_thumb = in.readString();
|
||||
this.landscape = in.readInt();
|
||||
this.hot_num = in.readString();
|
||||
this.content_pic_size_one = in.readString();
|
||||
this.content_pic_size_two = in.readString();
|
||||
this.content_pic_size_three = in.readString();
|
||||
this.is_week = in.readString();
|
||||
this.img = in.readString();
|
||||
this.url = in.readString();
|
||||
this.drpk_status = in.readString();
|
||||
this.is_rong = in.readInt();
|
||||
this.isattention = in.readString();
|
||||
this.recommendCardtype = in.readString();
|
||||
this.recommendCardIconSizeTwo = in.readString();
|
||||
this.recommendCardIconSizeThree = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -419,13 +446,13 @@ public class LiveBean implements Parcelable {
|
||||
dest.writeString(this.avatar);
|
||||
dest.writeString(this.avatarThumb);
|
||||
dest.writeString(this.userNiceName);
|
||||
dest.writeInt(this.sex);
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.city);
|
||||
dest.writeString(this.stream);
|
||||
dest.writeString(this.pull);
|
||||
dest.writeString(this.thumb);
|
||||
dest.writeString(this.nums);
|
||||
dest.writeInt(this.sex);
|
||||
dest.writeString(this.distance);
|
||||
dest.writeInt(this.levelAnchor);
|
||||
dest.writeInt(this.type);
|
||||
@@ -433,6 +460,23 @@ public class LiveBean implements Parcelable {
|
||||
dest.writeString(this.goodNum);
|
||||
dest.writeInt(this.gameAction);
|
||||
dest.writeString(this.game);
|
||||
dest.writeString(this.islive);
|
||||
dest.writeString(this.isTop);
|
||||
dest.writeString(this.pk_avatar_thumb);
|
||||
dest.writeInt(this.landscape);
|
||||
dest.writeString(this.hot_num);
|
||||
dest.writeString(this.content_pic_size_one);
|
||||
dest.writeString(this.content_pic_size_two);
|
||||
dest.writeString(this.content_pic_size_three);
|
||||
dest.writeString(this.is_week);
|
||||
dest.writeString(this.img);
|
||||
dest.writeString(this.url);
|
||||
dest.writeString(this.drpk_status);
|
||||
dest.writeInt(this.is_rong);
|
||||
dest.writeString(this.isattention);
|
||||
dest.writeString(this.recommendCardtype);
|
||||
dest.writeString(this.recommendCardIconSizeTwo);
|
||||
dest.writeString(this.recommendCardIconSizeThree);
|
||||
}
|
||||
|
||||
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
|
||||
@@ -449,6 +493,44 @@ public class LiveBean implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "uid: " + uid + " , userNiceName: " + userNiceName + " ,playUrl: " + pull;
|
||||
return "LiveBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", stream='" + stream + '\'' +
|
||||
", pull='" + pull + '\'' +
|
||||
", thumb='" + thumb + '\'' +
|
||||
", nums='" + nums + '\'' +
|
||||
", sex=" + sex +
|
||||
", distance='" + distance + '\'' +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", type=" + type +
|
||||
", typeVal='" + typeVal + '\'' +
|
||||
", goodNum='" + goodNum + '\'' +
|
||||
", gameAction=" + gameAction +
|
||||
", game='" + game + '\'' +
|
||||
", islive='" + islive + '\'' +
|
||||
", isTop='" + isTop + '\'' +
|
||||
", pk_avatar_thumb='" + pk_avatar_thumb + '\'' +
|
||||
", landscape=" + landscape +
|
||||
", hot_num='" + hot_num + '\'' +
|
||||
", content_pic_size_one='" + content_pic_size_one + '\'' +
|
||||
", content_pic_size_two='" + content_pic_size_two + '\'' +
|
||||
", content_pic_size_three='" + content_pic_size_three + '\'' +
|
||||
", is_week='" + is_week + '\'' +
|
||||
", img='" + img + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
", drpk_status='" + drpk_status + '\'' +
|
||||
", is_rong=" + is_rong +
|
||||
", isattention='" + isattention + '\'' +
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class LiveInfoModel extends BaseModel {
|
||||
@SerializedName("islive")
|
||||
private long islive;
|
||||
@SerializedName("landscape")
|
||||
private long landscape = 0;
|
||||
private int landscape = 0;
|
||||
@SerializedName("is_rong")
|
||||
private long isRong = 0;
|
||||
@SerializedName("nums")
|
||||
@@ -208,11 +208,11 @@ public class LiveInfoModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public long getLandscape() {
|
||||
public int getLandscape() {
|
||||
return landscape;
|
||||
}
|
||||
|
||||
public LiveInfoModel setLandscape(long landscape) {
|
||||
public LiveInfoModel setLandscape(int landscape) {
|
||||
this.landscape = landscape;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 活动列表
|
||||
*/
|
||||
public class LiveRoomActivityModel extends BaseModel {
|
||||
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
@SerializedName("link")
|
||||
private String link;
|
||||
@SerializedName("is_hidden")
|
||||
private String isHidden;
|
||||
@SerializedName("show_type")
|
||||
private String showType;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setLink(String link) {
|
||||
this.link = link;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsHidden() {
|
||||
return isHidden;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setIsHidden(String isHidden) {
|
||||
this.isHidden = isHidden;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getShowType() {
|
||||
return showType;
|
||||
}
|
||||
|
||||
public LiveRoomActivityModel setShowType(String showType) {
|
||||
this.showType = showType;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.yunbao.live.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.common.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LiveStetUpStatusModel extends BaseModel {
|
||||
|
||||
@SerializedName("wishList")
|
||||
private String wishList;
|
||||
@SerializedName("ai_state")
|
||||
private String aiState;
|
||||
|
||||
/**
|
||||
* wishList 1设置 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getWishListState() {
|
||||
return TextUtils.equals(wishList, "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* aiState 1打开机器人 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getAiStateState() {
|
||||
return TextUtils.equals(aiState, "1");
|
||||
}
|
||||
|
||||
public String getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setWishList(String wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAiState() {
|
||||
return aiState;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setAiState(String aiState) {
|
||||
this.aiState = aiState;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/27.
|
||||
* 直播间用户列表实体类
|
||||
*/
|
||||
|
||||
public class LiveUserGiftBean extends UserBean {
|
||||
|
||||
private String contribution;
|
||||
private int guardType;
|
||||
private int nub;
|
||||
|
||||
public LiveUserGiftBean() {
|
||||
}
|
||||
|
||||
public int getNub() {
|
||||
return nub;
|
||||
}
|
||||
|
||||
public void setNub(int nub) {
|
||||
this.nub = nub;
|
||||
}
|
||||
|
||||
public String getContribution() {
|
||||
return contribution;
|
||||
}
|
||||
|
||||
public void setContribution(String contribution) {
|
||||
this.contribution = contribution;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否送过礼物
|
||||
*/
|
||||
public boolean hasContribution() {
|
||||
return !TextUtils.isEmpty(this.contribution) && !"0".equals(this.contribution);
|
||||
}
|
||||
|
||||
@JSONField(name = "guard_type")
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
@JSONField(name = "guard_type")
|
||||
public void setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
|
||||
public LiveUserGiftBean(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveUserGiftBean{" +
|
||||
"contribution='" + contribution + '\'' +
|
||||
", guardType=" + guardType +
|
||||
", nub=" + nub +
|
||||
", id='" + id + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", sex=" + sex +
|
||||
", signature='" + signature + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", gold='" + gold + '\'' +
|
||||
", votes='" + votes + '\'' +
|
||||
", consumption='" + consumption + '\'' +
|
||||
", votestotal='" + votestotal + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", birthday='" + birthday + '\'' +
|
||||
", level=" + level +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", lives=" + lives +
|
||||
", follows=" + follows +
|
||||
", fans=" + fans +
|
||||
", vip=" + vip +
|
||||
", liang=" + liang +
|
||||
", car=" + car +
|
||||
", medal_level=" + medal_level +
|
||||
", medal_name='" + medal_name + '\'' +
|
||||
", Dress=" + Dress +
|
||||
", noble_id='" + noble_id + '\'' +
|
||||
", yuanbao='" + yuanbao + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
23
common/src/main/java/com/yunbao/common/bean/LminfoModel.java
Normal file
23
common/src/main/java/com/yunbao/common/bean/LminfoModel.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LminfoModel extends BaseModel{
|
||||
|
||||
@SerializedName("status")
|
||||
private int status;
|
||||
|
||||
public static LminfoModel objectFromData(String str) {
|
||||
|
||||
return new Gson().fromJson(str, LminfoModel.class);
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
package com.yunbao.live.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
public class MicUserBean {
|
||||
public class MicUserBean extends BaseModel{
|
||||
protected String id;
|
||||
protected String userNiceName;
|
||||
protected String avatar;
|
||||
protected int level;
|
||||
protected int sex;
|
||||
protected String dress_avatar;
|
||||
protected int type;
|
||||
|
||||
@JSONField(name = "dress_avatar")
|
||||
public String getDress_avatar() {
|
||||
@@ -65,4 +66,12 @@ public class MicUserBean {
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,17 @@ public class MsgModel extends BaseModel {
|
||||
private String taskName1;
|
||||
@SerializedName("taskName2")
|
||||
private String taskName2;
|
||||
@SerializedName("activityUrl")
|
||||
private String activityUrl;
|
||||
|
||||
public String getActivityUrl() {
|
||||
return activityUrl;
|
||||
}
|
||||
|
||||
public MsgModel setActivityUrl(String activityUrl) {
|
||||
this.activityUrl = activityUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 星级挑战成功IM消息
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.video.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 新用户等级牌
|
||||
*/
|
||||
public class NewLevelModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("levelmin")
|
||||
private String levemin;
|
||||
@SerializedName("levelmax")
|
||||
private String levemax;
|
||||
@SerializedName("thumb")
|
||||
private String thumb;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public NewLevelModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevemin() {
|
||||
return levemin;
|
||||
}
|
||||
|
||||
public int getLeveMin() {
|
||||
if (TextUtils.isEmpty(levemin)) {
|
||||
levemin = "0";
|
||||
}
|
||||
return Integer.parseInt(levemin);
|
||||
}
|
||||
|
||||
public int getLeveMax() {
|
||||
if (TextUtils.isEmpty(levemax)) {
|
||||
levemax = "0";
|
||||
}
|
||||
return Integer.parseInt(levemax);
|
||||
}
|
||||
|
||||
public NewLevelModel setLevemin(String levemin) {
|
||||
this.levemin = levemin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevemax() {
|
||||
return levemax;
|
||||
}
|
||||
|
||||
public NewLevelModel setLevemax(String levemax) {
|
||||
this.levemax = levemax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getThumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public NewLevelModel setThumb(String thumb) {
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class NewPeopleTaskModel extends BaseModel {
|
||||
|
||||
@SerializedName("task")
|
||||
private TaskModel task = new TaskModel();
|
||||
@SerializedName("gift")
|
||||
private GiftModel gift = new GiftModel();
|
||||
@SerializedName("reward_all")
|
||||
private RewardAllModel rewardAll = new RewardAllModel();
|
||||
@SerializedName("reward_one")
|
||||
private RewardAllModel rewardOne = new RewardAllModel();
|
||||
|
||||
public TaskModel getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setTask(TaskModel task) {
|
||||
this.task = task;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GiftModel getGift() {
|
||||
return gift;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setGift(GiftModel gift) {
|
||||
this.gift = gift;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RewardAllModel getRewardAll() {
|
||||
return rewardAll;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setRewardAll(RewardAllModel rewardAll) {
|
||||
this.rewardAll = rewardAll;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RewardAllModel getRewardOne() {
|
||||
return rewardOne;
|
||||
}
|
||||
|
||||
public NewPeopleTaskModel setRewardOne(RewardAllModel rewardOne) {
|
||||
this.rewardOne = rewardOne;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PKTopThreeModel extends BaseModel {
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public PKTopThreeModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
110
common/src/main/java/com/yunbao/common/bean/PkRankBean.java
Normal file
110
common/src/main/java/com/yunbao/common/bean/PkRankBean.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
/**
|
||||
* 直播间PK排位赛
|
||||
*/
|
||||
public class PkRankBean extends BaseModel {
|
||||
@SerializedName("anchor_id")
|
||||
public int id;
|
||||
@SerializedName("rank_name")
|
||||
public String name;
|
||||
@SerializedName("rank_img")
|
||||
public String img;
|
||||
@SerializedName("win_continuity1")
|
||||
public String redVal;
|
||||
@SerializedName("win_continuity2")
|
||||
public String blueVal;
|
||||
@SerializedName("pktt_img")
|
||||
public String pkTopImgUrl;
|
||||
@SerializedName("link")
|
||||
public String clickUrl;
|
||||
@SerializedName("vs_img")
|
||||
public String vsImgUrl;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getRedVal() {
|
||||
if (StringUtil.isEmpty(redVal)) {
|
||||
redVal = "0";
|
||||
}
|
||||
return redVal;
|
||||
}
|
||||
|
||||
public void setRedVal(String redVal) {
|
||||
this.redVal = redVal;
|
||||
}
|
||||
|
||||
public String getBlueVal() {
|
||||
if (StringUtil.isEmpty(blueVal)) {
|
||||
blueVal = "0";
|
||||
}
|
||||
return blueVal;
|
||||
}
|
||||
|
||||
public void setBlueVal(String blueVal) {
|
||||
this.blueVal = blueVal;
|
||||
}
|
||||
|
||||
public String getPkTopImgUrl() {
|
||||
return pkTopImgUrl;
|
||||
}
|
||||
|
||||
public void setPkTopImgUrl(String pkTopImgUrl) {
|
||||
this.pkTopImgUrl = pkTopImgUrl;
|
||||
}
|
||||
|
||||
public String getClickUrl() {
|
||||
return clickUrl;
|
||||
}
|
||||
|
||||
public void setClickUrl(String clickUrl) {
|
||||
this.clickUrl = clickUrl;
|
||||
}
|
||||
|
||||
public String getVsImgUrl() {
|
||||
return vsImgUrl;
|
||||
}
|
||||
|
||||
public void setVsImgUrl(String vsImgUrl) {
|
||||
this.vsImgUrl = vsImgUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PkRankBean{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", img='" + img + '\'' +
|
||||
", redVal='" + redVal + '\'' +
|
||||
", blueVal='" + blueVal + '\'' +
|
||||
", pkTopImgUrl='" + pkTopImgUrl + '\'' +
|
||||
", clickUrl='" + clickUrl + '\'' +
|
||||
", vsImgUrl='" + vsImgUrl + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PkTopUsersModel extends BaseModel {
|
||||
@SerializedName("red_one")
|
||||
private PKTopThreeModel redOne;
|
||||
@SerializedName("red_two")
|
||||
private PKTopThreeModel redTwo;
|
||||
@SerializedName("red_three")
|
||||
private PKTopThreeModel redThree;
|
||||
@SerializedName("blue_one")
|
||||
private PKTopThreeModel blueOne;
|
||||
@SerializedName("blue_two")
|
||||
private PKTopThreeModel blueTwo;
|
||||
@SerializedName("blue_three")
|
||||
private PKTopThreeModel blueThree;
|
||||
}
|
||||
172
common/src/main/java/com/yunbao/common/bean/PkinfoModel.java
Normal file
172
common/src/main/java/com/yunbao/common/bean/PkinfoModel.java
Normal file
@@ -0,0 +1,172 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PkinfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("pkuid")
|
||||
private String pkuid;
|
||||
@SerializedName("pkuname")
|
||||
private String pkuname;
|
||||
@SerializedName("pkuimg")
|
||||
private String pkuimg;
|
||||
@SerializedName("pkpull")
|
||||
private String pkpull;
|
||||
@SerializedName("ifpk")
|
||||
private String ifpk;
|
||||
@SerializedName("pk_time")
|
||||
private String pkTime;
|
||||
@SerializedName("end_pk_time")
|
||||
private String endPkTime;
|
||||
@SerializedName("pk_gift_liveuid")
|
||||
private String pkGiftLiveuid;
|
||||
@SerializedName("pk_gift_pkuid")
|
||||
private String pkGiftPkuid;
|
||||
@SerializedName("anyway")
|
||||
private String anyway;
|
||||
@SerializedName("drpk_status")
|
||||
private String drpkStatus;
|
||||
@SerializedName("drpk_roomid")
|
||||
private String drpkRoomid;
|
||||
@SerializedName("drpk_time")
|
||||
private String drpkTime;
|
||||
@SerializedName("pk_top_users")
|
||||
private PkTopUsersModel pkTopUsers;
|
||||
@SerializedName("userlist")
|
||||
private JsonArray userlist;
|
||||
|
||||
public JsonArray getUserlist() {
|
||||
return userlist;
|
||||
}
|
||||
|
||||
public void setUserlist(JsonArray userlist) {
|
||||
this.userlist = userlist;
|
||||
}
|
||||
|
||||
public String getPkuid() {
|
||||
return pkuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuid(String pkuid) {
|
||||
this.pkuid = pkuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkuname() {
|
||||
return pkuname;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuname(String pkuname) {
|
||||
this.pkuname = pkuname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkuimg() {
|
||||
return pkuimg;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkuimg(String pkuimg) {
|
||||
this.pkuimg = pkuimg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkpull() {
|
||||
return pkpull;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkpull(String pkpull) {
|
||||
this.pkpull = pkpull;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIfpk() {
|
||||
return ifpk;
|
||||
}
|
||||
|
||||
public PkinfoModel setIfpk(String ifpk) {
|
||||
this.ifpk = ifpk;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkTime() {
|
||||
return pkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkTime(String pkTime) {
|
||||
this.pkTime = pkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndPkTime() {
|
||||
return endPkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setEndPkTime(String endPkTime) {
|
||||
this.endPkTime = endPkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkGiftLiveuid() {
|
||||
return pkGiftLiveuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkGiftLiveuid(String pkGiftLiveuid) {
|
||||
this.pkGiftLiveuid = pkGiftLiveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPkGiftPkuid() {
|
||||
return pkGiftPkuid;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkGiftPkuid(String pkGiftPkuid) {
|
||||
this.pkGiftPkuid = pkGiftPkuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnyway() {
|
||||
return anyway;
|
||||
}
|
||||
|
||||
public PkinfoModel setAnyway(String anyway) {
|
||||
this.anyway = anyway;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkStatus() {
|
||||
return drpkStatus;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkStatus(String drpkStatus) {
|
||||
this.drpkStatus = drpkStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkRoomid() {
|
||||
return drpkRoomid;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkRoomid(String drpkRoomid) {
|
||||
this.drpkRoomid = drpkRoomid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDrpkTime() {
|
||||
return drpkTime;
|
||||
}
|
||||
|
||||
public PkinfoModel setDrpkTime(String drpkTime) {
|
||||
this.drpkTime = drpkTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public PkTopUsersModel getPkTopUsers() {
|
||||
return pkTopUsers;
|
||||
}
|
||||
|
||||
public PkinfoModel setPkTopUsers(PkTopUsersModel pkTopUsers) {
|
||||
this.pkTopUsers = pkTopUsers;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PrankGiftBean extends BaseModel{
|
||||
@SerializedName("prank_content")
|
||||
private String title;
|
||||
@SerializedName("gift_name")
|
||||
private String name;
|
||||
@SerializedName("gift_icon")
|
||||
private String icon;
|
||||
@SerializedName("gift_num")
|
||||
private int num;
|
||||
@SerializedName("gift_id")
|
||||
private String giftId;
|
||||
|
||||
public PrankGiftBean() {
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(int num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getGiftId() {
|
||||
return giftId;
|
||||
}
|
||||
|
||||
public void setGiftId(String giftId) {
|
||||
this.giftId = giftId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
public class PrankHttpTurntableBean extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("anchor_id")
|
||||
private String anchor_id;
|
||||
@SerializedName("coin")
|
||||
private long coin = 1000;
|
||||
@SerializedName("hope_coin")
|
||||
private long hopeCoin = 1000;
|
||||
@SerializedName("turntable_one")
|
||||
private String turntable1;
|
||||
@SerializedName("turntable_two")
|
||||
private String turntable2;
|
||||
@SerializedName("turntable_three")
|
||||
private String turntable3;
|
||||
@SerializedName("turntable_four")
|
||||
private String turntable4;
|
||||
@SerializedName("turntable_five")
|
||||
private String turntable5;
|
||||
@SerializedName("turntable_six")
|
||||
private String turntable6;
|
||||
@SerializedName("status")
|
||||
private int status;
|
||||
|
||||
public PrankHttpTurntableBean() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAnchor_id() {
|
||||
return anchor_id;
|
||||
}
|
||||
|
||||
public void setAnchor_id(String anchor_id) {
|
||||
this.anchor_id = anchor_id;
|
||||
}
|
||||
|
||||
public long getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public void setCoin(long coin) {
|
||||
this.coin = coin;
|
||||
}
|
||||
|
||||
public long getHopeCoin() {
|
||||
return hopeCoin;
|
||||
}
|
||||
|
||||
public void setHopeCoin(long hopeCoin) {
|
||||
this.hopeCoin = hopeCoin;
|
||||
}
|
||||
|
||||
public String getTurntable1() {
|
||||
return turntable1;
|
||||
}
|
||||
|
||||
public void setTurntable1(String turntable1) {
|
||||
this.turntable1 = turntable1;
|
||||
}
|
||||
|
||||
public String getTurntable2() {
|
||||
return turntable2;
|
||||
}
|
||||
|
||||
public void setTurntable2(String turntable2) {
|
||||
this.turntable2 = turntable2;
|
||||
}
|
||||
|
||||
public String getTurntable3() {
|
||||
return turntable3;
|
||||
}
|
||||
|
||||
public void setTurntable3(String turntable3) {
|
||||
this.turntable3 = turntable3;
|
||||
}
|
||||
|
||||
public String getTurntable4() {
|
||||
return turntable4;
|
||||
}
|
||||
|
||||
public void setTurntable4(String turntable4) {
|
||||
this.turntable4 = turntable4;
|
||||
}
|
||||
|
||||
public String getTurntable5() {
|
||||
return turntable5;
|
||||
}
|
||||
|
||||
public void setTurntable5(String turntable5) {
|
||||
this.turntable5 = turntable5;
|
||||
}
|
||||
|
||||
public String getTurntable6() {
|
||||
return turntable6;
|
||||
}
|
||||
|
||||
public void setTurntable6(String turntable6) {
|
||||
this.turntable6 = turntable6;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
|
||||
public class PrankTurntableBean extends BaseModel {
|
||||
private int id;
|
||||
private String context;
|
||||
|
||||
public PrankTurntableBean() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 随机PK UserBean
|
||||
*/
|
||||
public class RandomPkUserBean extends UserBean {
|
||||
@SerializedName("is_pk")
|
||||
private int pk;
|
||||
@SerializedName("isattention")
|
||||
private String attention;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNiceName;
|
||||
|
||||
public RandomPkUserBean() {
|
||||
}
|
||||
|
||||
public boolean isPk() {
|
||||
return pk==1;
|
||||
}
|
||||
|
||||
public boolean isAttention() {
|
||||
return attention.equals("1");
|
||||
}
|
||||
|
||||
public String getAttention() {
|
||||
return attention;
|
||||
}
|
||||
|
||||
public void setAttention(String attention) {
|
||||
this.attention = attention;
|
||||
}
|
||||
|
||||
public int getPk() {
|
||||
return pk;
|
||||
}
|
||||
|
||||
public void setPk(int pk) {
|
||||
this.pk = pk;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserNiceName() {
|
||||
return userNiceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUserNiceName(String userNiceName) {
|
||||
this.userNiceName = userNiceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RandomPkUserBean{" +
|
||||
"pk=" + pk +
|
||||
", attention='" + attention + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", sex=" + sex +
|
||||
", signature='" + signature + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", gold='" + gold + '\'' +
|
||||
", votes='" + votes + '\'' +
|
||||
", consumption='" + consumption + '\'' +
|
||||
", votestotal='" + votestotal + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", birthday='" + birthday + '\'' +
|
||||
", level=" + level +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", lives=" + lives +
|
||||
", follows=" + follows +
|
||||
", fans=" + fans +
|
||||
", vip=" + vip +
|
||||
", liang=" + liang +
|
||||
", car=" + car +
|
||||
", medal_level=" + medal_level +
|
||||
", medal_name='" + medal_name + '\'' +
|
||||
", Dress=" + Dress +
|
||||
", noble_id='" + noble_id + '\'' +
|
||||
", yuanbao='" + yuanbao + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RankHourModel extends BaseModel {
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("hourchart_h5_url")
|
||||
private String hourchartH5Url;
|
||||
@SerializedName("rank")
|
||||
private String rank;
|
||||
@SerializedName("starlightVal")
|
||||
private String starlightVal;
|
||||
@SerializedName("isshow")
|
||||
private String isshow;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public RankHourModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getHourchartH5Url() {
|
||||
return hourchartH5Url;
|
||||
}
|
||||
|
||||
public RankHourModel setHourchartH5Url(String hourchartH5Url) {
|
||||
this.hourchartH5Url = hourchartH5Url;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public RankHourModel setRank(String rank) {
|
||||
this.rank = rank;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStarlightVal() {
|
||||
return starlightVal;
|
||||
}
|
||||
|
||||
public RankHourModel setStarlightVal(String starlightVal) {
|
||||
this.starlightVal = starlightVal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
public RankHourModel setIsshow(String isshow) {
|
||||
this.isshow = isshow;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
128
common/src/main/java/com/yunbao/common/bean/RankPkInfoBean.java
Normal file
128
common/src/main/java/com/yunbao/common/bean/RankPkInfoBean.java
Normal file
@@ -0,0 +1,128 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class RankPkInfoBean extends BaseModel {
|
||||
private int id;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("pk_start_hour1")
|
||||
private String pkStartHour1;
|
||||
@SerializedName("pk_end_hour1")
|
||||
private String pkEndHour1;
|
||||
@SerializedName("pk_start_hour2")
|
||||
private String pkStartHour2;
|
||||
@SerializedName("pk_end_hour2")
|
||||
private String pkEndHour2;
|
||||
|
||||
public RankPkInfoBean() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPkStartHour1() {
|
||||
return pkStartHour1;
|
||||
}
|
||||
|
||||
public void setPkStartHour1(String pkStartHour1) {
|
||||
this.pkStartHour1 = pkStartHour1;
|
||||
}
|
||||
|
||||
public String getPkEndHour1() {
|
||||
return pkEndHour1;
|
||||
}
|
||||
|
||||
public void setPkEndHour1(String pkEndHour1) {
|
||||
this.pkEndHour1 = pkEndHour1;
|
||||
}
|
||||
|
||||
public String getPkStartHour2() {
|
||||
return pkStartHour2;
|
||||
}
|
||||
|
||||
public void setPkStartHour2(String pkStartHour2) {
|
||||
this.pkStartHour2 = pkStartHour2;
|
||||
}
|
||||
|
||||
public String getPkEndHour2() {
|
||||
return pkEndHour2;
|
||||
}
|
||||
|
||||
public void setPkEndHour2(String pkEndHour2) {
|
||||
this.pkEndHour2 = pkEndHour2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否在排位赛时间范围内
|
||||
*/
|
||||
public boolean isRankPKTime() {
|
||||
try {
|
||||
Date now =new Date();
|
||||
Date startDate = simpleDateToDate(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||
Date endDate = simpleDateToDate(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
if (startDate == null || endDate == null) {
|
||||
return false;
|
||||
}
|
||||
Calendar calendarStart = Calendar.getInstance(Locale.CHINA);
|
||||
Calendar calendarEnd = Calendar.getInstance(Locale.CHINA);
|
||||
Calendar calendarNow = Calendar.getInstance(Locale.CHINA);
|
||||
calendarNow.setTime(now);
|
||||
calendarStart.setTime(startDate);
|
||||
calendarEnd.setTime(endDate);
|
||||
if (calendarStart.before(calendarNow) && calendarEnd.after(calendarNow)) {
|
||||
calendarNow.setTime(simpleDateToDate(dateToSimpleDate(now,"HH:mm:ss"),"HH:mm:ss"));
|
||||
calendarStart.setTime(simpleDateToDate(pkStartHour1, "HH:mm:ss"));
|
||||
calendarEnd.setTime(simpleDateToDate(pkEndHour1, "HH:mm:ss"));
|
||||
if (calendarStart.before(calendarNow) && calendarEnd.after(calendarNow)) {
|
||||
return true;
|
||||
} else {
|
||||
calendarNow.setTime(simpleDateToDate(dateToSimpleDate(now,"HH:mm:ss"),"HH:mm:ss"));
|
||||
calendarStart.setTime(simpleDateToDate(pkStartHour2, "HH:mm:ss"));
|
||||
calendarEnd.setTime(simpleDateToDate(pkEndHour2, "HH:mm:ss"));
|
||||
return calendarStart.before(calendarNow) && calendarEnd.after(calendarNow);
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private Date simpleDateToDate(String time, String pattern) throws ParseException {
|
||||
return new SimpleDateFormat(pattern, Locale.CHINA).parse(time);
|
||||
}
|
||||
private String dateToSimpleDate(Date date,String pattern){
|
||||
return new SimpleDateFormat(pattern,Locale.CHINA).format(date);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.live.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class ReportCommunityBean {
|
||||
String dynamic_id;
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RewardAllModel extends BaseModel{
|
||||
@SerializedName("gold")
|
||||
private String gold;
|
||||
@SerializedName("experience")
|
||||
private String experience;
|
||||
|
||||
public String getGold() {
|
||||
return gold;
|
||||
}
|
||||
|
||||
public RewardAllModel setGold(String gold) {
|
||||
this.gold = gold;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExperience() {
|
||||
return experience;
|
||||
}
|
||||
|
||||
public RewardAllModel setExperience(String experience) {
|
||||
this.experience = experience;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class TaskModel extends BaseModel{
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("attent")
|
||||
private String attent;
|
||||
@SerializedName("illumine")
|
||||
private String illumine;
|
||||
@SerializedName("sendgift")
|
||||
private String sendgift;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public TaskModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAttent() {
|
||||
return attent;
|
||||
}
|
||||
|
||||
public TaskModel setAttent(String attent) {
|
||||
this.attent = attent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIllumine() {
|
||||
return illumine;
|
||||
}
|
||||
|
||||
public TaskModel setIllumine(String illumine) {
|
||||
this.illumine = illumine;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendgift() {
|
||||
return sendgift;
|
||||
}
|
||||
|
||||
public TaskModel setSendgift(String sendgift) {
|
||||
this.sendgift = sendgift;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/14.
|
||||
@@ -56,8 +58,30 @@ public class UserBean implements Parcelable {
|
||||
private String mobile;
|
||||
private String front_task;
|
||||
private String is_admin;
|
||||
@SerializedName("user_love_num")
|
||||
private int praise;
|
||||
//是否隐藏
|
||||
private boolean isHide = false;
|
||||
//是否为随机PK,仅在主播PK时使用
|
||||
private boolean randomPk;
|
||||
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||
private String mRankPkImgUrl;
|
||||
|
||||
public boolean isRandomPk() {
|
||||
return randomPk;
|
||||
}
|
||||
|
||||
public void setRandomPk(boolean randomPk) {
|
||||
this.randomPk = randomPk;
|
||||
}
|
||||
|
||||
public String getRankPkImgUrl() {
|
||||
return mRankPkImgUrl;
|
||||
}
|
||||
|
||||
public void setRankPkImgUrl(String mRankPkImgUrl) {
|
||||
this.mRankPkImgUrl = mRankPkImgUrl;
|
||||
}
|
||||
|
||||
public boolean isHide() {
|
||||
return isHide;
|
||||
@@ -93,6 +117,9 @@ public class UserBean implements Parcelable {
|
||||
}
|
||||
|
||||
public String getIs_bind() {
|
||||
if(StringUtil.isEmpty(is_bind)){
|
||||
is_bind="0";
|
||||
}
|
||||
return is_bind;
|
||||
}
|
||||
|
||||
@@ -363,6 +390,14 @@ public class UserBean implements Parcelable {
|
||||
return level;
|
||||
}
|
||||
|
||||
public int getPraise() {
|
||||
return praise;
|
||||
}
|
||||
|
||||
public void setPraise(int praise) {
|
||||
this.praise = praise;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.yunbao.video.bean;
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/10/25.
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WishListModel extends BaseModel {
|
||||
@SerializedName("wishList")
|
||||
private List<WishModel> wishList;
|
||||
@SerializedName("img")
|
||||
private String img;
|
||||
|
||||
public List<WishModel> getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public WishListModel setWishList(List<WishModel> wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public WishListModel setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
106
common/src/main/java/com/yunbao/common/bean/WishModel.java
Normal file
106
common/src/main/java/com/yunbao/common/bean/WishModel.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class WishModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("dtime")
|
||||
private String dtime;
|
||||
@SerializedName("luid")
|
||||
private String luid;
|
||||
@SerializedName("lid")
|
||||
private String lid;
|
||||
@SerializedName("wishlist_icon")
|
||||
private String wishlistIcon;
|
||||
@SerializedName("wishlist_num")
|
||||
private String wishlistNum;
|
||||
@SerializedName("wishlist_progress")
|
||||
private String wishlistProgress;
|
||||
@SerializedName("wishlist_name")
|
||||
private String wishlistName;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public WishModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDtime() {
|
||||
return dtime;
|
||||
}
|
||||
|
||||
public WishModel setDtime(String dtime) {
|
||||
this.dtime = dtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLuid() {
|
||||
return luid;
|
||||
}
|
||||
|
||||
public WishModel setLuid(String luid) {
|
||||
this.luid = luid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLid() {
|
||||
return lid;
|
||||
}
|
||||
|
||||
public WishModel setLid(String lid) {
|
||||
this.lid = lid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistIcon() {
|
||||
return wishlistIcon;
|
||||
}
|
||||
|
||||
public WishModel setWishlistIcon(String wishlistIcon) {
|
||||
this.wishlistIcon = wishlistIcon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistNum() {
|
||||
return wishlistNum;
|
||||
}
|
||||
|
||||
public WishModel setWishlistNum(String wishlistNum) {
|
||||
this.wishlistNum = wishlistNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistProgress() {
|
||||
return wishlistProgress;
|
||||
}
|
||||
|
||||
public WishModel setWishlistProgress(String wishlistProgress) {
|
||||
this.wishlistProgress = wishlistProgress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWishlistName() {
|
||||
return wishlistName;
|
||||
}
|
||||
|
||||
public WishModel setWishlistName(String wishlistName) {
|
||||
this.wishlistName = wishlistName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public WishModel setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,9 @@ public class TabButtonGroup extends LinearLayout implements View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
public int getCurPosition() {
|
||||
return mCurPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -4,13 +4,16 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.yunbao.common.utils.ClickUtil;
|
||||
|
||||
@@ -34,7 +37,7 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
} else {
|
||||
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
||||
}
|
||||
final Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||
Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||
dialog.setContentView(mRootView);
|
||||
dialog.setCancelable(canCancel());
|
||||
dialog.setCanceledOnTouchOutside(canCancel());
|
||||
@@ -74,4 +77,12 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
return ClickUtil.canClick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
try {
|
||||
super.show(manager, tag);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@ import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@@ -77,6 +82,15 @@ public class HintDialog extends AbsDialogFragment {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
try {
|
||||
super.show(manager, tag);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private HintListener listener;
|
||||
|
||||
public HintDialog setListener(HintListener listener) {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.lang;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -12,30 +16,14 @@ import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.InstructorOperationEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.lang;
|
||||
|
||||
public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
@@ -96,40 +84,16 @@ public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
ImageView to_msg = mRootView.findViewById(R.id.to_msg);
|
||||
if(lang.equals("english")){
|
||||
ImgLoader.display(mContext,home_zdy_img_us, to_msg);
|
||||
}else{
|
||||
ImgLoader.display(mContext,home_zdy_img_cn, to_msg);
|
||||
if (lang.equals("english")) {
|
||||
ImgLoader.display(mContext, home_zdy_img_us, to_msg);
|
||||
} else {
|
||||
ImgLoader.display(mContext, home_zdy_img_cn, to_msg);
|
||||
}
|
||||
|
||||
|
||||
mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("82nzkz", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_enter", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_enter");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
AdjustEvent adjustEvent2 = new AdjustEvent("ykpmj8");
|
||||
Adjust.trackEvent(adjustEvent2);
|
||||
CommonHttpUtil.setAdvertisingChannels("ykpmj8", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_message_box", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_message_box");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
EventBus.getDefault().post(new InstructorOperationEvent());
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
public class AnchorInfoEvent {
|
||||
protected boolean clear;
|
||||
protected String id;
|
||||
protected String userNiceName;
|
||||
protected String avatar;
|
||||
|
||||
public AnchorInfoEvent(boolean clears,String ids, String userNiceNames,String avatars) {
|
||||
clear = clears;
|
||||
id = ids;
|
||||
userNiceName = userNiceNames;
|
||||
avatar = avatars;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserNiceName() {
|
||||
return userNiceName;
|
||||
}
|
||||
|
||||
public void setUserNiceName(String userNiceName) {
|
||||
this.userNiceName = userNiceName;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public boolean isClear() {
|
||||
return clear;
|
||||
}
|
||||
|
||||
public void setClear(boolean clear) {
|
||||
this.clear = clear;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ public class CoinChangeEvent {
|
||||
private String goldCoinNum;
|
||||
private boolean chargeSuccess;
|
||||
|
||||
|
||||
public CoinChangeEvent(String coin) {
|
||||
this.coin = coin;
|
||||
}
|
||||
@@ -19,7 +20,8 @@ public class CoinChangeEvent {
|
||||
this.coin = coin;
|
||||
this.chargeSuccess = chargeSuccess;
|
||||
}
|
||||
public CoinChangeEvent(String coin,String goldCoinNum, boolean chargeSuccess) {
|
||||
|
||||
public CoinChangeEvent(String coin, String goldCoinNum, boolean chargeSuccess) {
|
||||
this.coin = coin;
|
||||
this.goldCoinNum = goldCoinNum;
|
||||
this.chargeSuccess = chargeSuccess;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CustomDrawerPopupEvent extends BaseModel {
|
||||
//是否关闭弹窗
|
||||
private boolean isDisMiss = false;
|
||||
//权益的名字
|
||||
private String rightsInterests = "";
|
||||
//活动的id
|
||||
private int activityId = 0;
|
||||
//跳转网页地址
|
||||
private String htmlUrl;
|
||||
//是否半屏展示
|
||||
private boolean screen = false;
|
||||
//系统消息
|
||||
private boolean systemNotice = false;
|
||||
//在线客服
|
||||
private boolean online = false;
|
||||
//举报
|
||||
private boolean reportLayout = false;
|
||||
//刷新
|
||||
private boolean refresh = false;
|
||||
|
||||
public boolean isRefresh() {
|
||||
return refresh;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setRefresh(boolean refresh) {
|
||||
this.refresh = refresh;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSystemNotice() {
|
||||
return systemNotice;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setSystemNotice(boolean systemNotice) {
|
||||
this.systemNotice = systemNotice;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
return online;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setOnline(boolean online) {
|
||||
this.online = online;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isReportLayout() {
|
||||
return reportLayout;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setReportLayout(boolean reportLayout) {
|
||||
this.reportLayout = reportLayout;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getHtmlUrl() {
|
||||
return htmlUrl;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setHtmlUrl(String htmlUrl) {
|
||||
this.htmlUrl = htmlUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isScreen() {
|
||||
return screen;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setScreen(boolean screen) {
|
||||
this.screen = screen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setActivityId(int activityId) {
|
||||
this.activityId = activityId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRightsInterests() {
|
||||
return rightsInterests;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setRightsInterests(String rightsInterests) {
|
||||
this.rightsInterests = rightsInterests;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDisMiss() {
|
||||
return isDisMiss;
|
||||
}
|
||||
|
||||
public CustomDrawerPopupEvent setDisMiss(boolean disMiss) {
|
||||
isDisMiss = disMiss;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
/**
|
||||
* 全服通知
|
||||
*/
|
||||
public class CustomFullServiceNotifyEvent extends BaseModel {
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("content")//内容
|
||||
private String content;
|
||||
@SerializedName("duration")//展示时长 单位秒
|
||||
private int duration;
|
||||
@SerializedName("img")//图片路径
|
||||
private String img;
|
||||
@SerializedName("msgtype")
|
||||
private String msgtype;
|
||||
@SerializedName("type")//通知类型 1 图片通知 2文字通知
|
||||
private int type;
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setMethod(String method) {
|
||||
this.method = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setAction(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setContent(String content) {
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setDuration(int duration) {
|
||||
this.duration = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setImg(String img) {
|
||||
this.img = img;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsgtype() {
|
||||
return msgtype;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setMsgtype(String msgtype) {
|
||||
this.msgtype = msgtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public CustomFullServiceNotifyEvent setType(int type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.VideoBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class JavascriptInterfaceEvent extends BaseModel {
|
||||
private String method = "";
|
||||
private String svg = "";
|
||||
private String postsId = "";
|
||||
private String isClose;
|
||||
private List<VideoBean> videoBeanList = new ArrayList<>();
|
||||
private int position;
|
||||
private String liveId;
|
||||
private String userId;
|
||||
private int indexInto;
|
||||
private String productId;
|
||||
private String orderNumber;
|
||||
private String moneyUsd;
|
||||
private boolean isUpdataUser;
|
||||
private String data;
|
||||
private String name;
|
||||
private String image;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setImage(String image) {
|
||||
this.image = image;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setData(String data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isUpdataUser() {
|
||||
return isUpdataUser;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setUpdataUser(boolean updataUser) {
|
||||
isUpdataUser = updataUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setProductId(String productId) {
|
||||
this.productId = productId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOrderNumber() {
|
||||
return orderNumber;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setOrderNumber(String orderNumber) {
|
||||
this.orderNumber = orderNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMoneyUsd() {
|
||||
return moneyUsd;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setMoneyUsd(String moneyUsd) {
|
||||
this.moneyUsd = moneyUsd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIndexInto() {
|
||||
return indexInto;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setIndexInto(int indexInto) {
|
||||
this.indexInto = indexInto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveId() {
|
||||
return liveId;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setLiveId(String liveId) {
|
||||
this.liveId = liveId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<VideoBean> getVideoBeanList() {
|
||||
return videoBeanList;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setVideoBeanList(List<VideoBean> videoBeanList) {
|
||||
this.videoBeanList = videoBeanList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setPosition(int position) {
|
||||
this.position = position;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsClose() {
|
||||
return isClose;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setIsClose(String isClose) {
|
||||
this.isClose = isClose;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPostsId() {
|
||||
return postsId;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setPostsId(String postsId) {
|
||||
this.postsId = postsId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSvg() {
|
||||
return svg;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setSvg(String svg) {
|
||||
this.svg = svg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setMethod(String method) {
|
||||
this.method = method;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LivePushRyEvent extends BaseModel {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LiveRobotMessageEvent extends BaseModel {
|
||||
private int index = -1;
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public LiveRobotMessageEvent setIndex(int index) {
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LiveRobotSayHelloEvent extends BaseModel {
|
||||
private int index = -1;
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public LiveRobotSayHelloEvent setIndex(int index) {
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.main.event;
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ImgLoader {
|
||||
private static final boolean SKIP_MEMORY_CACHE = true;
|
||||
|
||||
private static BlurTransformation sBlurTransformation;
|
||||
private final static float thumbnail = 0.1f;
|
||||
private final static float thumbnail = 1.0f;
|
||||
|
||||
static {
|
||||
sBlurTransformation = new BlurTransformation(25);
|
||||
@@ -70,9 +70,8 @@ public class ImgLoader {
|
||||
}
|
||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||
.load(url)
|
||||
|
||||
|
||||
.thumbnail(thumbnail)
|
||||
.dontAnimate()
|
||||
.placeholder(imageView.getDrawable());
|
||||
if (width != -1 && height != -1) {
|
||||
builder = builder.override(width, height);
|
||||
@@ -87,7 +86,21 @@ public class ImgLoader {
|
||||
Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(url)
|
||||
|
||||
|
||||
.thumbnail(thumbnail)
|
||||
.placeholder(imageView.getDrawable())
|
||||
.dontAnimate()
|
||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||
.into(imageView);
|
||||
}
|
||||
|
||||
public static void display2(Context context, Drawable drawable, ImageView imageView) {
|
||||
if (!contextIsExist(context)) {
|
||||
return;
|
||||
}
|
||||
Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(drawable)
|
||||
.thumbnail(thumbnail)
|
||||
.placeholder(imageView.getDrawable())
|
||||
.dontAnimate()
|
||||
@@ -142,7 +155,7 @@ public class ImgLoader {
|
||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||
.load(url)
|
||||
.thumbnail(thumbnail)
|
||||
|
||||
|
||||
.error(R.mipmap.icon_avatar_placeholder);
|
||||
if (width != -1 && height != -1) {
|
||||
builder = builder.override(width, height);
|
||||
@@ -165,7 +178,7 @@ public class ImgLoader {
|
||||
Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(file)
|
||||
|
||||
|
||||
.thumbnail(thumbnail)
|
||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||
.into(imageView);
|
||||
@@ -178,7 +191,7 @@ public class ImgLoader {
|
||||
Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(res)
|
||||
|
||||
|
||||
.thumbnail(thumbnail)
|
||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||
.into(imageView);
|
||||
@@ -226,6 +239,7 @@ public class ImgLoader {
|
||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||
if (callback != null) {
|
||||
callback.onLoadSuccess(resource);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ public class API extends BaseApi {
|
||||
loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
OkHttpClient.Builder builder = new OkHttpClient()
|
||||
.newBuilder()
|
||||
|
||||
.addInterceptor(initQuery(isNeedUid,CommonAppContext.sInstance.getApplicationContext()))
|
||||
.addInterceptor(loggingInterceptor);
|
||||
|
||||
return create(builder.build(),
|
||||
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.callback.StringCallback;
|
||||
@@ -17,7 +17,9 @@ import com.yunbao.common.activity.ErrorActivity;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
@@ -190,6 +192,32 @@ public class CommonHttpUtil {
|
||||
if (obj.containsKey("is_chat")) {
|
||||
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
|
||||
}
|
||||
if (obj.containsKey("level_new")) {//缓存等级数据
|
||||
JSONArray levelArray = obj.getJSONArray("level_new");
|
||||
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("levelanchor_new")) {//缓存等级数据
|
||||
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
||||
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("apk_ver")) {
|
||||
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||
}
|
||||
if (obj.containsKey("apk_url")) {
|
||||
APKManager.get().setAPKUrl(obj.getString("apk_url"));
|
||||
}
|
||||
if (obj.containsKey("apk_des")) {
|
||||
APKManager.get().setAPKDes(obj.getString("apk_des"));
|
||||
}
|
||||
if (obj.containsKey("google_isup")) {
|
||||
APKManager.get().setAPKGoogleIsUp(obj.getInteger("google_isup"));
|
||||
}
|
||||
if (obj.containsKey("isup")) {
|
||||
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
||||
}
|
||||
if (obj.containsKey("clarity")) {
|
||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||
@@ -411,14 +439,14 @@ public class CommonHttpUtil {
|
||||
.params("touid", touid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
//埋点唯一性
|
||||
public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
||||
.params("operation", operation)
|
||||
.params("marking", Adjust.getAdid())
|
||||
.execute(callback);
|
||||
}
|
||||
//
|
||||
// //埋点唯一性
|
||||
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||
// HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
||||
// .params("operation", operation)
|
||||
// .params("marking", Adjust.getAdid())
|
||||
// .execute(callback);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,16 +3,28 @@ package com.yunbao.common.http;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.ContributeModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
@@ -20,6 +32,7 @@ import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.Field;
|
||||
@@ -27,6 +40,7 @@ import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
/**
|
||||
* PDLive网络接口访问
|
||||
@@ -169,10 +183,10 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<ActiveModel>>> getActiveList();
|
||||
|
||||
/**
|
||||
* 获取活动
|
||||
* 获取多人连麦列表
|
||||
*/
|
||||
@GET("/api/public/?service=live.getDrLm")
|
||||
Observable<ResponseModel<List<ActiveModel>>> getDrLm();
|
||||
Observable<ResponseModel<List<LinkMicUserBeanV2>>> getDrLm(@Query("uid") String uid);
|
||||
|
||||
/**
|
||||
* 获取日榜、周榜数据
|
||||
@@ -236,7 +250,8 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<NobleRankHideUserListModel>> getNobleRankHideUserList();
|
||||
|
||||
/**
|
||||
*获取当前星级
|
||||
* 获取当前星级
|
||||
*
|
||||
* @param liveUid
|
||||
* @return
|
||||
*/
|
||||
@@ -248,4 +263,283 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveRoomActivtyBanner")
|
||||
Observable<ResponseModel<List<LiveRoomActivityBanner>>> getLiveRoomActivityBanner();
|
||||
|
||||
/**
|
||||
* 新侧边栏请求
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getCustomSidebarInfo")
|
||||
Observable<ResponseModel<List<CustomSidebarInfoModel>>> getCustomSidebarInfo();
|
||||
|
||||
/**
|
||||
* 任务领取接口
|
||||
*/
|
||||
@GET("/api/public/?service=Task.sendTaskGift")
|
||||
Observable<ResponseModel<List<Observable>>> sendTaskGift(@Query("flag") String flag, @Query("type") String type);
|
||||
|
||||
/**
|
||||
* PK排位赛接口
|
||||
*/
|
||||
@GET("/api/public/?service=Ranking.getAnchorRankData")
|
||||
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId, @Query("anchor_id2") String pkUid);
|
||||
|
||||
/**
|
||||
* 多人连麦-创建房间
|
||||
*/
|
||||
@GET("/api/public/?service=Live.createDrLm")
|
||||
Observable<ResponseModel<BaseModel>> createDrLm();
|
||||
|
||||
/**
|
||||
* 多人连麦-关闭房间
|
||||
*/
|
||||
@GET("/api/public/?service=Live.delDrLm")
|
||||
Observable<ResponseModel<BaseModel>> delDrLm();
|
||||
|
||||
/**
|
||||
* 多人连麦-踢出用户
|
||||
*
|
||||
* @param uid 对方uid
|
||||
* @param roomId 当前房间号
|
||||
*/
|
||||
@GET("/api/public/?service=Live.killDrLm")
|
||||
Observable<ResponseModel<BaseModel>> killDrLm(@Query("uid") String uid, @Query("roomid") String roomId);
|
||||
|
||||
/**
|
||||
* 新进入房间接口
|
||||
*
|
||||
* @param groupId 房间名 g+liveUid
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
* @param city
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Live.enterRoomNew")
|
||||
Observable<ResponseModel<EnterRoomNewModel>> enterRoomNew(
|
||||
@Query("GroupId") String groupId,
|
||||
@Query("stream") String stream,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("city") String city
|
||||
);
|
||||
|
||||
/**
|
||||
* 检查直播间状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Live.checkLive")
|
||||
Observable<ResponseModel<List<CheckLiveModel>>> checkLive(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 加入房间推送Im欢迎语
|
||||
*/
|
||||
@GET("/api/public/?service=Tx.userJoinRoomNew")
|
||||
Observable<ResponseModel<String>> userJoinRoomNew(
|
||||
@Query("GroupId") String GroupId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 加入房间推送Im欢迎语
|
||||
*/
|
||||
@GET("/api/public/?service=Tx.leaveRoomNew")
|
||||
Observable<ResponseModel<List<Object>>> leaveRoomNew(
|
||||
@Query("GroupId") String GroupId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取随机PK开关
|
||||
*
|
||||
* @return 1=开,0=关
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.getRandomPKType")
|
||||
Observable<ResponseModel<List<Integer>>> getRandomPkSwitch();
|
||||
|
||||
/**
|
||||
* 设置随机PK开关
|
||||
*
|
||||
* @param pk 1=开,0=关
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.setRandomPKType")
|
||||
Observable<ResponseModel<List<BaseModel>>> changeRandomPkSwitch(@Query("random_pk") int pk);
|
||||
|
||||
/**
|
||||
* 获取自由PK次数
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.getActivePkNum")
|
||||
Observable<ResponseModel<Integer>> getFreePkNumber();
|
||||
|
||||
/**
|
||||
* 发起随机PK
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.setRandomPK")
|
||||
Observable<ResponseModel<String>> randomPK();
|
||||
|
||||
/**
|
||||
* 随机PK后调用接口给后台记录
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.startRandomPK")
|
||||
Observable<ResponseModel<BaseModel>> startRandomPK(@Query("pkuid") String pkuid);
|
||||
|
||||
/**
|
||||
* 自由PK开始后调用接口扣掉次数
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.setActivePkNum")
|
||||
Observable<ResponseModel<BaseModel>> setFreePkNum();
|
||||
|
||||
/**
|
||||
* 随机PK搜索用户
|
||||
*
|
||||
* @param cs 简体关键字/uid
|
||||
* @param ct 繁体关键字/uid
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.searchUser")
|
||||
Observable<ResponseModel<List<RandomPkUserBean>>> randomPkSearchUser(@Query("jian_key") String cs, @Query("fan_key") String ct);
|
||||
|
||||
/**
|
||||
* 拒绝随机PK
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.setBanRandomPK")
|
||||
Observable<ResponseModel<BaseModel>> setBanRandomPK();
|
||||
|
||||
/**
|
||||
* 拒绝随机PK
|
||||
*/
|
||||
@GET("/api/public/?service=Ranking.getRankingInfo")
|
||||
Observable<ResponseModel<RankPkInfoBean>> getRankingInfo();
|
||||
|
||||
/**
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.getAnchorPrankTurntable")
|
||||
Observable<ResponseModel<PrankHttpTurntableBean>> getAnchorPrankTurntable(
|
||||
@Query("anchor_id") String anchor_id
|
||||
);
|
||||
|
||||
/**
|
||||
* 提交整蛊
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.setAnchorPrankTurntable")
|
||||
Observable<ResponseModel<List<BaseModel>>> setAnchorPrankTurntable(
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("coin") String coin,
|
||||
@Query("turntable_one") String turntable_one,
|
||||
@Query("turntable_two") String turntable_two,
|
||||
@Query("turntable_three") String turntable_three,
|
||||
@Query("turntable_four") String turntable_four,
|
||||
@Query("turntable_five") String turntable_five,
|
||||
@Query("turntable_six") String turntable_six,
|
||||
@Query("status") String status
|
||||
);
|
||||
|
||||
/**
|
||||
* 转盘整蛊结束后调用的接口
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.endPrankTurntable")
|
||||
Observable<ResponseModel<List<BaseModel>>> endPrankTurntable(
|
||||
@Query("anchor_id") String anchor_id
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* 获取整蛊列表
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.prankList")
|
||||
Observable<ResponseModel<List<PrankGiftBean>>> prankList(@Query("anchor_id") String anchor_id);
|
||||
|
||||
/**
|
||||
* 设置礼物整蛊
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.setPrank")
|
||||
Observable<ResponseModel<List<BaseModel>>> setPrank(
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("gift_id") String gift_id,
|
||||
@Query("gift_num") String gift_num,
|
||||
@Query("prank_content") String prank_content
|
||||
);
|
||||
|
||||
/**
|
||||
* 删除礼物整蛊
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.deletePrank")
|
||||
Observable<ResponseModel<List<BaseModel>>> deletePrank(
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("prank_index") String prank_index
|
||||
);
|
||||
|
||||
/**
|
||||
* 设置机器人开关
|
||||
*/
|
||||
@GET("/api/public/?service=Live.setAnchorAiState")
|
||||
Observable<ResponseModel<HttpCallbackModel>> setAnchorAiState(
|
||||
@Query("ai_state") String ai_state
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取机器人信息
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getAnchorAiState")
|
||||
Observable<ResponseModel<LiveAiRobotBean>> getAnchorAiState(
|
||||
);
|
||||
|
||||
/**
|
||||
* 修改机器人信息
|
||||
*/
|
||||
@GET("/api/public/?service=Live.setAnchorAiState")
|
||||
Observable<ResponseModel<Integer>> setAnchorAiState(
|
||||
@QueryMap Map<String, Object> map
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取机器人自定义话术
|
||||
*
|
||||
* @param type 1(自定义打招呼) 3(自定义求关注)
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getAiAutomaticSpeech")
|
||||
Observable<ResponseModel<List<LiveAiRobotBean.Message>>> getAiAutomaticSpeech(
|
||||
@Query("type") String type
|
||||
);
|
||||
|
||||
/**
|
||||
* 机器人添加话术
|
||||
*/
|
||||
@GET("/api/public/?service=Live.addAiAutomaticSpeech")
|
||||
Observable<ResponseModel<List<String>>> addAiAutomaticSpeech(
|
||||
@Query("type") String type,
|
||||
@Query("content") String content
|
||||
);
|
||||
|
||||
/**
|
||||
* 机器人删除话术
|
||||
*/
|
||||
@GET("/api/public/?service=Live.delAiAutomaticSpeech ")
|
||||
Observable<ResponseModel<List<String>>> delAiAutomaticSpeech(
|
||||
@Query("type") String type,
|
||||
@Query("id") String id
|
||||
);
|
||||
|
||||
/**
|
||||
* 机器人修改话术
|
||||
*/
|
||||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech")
|
||||
Observable<ResponseModel<List<String>>> updateAiAutomaticSpeech(
|
||||
@Query("type") String type,
|
||||
@Query("id") String id,
|
||||
@Query("content") String content
|
||||
);
|
||||
|
||||
/**
|
||||
* 开播获取机器人状态和心愿单状态
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveStetUpStatus")
|
||||
Observable<ResponseModel<LiveStetUpStatusModel>> getLiveStetUpStatus(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=live.jieshuDRPK")
|
||||
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
||||
@Query("roomid") String roomId,
|
||||
@Query("uid") String uid);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yunbao.common.http.base;
|
||||
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
|
||||
/**
|
||||
* 直播间类型返回
|
||||
*/
|
||||
public interface CheckLiveCallBack {
|
||||
/**
|
||||
* ;普通房
|
||||
*/
|
||||
void forwardNormalRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 密码房
|
||||
*/
|
||||
void forwardPwdRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 收费房
|
||||
*/
|
||||
void forwardPayRoom(CheckLiveModel model);
|
||||
|
||||
/**
|
||||
* 请求失败
|
||||
*
|
||||
* @param error
|
||||
*/
|
||||
void onError(String error);
|
||||
}
|
||||
@@ -2,24 +2,44 @@ package com.yunbao.common.http.live;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.CheckLiveCallBack;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@@ -63,6 +83,7 @@ public class LiveNetManager {
|
||||
if (callback != null)
|
||||
callback.onError(throwable.getMessage());
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,7 +258,6 @@ public class LiveNetManager {
|
||||
|
||||
/**
|
||||
* 获取 【新人特惠】【趣味游戏】【幸运天使】
|
||||
*
|
||||
*/
|
||||
public void getLiveRoomActivityBanner(HttpCallback<List<LiveRoomActivityBanner>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
@@ -253,4 +273,820 @@ public class LiveNetManager {
|
||||
throwable.printStackTrace();
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新侧边数据
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getCustomSidebarInfo(HttpCallback<List<CustomSidebarInfoModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getCustomSidebarInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> callback.onSuccess(listResponseModel.getData().getInfo()), throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
throwable.printStackTrace();
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务领取接口
|
||||
*/
|
||||
public void sendTaskGift(String flag, HttpCallback<String> callback) {
|
||||
|
||||
API.get().pdLiveApi(mContext)
|
||||
.sendTaskGift(flag, "2")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(observableResponseModel -> {
|
||||
if (observableResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess("");
|
||||
} else {
|
||||
callback.onError(observableResponseModel.getData().getMsg());
|
||||
}
|
||||
}, throwable -> callback.onError(throwable.getMessage())).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查直播间状态
|
||||
*
|
||||
* @param liveUid
|
||||
* @param stream
|
||||
* @param callBack
|
||||
*/
|
||||
public void checkLive(String liveUid, String stream, CheckLiveCallBack callBack) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.checkLive(liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<CheckLiveModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<CheckLiveModel>> listResponseModel) throws Exception {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
List<CheckLiveModel> checkLiveModels = listResponseModel.getData().getInfo();
|
||||
if (checkLiveModels.size() > 0) {
|
||||
CheckLiveModel liveModel = checkLiveModels.get(0);
|
||||
switch (liveModel.getType()) {
|
||||
case Constants.LIVE_TYPE_NORMAL:
|
||||
if (callBack != null) {
|
||||
callBack.forwardNormalRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PWD:
|
||||
if (callBack != null) {
|
||||
callBack.forwardPwdRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PAY:
|
||||
case Constants.LIVE_TYPE_TIME:
|
||||
if (callBack != null) {
|
||||
callBack.forwardPayRoom(liveModel);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (callBack != null) {
|
||||
callBack.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (callBack != null) {
|
||||
callBack.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callBack != null) {
|
||||
callBack.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新进入直播间接口
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
* @param city
|
||||
* @param callback
|
||||
*/
|
||||
private Disposable enterRoomDisposable = null;
|
||||
|
||||
public void enterRoomNew(String stream, String liveUid, String city, HttpCallback<EnterRoomNewModel> callback) {
|
||||
enterRoomDisposable = API.get().pdLiveApi(mContext)
|
||||
.enterRoomNew("g" + liveUid, stream, liveUid, city)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<EnterRoomNewModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<EnterRoomNewModel> enterRoomNewModelResponseModel) throws Exception {
|
||||
Log.e("进入房间", "enterRoomNew--------------------------------------------");
|
||||
enterRoomDisposable = null;
|
||||
if (callback != null) {
|
||||
callback.onSuccess(enterRoomNewModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
enterRoomDisposable = null;
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入房间推送IM消息
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
*/
|
||||
private Disposable userJoinDisposable = null;
|
||||
|
||||
public void userJoinRoomNew(String stream, String liveUid) {
|
||||
userJoinDisposable = API.get().pdLiveApi(mContext)
|
||||
.userJoinRoomNew("g" + liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<String>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<String> stringResponseModel) throws Exception {
|
||||
Log.e("进入房间", "userJoinRoomNew--------------------------------------------");
|
||||
userJoinDisposable = null;
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
userJoinDisposable = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 离开直播间
|
||||
*
|
||||
* @param stream
|
||||
* @param liveUid
|
||||
*/
|
||||
public void leaveRoomNew(String stream, String liveUid, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.leaveRoomNew("g" + liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<Object>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<Object>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取多人连麦用户列表
|
||||
*/
|
||||
public void getDRMicUserList(String uid, HttpCallback<List<LinkMicUserBean>> callback) {
|
||||
API.get().createPDLiveApi(false)
|
||||
.getDrLm(uid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<LinkMicUserBeanV2>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<LinkMicUserBeanV2>> listResponseModel) throws Exception {
|
||||
List<LinkMicUserBean> list = new ArrayList<>();
|
||||
for (LinkMicUserBeanV2 bean : listResponseModel.getData().getInfo()) {
|
||||
list.addAll(bean.getUserlist());
|
||||
for (LinkMicUserBean userBean : bean.getUserlist()) {
|
||||
Log.i("多人连麦", "list: " + userBean.toString());
|
||||
}
|
||||
}
|
||||
Log.i("多人连麦", "accept: " + list.size());
|
||||
if (callback != null) {
|
||||
callback.onSuccess(list);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
private Disposable randomPkApi;
|
||||
|
||||
/**
|
||||
* PK排位赛接口
|
||||
*/
|
||||
public void getRandomPk(String mLiveUid, String pkUid, HttpCallback<PkRankBean> callback) {
|
||||
randomPkApi = API.get().pdLiveApi(mContext)
|
||||
.getPkRanksList(mLiveUid, pkUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(listResponseModel -> {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取随机PK开关
|
||||
* 1=开,0=关
|
||||
*/
|
||||
public void getRandomPkSwitch(HttpCallback<Integer> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRandomPkSwitch()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo().get(0));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置随机PK开关
|
||||
*
|
||||
* @param pk 1=开,0=关
|
||||
* @param callback @{@link HttpCallbackModel#getCode()} 0=成功
|
||||
*/
|
||||
public void changeRandomPkSwitch(int pk, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.changeRandomPkSwitch(pk)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> responseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
HttpCallbackModel model = new HttpCallbackModel();
|
||||
model.setCode(responseModel.getData().getCode());
|
||||
model.setMsg(responseModel.getData().getMsg());
|
||||
callback.onSuccess(model);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自由PK次数
|
||||
*/
|
||||
public void getFreePkNumber(HttpCallback<Integer> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getFreePkNumber()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<Integer>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Integer> responseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起随机PK
|
||||
*/
|
||||
public void randomPK(HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.randomPK()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<String>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<String> responseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 自由PK开始后调用接口扣掉次数
|
||||
*/
|
||||
public void setFreePkNum(HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setFreePkNum()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
|
||||
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机PK后调用接口给后台记录
|
||||
*/
|
||||
public void startRandomPK(String pkuid, HttpCallback<Boolean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.startRandomPK(pkuid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
|
||||
if (responseModel.getData().getCode() == 0) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(true);
|
||||
}
|
||||
} else {
|
||||
callback.onSuccess(false);
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机PK后调用接口给后台记录
|
||||
*
|
||||
* @param cs 简体关键字/uid
|
||||
* @param ct 繁体关键字/uid
|
||||
*/
|
||||
public void randomPkSearchUser(String cs, String ct, HttpCallback<List<RandomPkUserBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.randomPkSearchUser(cs, ct)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<List<RandomPkUserBean>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RandomPkUserBean>> responseModel) throws Exception {
|
||||
if (responseModel.getData().getCode() == 0) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝随机PK
|
||||
*/
|
||||
public void setBanRandomPK(HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setBanRandomPK()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
|
||||
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取随机排位赛信息
|
||||
*/
|
||||
public void getRankPkInfoBean(HttpCallback<RankPkInfoBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRankingInfo()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<RankPkInfoBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RankPkInfoBean> rankPkInfoBeanResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(rankPkInfoBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
public void getAnchorPrankTurntable(String mLiveUid, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getAnchorPrankTurntable(mLiveUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交转盘整蛊
|
||||
*/
|
||||
public void setAnchorPrankTurntable(String mLiveUid, String coin,
|
||||
String turntable_one,
|
||||
String turntable_two,
|
||||
String turntable_three,
|
||||
String turntable_four,
|
||||
String turntable_five,
|
||||
String turntable_six,
|
||||
String status,
|
||||
HttpCallback<Object> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setAnchorPrankTurntable(mLiveUid,
|
||||
coin,
|
||||
turntable_one,
|
||||
turntable_two,
|
||||
turntable_three,
|
||||
turntable_four,
|
||||
turntable_five,
|
||||
turntable_six,
|
||||
status)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess("");
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
public void getPrankGiftList(String mLiveUid, HttpCallback<List<PrankGiftBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.prankList(mLiveUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置礼物整蛊
|
||||
*/
|
||||
public void setPrankGift(String mLiveUid, String gift_id, String gift_num, String prank_content, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setPrank(mLiveUid, gift_id, gift_num, prank_content)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除礼物整蛊
|
||||
*/
|
||||
public void deletePrankGift(String mLiveUid, String prank_index, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.deletePrank(mLiveUid, prank_index)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 整蛊结束
|
||||
*/
|
||||
public void endPrankTurntable(String mLiveUid, HttpCallback<BaseModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.endPrankTurntable(mLiveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void getAiRobotStatus(HttpCallback<LiveAiRobotBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getAnchorAiState()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void setAiRobotStatus(String status, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setAnchorAiState(status)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void setAiRobotDate(String name, String value, HttpCallback<HttpCallbackModel> callback) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put(name, value);
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setAnchorAiState(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getAiRobotBody(int type, HttpCallback<List<LiveAiRobotBean.Message>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getAiAutomaticSpeech(type + "")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void addAiRobotBody(int type, String content, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.addAiAutomaticSpeech(type + "", content)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void updateAiRobotBody(int type, int id, String content, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.updateAiAutomaticSpeech(type + "", id + "", content)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void delAiRobotBody(int type, int id, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.delAiAutomaticSpeech(type + "", id + "")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 开播设置数据获取
|
||||
*
|
||||
* @param liveUid
|
||||
* @param callback
|
||||
*/
|
||||
public void getLiveStetUpStatus(String liveUid, HttpCallback<LiveStetUpStatusModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveStetUpStatus(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<LiveStetUpStatusModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<LiveStetUpStatusModel> liveStetUpStatusModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(liveStetUpStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void jieshuDRPK(String uID) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.jieshuDRPK(uID, uID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(baseModelResponseModel -> {
|
||||
|
||||
}, throwable -> {
|
||||
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
public void cancelLive() {
|
||||
if (userJoinDisposable != null) {
|
||||
userJoinDisposable.dispose();
|
||||
}
|
||||
if (enterRoomDisposable != null) {
|
||||
enterRoomDisposable.dispose();
|
||||
}
|
||||
if (randomPkApi != null) {
|
||||
randomPkApi.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
|
||||
public class APKManager extends BaseCacheManager {
|
||||
private static APKManager manager;
|
||||
private final String APK_VER = "apk_ver";
|
||||
private final String APK_URL = "apk_url";
|
||||
private final String APK_DES = "apk_des";
|
||||
private final String APK_IS_UP = "isup";
|
||||
private final String APK_GOOGLE_IS_UP = "google_isup";
|
||||
|
||||
public APKManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单利
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static APKManager get() {
|
||||
if (null == manager) {
|
||||
manager = new APKManager(CommonAppContext.sInstance.getBaseContext());
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setAPKUrl(String apkUrl) {
|
||||
put(APK_URL, apkUrl);
|
||||
}
|
||||
|
||||
public void setAPKDes(String apkDes) {
|
||||
put(APK_DES, apkDes);
|
||||
}
|
||||
|
||||
public String getAPKUrl() {
|
||||
return getString(APK_URL);
|
||||
}
|
||||
|
||||
public String getAPKDes() {
|
||||
return getString(APK_DES);
|
||||
}
|
||||
|
||||
public void setApkVer(String apkVer) {
|
||||
put(APK_VER, apkVer);
|
||||
}
|
||||
|
||||
public boolean getApkVerNew() {
|
||||
|
||||
return VersionUtil.isLatest(getString(APK_VER));
|
||||
}
|
||||
|
||||
public void setAPKIsUp(int apkIsUp) {
|
||||
put(APK_IS_UP, apkIsUp);
|
||||
}
|
||||
|
||||
public void setAPKGoogleIsUp(int apkGoogleIsUp) {
|
||||
put(APK_GOOGLE_IS_UP, apkGoogleIsUp);
|
||||
}
|
||||
|
||||
public int getApkIsUp() {
|
||||
return getInt(APK_IS_UP, 0);
|
||||
}
|
||||
|
||||
public int getAPKGoogleIsUp() {
|
||||
return getInt(APK_GOOGLE_IS_UP, 0);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.event.DataUserInfoEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@@ -25,20 +26,55 @@ import org.greenrobot.eventbus.EventBus;
|
||||
* 登录者信息管理
|
||||
*/
|
||||
public class IMLoginManager extends BaseCacheManager {
|
||||
private final static String KEY_USER_INFO = "keyUserInfo";
|
||||
private final String KEY_USER_INFO = "keyUserInfo";
|
||||
private static IMLoginManager manager;
|
||||
private IMLoginModel userInfo;
|
||||
private final static String isNewUserGif = "isNewUserGif";
|
||||
private final static String isNewUserOne = "isNewUserOne";
|
||||
private final static String GiftEffect = "giftEffect";
|
||||
private final static String MountEffect = "mountEffect";
|
||||
private final static String IS_CHAT = "isChat";
|
||||
private final static String IS_SLIDE = "isSlide";
|
||||
private final static String IS_FLOAT = "is_float";
|
||||
private final static String IS_HINT = "is_hint";
|
||||
private final static String IS_HINT2 = "is_hint2";
|
||||
private final String isNewUserGif = "isNewUserGif";
|
||||
private final String isNewUserOne = "isNewUserOne";
|
||||
private final String GiftEffect = "giftEffect";
|
||||
private final String MountEffect = "mountEffect";
|
||||
private final String IS_CHAT = "isChat";
|
||||
private final String IS_SLIDE = "isSlide";
|
||||
private final String IS_FLOAT = "is_float";
|
||||
private final String IS_HINT = "is_hint";
|
||||
private final String IS_HINT2 = "is_hint2";
|
||||
private final String SELECT_CLARITY = "selectClarity";
|
||||
private final String CLARITY = "clarity";
|
||||
|
||||
|
||||
public void setClarity(String clarity) {
|
||||
put(CLARITY, clarity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 1080p开播分辨率:clarity 0关闭 1开启
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getClarity() {
|
||||
return TextUtils.equals(getString(CLARITY), "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置清晰度
|
||||
*
|
||||
* @param selectClarity
|
||||
*/
|
||||
public void setSelectClarity(int selectClarity) {
|
||||
put(SELECT_CLARITY, selectClarity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清晰度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getSelectClarity() {
|
||||
|
||||
return getInt(SELECT_CLARITY, 0);
|
||||
|
||||
}
|
||||
|
||||
public boolean isHint() {
|
||||
return 1 == getInt(IS_HINT, 0);
|
||||
}
|
||||
@@ -151,7 +187,7 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
*/
|
||||
public static IMLoginManager get(Context context) {
|
||||
if (null == manager) {
|
||||
manager = new IMLoginManager(context);
|
||||
manager = new IMLoginManager(CommonAppContext.sInstance.getBaseContext());
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
@@ -269,7 +305,7 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (info.length > 0) {
|
||||
if (info.length > 0 && userInfo != null) {
|
||||
if ("1".equals(info[0])) {
|
||||
userInfo.setIsAdmin("1");
|
||||
InstructorRemarkManager.get(context).getNetInstructorRemark();
|
||||
|
||||
261
common/src/main/java/com/yunbao/common/manager/IMRTCManager.java
Normal file
261
common/src/main/java/com/yunbao/common/manager/IMRTCManager.java
Normal file
@@ -0,0 +1,261 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import static cn.rongcloud.rtc.base.RTCErrorCode.JOIN_CHAT_ROOM_TIMEOUT;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.RCRTCRemoteUser;
|
||||
import cn.rongcloud.rtc.api.RCRTCRoom;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener;
|
||||
import cn.rongcloud.rtc.api.stream.RCRTCInputStream;
|
||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||
|
||||
/**
|
||||
* RTC管理类,负责管理申请、同意、拒绝PK
|
||||
*/
|
||||
public class IMRTCManager {
|
||||
private static IMRTCManager manager;
|
||||
private RCRTCRoom rtcRoom;
|
||||
private List<String> requestUid;
|
||||
|
||||
private IMRTCManager() {
|
||||
requestUid = new ArrayList<>();
|
||||
}
|
||||
|
||||
public static IMRTCManager getInstance() {
|
||||
if (manager == null) {
|
||||
manager = new IMRTCManager();
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setRtcRoom(RCRTCRoom rtcRoom) {
|
||||
this.rtcRoom = rtcRoom;
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应PK请求
|
||||
*
|
||||
* @param liveUid 对方房间号
|
||||
* @param agree 是否同意
|
||||
* @param extra 扩展参数
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void responseJoinOtherRoom(String liveUid, boolean agree, String extra, IRCRTCResultCallback callback) {
|
||||
if (rtcRoom != null) {
|
||||
/*
|
||||
inviterRoomId - 邀请者所在房间 id,
|
||||
inviterUserId - 邀请者用户 id
|
||||
agree - 被邀请者是否同意连麦邀请
|
||||
inviteeAutoMix - 是否将被邀请者音视频资源发送到邀请人房间中合流
|
||||
1:inviteeAutoMix 为true时:
|
||||
1.1:如果邀请方在发送连麦请求之前发布了资源,当被邀请方加入邀请者房间成功后,服务器会把邀请方流资源合并到被邀请方视图(默认仅悬浮布局合流)上。
|
||||
1.2:如果邀请方在发送连麦请求之前没有发布资源,将会在邀请方发布资源成功后,服务器才会把邀请方的资源合并到被邀请方视图(默认仅悬浮布局合流)上。
|
||||
2: 无论为true或false,双方都可以使用RCRTCLiveInfo.setMixConfig(RCRTCMixConfig, IRCRTCResultCallback) 方法主动设置合流布局。一旦主动设置过合流布局,后续音视频直播过程中设置的自动合流参数将失效。
|
||||
extra - 扩展字段,默认为空
|
||||
*/
|
||||
rtcRoom.getLocalUser().responseJoinOtherRoom(liveUid, liveUid, agree, agree, extra, callback);
|
||||
} else {
|
||||
callback.onFailed(RTCErrorCode.RongRTCCodeIMError);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请PK
|
||||
*
|
||||
* @param liveUid 对方房间号
|
||||
* @param inviterAutoMix 是否将邀请者音视频资源发送到被邀请人房间中合流
|
||||
* @param extra 扩展参数
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void requestJoinOtherRoom(String liveUid, boolean inviterAutoMix, String extra, IRCRTCResultCallback callback) {
|
||||
if (requestUid.contains(liveUid)) {
|
||||
callback.onFailed(RTCErrorCode.RongRTCCodeJoinRepeatedRoom);
|
||||
return;
|
||||
}
|
||||
if (rtcRoom != null && rtcRoom.getLocalUser() != null) {
|
||||
/*
|
||||
inviteeRoomId - 被邀请者所在房间 id
|
||||
inviteeUserId - 被邀请用户 id
|
||||
inviterAutoMix - 是否将邀请者音视频资源发送到被邀请人房间中合流
|
||||
1: inviterAutoMix为true时:
|
||||
1.1:如果被邀请方在加入邀请方房间之前发布了资源,当被邀请方加入邀请者房间成功后,服务器会把被邀请方流资源合并到邀请方视图 ·(默认仅悬浮布局合流)上。
|
||||
1.2:如果被邀请方在加入邀请方房间之前没有发布过资源,将会在被邀请方发布资源成功后,服务器会把被邀请方流资源合并到邀请方视图(默认仅悬浮布局合流)上。
|
||||
2:无论为true或false,双方都可以使用RCRTCLiveInfo.setMixConfig(RCRTCMixConfig, IRCRTCResultCallback) 方法主动设置合流布局。一旦主动设置过合流布局,后续音视频直播过程中设置的自动合流参数将失效。
|
||||
extra - 扩展字段,默认为空
|
||||
*/
|
||||
rtcRoom.getLocalUser().requestJoinOtherRoom(liveUid, liveUid, inviterAutoMix, extra, new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
callback.onSuccess();
|
||||
if (!RandomPkManager.getInstance().isRandomModel()) {
|
||||
ToastUtil.show("发起邀请成功");
|
||||
}
|
||||
requestUid.add(liveUid);
|
||||
startRequestTimeoutTask(liveUid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
if (!RandomPkManager.getInstance().isRandomModel()) {
|
||||
ToastUtil.show("邀请失败 " + errorCode.getValue());
|
||||
}
|
||||
if (RandomPkManager.getInstance().isRequestPk()) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE);
|
||||
}
|
||||
requestUid.remove(liveUid);
|
||||
callback.onFailed(errorCode);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback.onFailed(RTCErrorCode.RongRTCCodeIMError);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册监听对方通知类,还没搞清楚具体用法,先搁置
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void registerRoomListener(IRCRTCRoomEventsListener listener) {
|
||||
if (rtcRoom != null && rtcRoom.getLocalUser() != null) {
|
||||
rtcRoom.registerRoomListener(new IRCRTCRoomEventsListener() {
|
||||
@Override
|
||||
public void onRemoteUserPublishResource(RCRTCRemoteUser remoteUser, List<RCRTCInputStream> streams) {
|
||||
listener.onRemoteUserPublishResource(remoteUser, streams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoteUserMuteAudio(RCRTCRemoteUser remoteUser, RCRTCInputStream stream, boolean mute) {
|
||||
listener.onRemoteUserMuteAudio(remoteUser, stream, mute);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoteUserMuteVideo(RCRTCRemoteUser remoteUser, RCRTCInputStream stream, boolean mute) {
|
||||
listener.onRemoteUserMuteVideo(remoteUser, stream, mute);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoteUserUnpublishResource(RCRTCRemoteUser remoteUser, List<RCRTCInputStream> streams) {
|
||||
listener.onRemoteUserUnpublishResource(remoteUser, streams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserJoined(RCRTCRemoteUser remoteUser) {
|
||||
listener.onUserJoined(remoteUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserLeft(RCRTCRemoteUser remoteUser) {
|
||||
listener.onUserLeft(remoteUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserOffline(RCRTCRemoteUser remoteUser) {
|
||||
listener.onUserOffline(remoteUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPublishLiveStreams(List<RCRTCInputStream> streams) {
|
||||
listener.onPublishLiveStreams(streams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnpublishLiveStreams(List<RCRTCInputStream> streams) {
|
||||
listener.onUnpublishLiveStreams(streams);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消邀请
|
||||
*
|
||||
* @param liveUid 房间号
|
||||
* @param extra 扩展参数
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void cancelRequestJoinOtherRoom(String liveUid, String extra, IRCRTCResultCallback callback) {
|
||||
if (rtcRoom != null && rtcRoom.getLocalUser() != null) {
|
||||
rtcRoom.getLocalUser().cancelRequestJoinOtherRoom(liveUid, liveUid, extra, new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
callback.onSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
callback.onFailed(errorCode);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback.onFailed(RTCErrorCode.RongRTCCodeIMError);
|
||||
}
|
||||
}
|
||||
|
||||
public void callPkSuccess(String liveUid) {
|
||||
requestUid.remove(liveUid);
|
||||
}
|
||||
|
||||
private void startRequestTimeoutTask(String liveUid) {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
int waitTime = 15;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!requestUid.contains(liveUid)) {
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
if (waitTime-- == 0) {
|
||||
//callback.onFailed(JOIN_CHAT_ROOM_TIMEOUT);
|
||||
cancelRequestJoinOtherRoom(liveUid, "extra", new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
requestUid.remove(liveUid);
|
||||
if (RandomPkManager.getInstance().isRandomModel()) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
requestUid.remove(liveUid);
|
||||
if (RandomPkManager.getInstance().isRandomModel()) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE);
|
||||
}
|
||||
}
|
||||
});
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
}, 1000, 1000);
|
||||
}
|
||||
|
||||
public void leaveOtherRoom(String roomId,
|
||||
boolean notifyFinished,
|
||||
IRCRTCResultCallback callBack) {
|
||||
RCRTCEngine.getInstance().leaveOtherRoom(roomId, notifyFinished, new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
callBack.onSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
callBack.onFailed(rtcErrorCode);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user