Compare commits
73 Commits
v681小游戏
...
新改版_poyo_启
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e447824ea1 | ||
|
|
54eb9ea099 | ||
|
|
98cb22a706 | ||
|
|
767bc41820 | ||
|
|
ef99178d33 | ||
|
|
24fa740e05 | ||
|
|
d662d5c3ea | ||
|
|
b9a6d9b966 | ||
|
|
0586360408 | ||
|
|
9d8bef398a | ||
|
|
602417f45d | ||
|
|
86902a8f9b | ||
|
|
7cb89035d8 | ||
|
|
f39f2b483e | ||
|
|
15f19e39a7 | ||
|
|
10d1d22b8a | ||
|
|
96b302f0ee | ||
|
|
99d8df2ec3 | ||
|
|
4e42a4b04c | ||
|
|
c582376cc4 | ||
|
|
e58ce7932f | ||
|
|
9a72e54ca3 | ||
|
|
6de4523d27 | ||
|
|
40966e0b33 | ||
|
|
935a5a3ec5 | ||
|
|
34aaa61f11 | ||
|
|
5373f6b5bc | ||
|
|
c84fc9e8f1 | ||
|
|
b68b334e00 | ||
|
|
bfb172c1e8 | ||
|
|
277684b8e0 | ||
|
|
d181e0e743 | ||
|
|
361d23b9ef | ||
|
|
745702e36c | ||
|
|
0b62d4ddc4 | ||
|
|
23d3c9a915 | ||
|
|
8a23e76788 | ||
|
|
6f2de3a4d7 | ||
|
|
68f444b3fc | ||
|
|
f616fb1192 | ||
|
|
cd4d0c13c1 | ||
|
|
a8f92a1e38 | ||
|
|
a1b59733b3 | ||
|
|
f1670965b9 | ||
|
|
1985eebfb1 | ||
|
|
d299e579d6 | ||
|
|
02ee96e369 | ||
|
|
ed595ec1f4 | ||
|
|
5dc2b15bd8 | ||
|
|
08bc59f80e | ||
|
|
25a926e507 | ||
|
|
abfb8e74be | ||
|
|
6e0e195c20 | ||
|
|
0854d931d4 | ||
|
|
98a0009019 | ||
|
|
b9503b91f5 | ||
|
|
dee916ea7d | ||
|
|
2e1eb3c7b4 | ||
|
|
2102a3bfc2 | ||
|
|
1576a75c08 | ||
|
|
89e4373d81 | ||
|
|
59271ce709 | ||
| 528647a0bc | |||
| 238dfcc2d3 | |||
| 61b1101c3f | |||
| daf881f6a7 | |||
| 38f3b721e0 | |||
| 04ae7eeacc | |||
|
|
3440b71229 | ||
|
|
214e6f5d89 | ||
| 2d9e1cd685 | |||
| 7196ebd16e | |||
| e0405e9c13 |
@@ -5,7 +5,7 @@ apply plugin: 'kotlin-parcelize'
|
|||||||
apply from: "../package_config.gradle"
|
apply from: "../package_config.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.pdlive.shayu"
|
namespace "com.newpdlive.sy"
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="com.pdlive.shayu"/>
|
<package android:name="com.newpdlive.sy"/>
|
||||||
<package android:name="com.facebook.orca"/>
|
<package android:name="com.facebook.orca"/>
|
||||||
|
|
||||||
<package
|
<package
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="com.facebook.FacebookContentProvider"
|
android:name="com.facebook.FacebookContentProvider"
|
||||||
android:authorities="com.facebook.app.FacebookContentProvider2011402032399020"
|
android:authorities="com.facebook.app.FacebookContentProvider2011402032399022"
|
||||||
android:exported="true" />
|
android:exported="true" />
|
||||||
<receiver
|
<receiver
|
||||||
android:name="com.yunbao.share.receiver.TwitterResultReceiver"
|
android:name="com.yunbao.share.receiver.TwitterResultReceiver"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.pdlive.shayu.R;
|
import com.newpdlive.sy.R;
|
||||||
import com.yunbao.share.ICallback;
|
import com.yunbao.share.ICallback;
|
||||||
import com.yunbao.share.bean.ShareBuilder;
|
import com.yunbao.share.bean.ShareBuilder;
|
||||||
import com.yunbao.share.platform.FacebookShare;
|
import com.yunbao.share.platform.FacebookShare;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.pdlive.shayu.R;
|
import com.newpdlive.sy.R;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.pdlive.shayu.R;
|
import com.newpdlive.sy.R;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<string name="com.twitter.sdk.android.CONSUMER_SECRET">aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws</string>
|
<string name="com.twitter.sdk.android.CONSUMER_SECRET">aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws</string>
|
||||||
|
|
||||||
<string name="dialog_share_title">分享</string>
|
<string name="dialog_share_title">分享</string>
|
||||||
<string name="dialog_share_info">快來 PDLIVE觀看%s直播,認識更多有趣的朋友吧!</string>
|
<string name="dialog_share_info">快來 POYO觀看%s直播,認識更多有趣的朋友吧!</string>
|
||||||
<string name="dialog_share_app_facebook" >Facebook</string>
|
<string name="dialog_share_app_facebook" >Facebook</string>
|
||||||
<string name="dialog_share_app_line" >Line</string>
|
<string name="dialog_share_app_line" >Line</string>
|
||||||
<string name="dialog_share_app_twitter">Twitter</string>
|
<string name="dialog_share_app_twitter">Twitter</string>
|
||||||
@@ -13,6 +13,6 @@
|
|||||||
<string name="dialog_share_app_instagram" >Instagram</string>
|
<string name="dialog_share_app_instagram" >Instagram</string>
|
||||||
|
|
||||||
<string name="dialog_invite_title">邀請好友</string>
|
<string name="dialog_invite_title">邀請好友</string>
|
||||||
<string name="dialog_invite_info">快來 PDLIVE觀看直播,認識更多有趣的朋友吧!</string>
|
<string name="dialog_invite_info">快來 POYO觀看直播,認識更多有趣的朋友吧!</string>
|
||||||
<string name="dialog_share_copy">複製</string>
|
<string name="dialog_share_copy">複製</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<string name="dialog_share_app_messenger">Messenger</string>
|
<string name="dialog_share_app_messenger">Messenger</string>
|
||||||
<string name="dialog_share_app_instagram" >Instagram</string>
|
<string name="dialog_share_app_instagram" >Instagram</string>
|
||||||
<string name="dialog_share_title">Share</string>
|
<string name="dialog_share_title">Share</string>
|
||||||
<string name="dialog_share_info">Come and watch %s live on PDLIVE and meet more interesting people!</string>
|
<string name="dialog_share_info">Come and watch %s live on PoYo and meet more interesting people!</string>
|
||||||
<string name="dialog_invite_title">Invite Friends</string>
|
<string name="dialog_invite_title">Invite Friends</string>
|
||||||
<string name="dialog_invite_info">Come to PDLIVE to discover more and better live streams.</string>
|
<string name="dialog_invite_info">Come to PoYo to discover more and better live streams.</string>
|
||||||
<string name="dialog_share_copy">Copy</string>
|
<string name="dialog_share_copy">Copy</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
{
|
|
||||||
"agcgw":{
|
|
||||||
"backurl":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"url":"connect-drcn.dbankcloud.cn",
|
|
||||||
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
|
|
||||||
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"agcgw_all":{
|
|
||||||
"CN":"connect-drcn.dbankcloud.cn",
|
|
||||||
"CN_back":"connect-drcn.hispace.hicloud.com",
|
|
||||||
"DE":"connect-dre.dbankcloud.cn",
|
|
||||||
"DE_back":"connect-dre.hispace.hicloud.com",
|
|
||||||
"RU":"connect-drru.hispace.dbankcloud.ru",
|
|
||||||
"RU_back":"connect-drru.hispace.dbankcloud.cn",
|
|
||||||
"SG":"connect-dra.dbankcloud.cn",
|
|
||||||
"SG_back":"connect-dra.hispace.hicloud.com"
|
|
||||||
},
|
|
||||||
"websocketgw_all":{
|
|
||||||
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
|
|
||||||
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
|
|
||||||
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
|
|
||||||
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
|
|
||||||
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
|
|
||||||
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
|
|
||||||
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
|
|
||||||
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
|
|
||||||
},
|
|
||||||
"client":{
|
|
||||||
"cp_id":"30852000032486141",
|
|
||||||
"product_id":"388421841221767494",
|
|
||||||
"client_id":"1283893262452580800",
|
|
||||||
"client_secret":"17BC070420691D35650C694230D6348075CB549F7BBA94EDD49FA9E61A9E5434",
|
|
||||||
"project_id":"388421841221767494",
|
|
||||||
"app_id":"109612651",
|
|
||||||
"api_key":"DAEDAAlBbTFuTuyQWQsyYBZLuyjALH9Y9BNFkVZl1GhI0tRaa6HF1LgzXWy2MZiSFrmpbn1aAvcvzP6aKZtR6MVikS8V4SbBlYUPfQ==",
|
|
||||||
"package_name":"com.pdlive.shayu"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_id":"109612651",
|
|
||||||
"client_type":1
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"app_id":"109612651",
|
|
||||||
"package_name":"com.pdlive.shayu"
|
|
||||||
},
|
|
||||||
"service":{
|
|
||||||
"analytics":{
|
|
||||||
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com",
|
|
||||||
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
|
|
||||||
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
|
|
||||||
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
|
|
||||||
"resource_id":"p1",
|
|
||||||
"channel_id":""
|
|
||||||
},
|
|
||||||
"edukit":{
|
|
||||||
"edu_url":"edukit.cloud.huawei.com.cn",
|
|
||||||
"dh_url":"edukit.cloud.huawei.com.cn"
|
|
||||||
},
|
|
||||||
"search":{
|
|
||||||
"url":"https://search-drcn.cloud.huawei.com"
|
|
||||||
},
|
|
||||||
"cloudstorage":{
|
|
||||||
"storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia",
|
|
||||||
"storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru",
|
|
||||||
"storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru",
|
|
||||||
"storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu",
|
|
||||||
"storage_url_de":"https://ops-dre.agcstorage.link",
|
|
||||||
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn",
|
|
||||||
"storage_url_sg":"https://ops-dra.agcstorage.link",
|
|
||||||
"storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn",
|
|
||||||
"storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn"
|
|
||||||
},
|
|
||||||
"ml":{
|
|
||||||
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"region":"CN",
|
|
||||||
"configuration_version":"3.0",
|
|
||||||
"appInfos":[
|
|
||||||
{
|
|
||||||
"package_name":"com.pdlive.shayu",
|
|
||||||
"client":{
|
|
||||||
"app_id":"109612651"
|
|
||||||
},
|
|
||||||
"app_info":{
|
|
||||||
"package_name":"com.pdlive.shayu",
|
|
||||||
"app_id":"109612651"
|
|
||||||
},
|
|
||||||
"oauth_client":{
|
|
||||||
"client_type":1,
|
|
||||||
"client_id":"109612651"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -98,11 +98,12 @@ android {
|
|||||||
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
||||||
processManifestTask.doLast { pm ->
|
processManifestTask.doLast { pm ->
|
||||||
// String manifestPath = "build/intermediates/bundle_manifest/google_onlineRelease/bundle-manifest/AndroidManifest.xml"
|
// String manifestPath = "build/intermediates/bundle_manifest/google_onlineRelease/bundle-manifest/AndroidManifest.xml"
|
||||||
String manifestPath = "build/intermediates/merged_manifests/google_onlineRelease/processGoogle_onlineReleaseManifest/AndroidManifest.xml"
|
String manifestPath = "build/intermediates/merged_manifests/${variant.name}/process${variantName}Manifest/AndroidManifest.xml"
|
||||||
def isGooglePlay = variant.name.contains("google")
|
def isGooglePlay = !variant.name.contains("link")
|
||||||
|
println "variant = ${variant.name}"
|
||||||
println "谷歌版本:" + isGooglePlay
|
println "谷歌版本:" + isGooglePlay
|
||||||
println "文件存在" + file(manifestPath).exists()
|
println "文件存在" + file(manifestPath).exists()
|
||||||
println "" + (isGooglePlay == 1)
|
println "" + (isGooglePlay)
|
||||||
println "" + (file(manifestPath).exists() && isGooglePlay)
|
println "" + (file(manifestPath).exists() && isGooglePlay)
|
||||||
if (file(manifestPath).exists() && isGooglePlay) {
|
if (file(manifestPath).exists() && isGooglePlay) {
|
||||||
def manifestContent = file(manifestPath).getText()
|
def manifestContent = file(manifestPath).getText()
|
||||||
@@ -125,8 +126,8 @@ android {
|
|||||||
variant.mergeAssetsProvider.configure {
|
variant.mergeAssetsProvider.configure {
|
||||||
doLast {
|
doLast {
|
||||||
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle',
|
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle',
|
||||||
//'model/ai_face_processor.bundle',
|
'model/ai_face_processor.bundle',
|
||||||
//'model/ai_face_processor_lite.bundle',
|
'model/ai_face_processor_lite.bundle',
|
||||||
'model/ai_hairseg.bundle',
|
'model/ai_hairseg.bundle',
|
||||||
'model/ai_hand_processor.bundle',
|
'model/ai_hand_processor.bundle',
|
||||||
'model/ai_human_processor.bundle',
|
'model/ai_human_processor.bundle',
|
||||||
@@ -134,7 +135,7 @@ android {
|
|||||||
'model/ai_human_processor_mb_fast.bundle',
|
'model/ai_human_processor_mb_fast.bundle',
|
||||||
'graphics/body_slim.bundle',
|
'graphics/body_slim.bundle',
|
||||||
'graphics/controller_cpp.bundle',
|
'graphics/controller_cpp.bundle',
|
||||||
//'graphics/face_beautification.bundle',
|
'graphics/face_beautification.bundle',
|
||||||
'graphics/face_makeup.bundle',
|
'graphics/face_makeup.bundle',
|
||||||
'graphics/fuzzytoonfilter.bundle',
|
'graphics/fuzzytoonfilter.bundle',
|
||||||
'graphics/fxaa.bundle',
|
'graphics/fxaa.bundle',
|
||||||
@@ -176,7 +177,7 @@ android {
|
|||||||
} else {
|
} else {
|
||||||
server = '测试服'
|
server = '测试服'
|
||||||
}
|
}
|
||||||
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.apk"
|
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PoYo-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.apk"
|
||||||
variant.outputs.forEach { fe ->
|
variant.outputs.forEach { fe ->
|
||||||
copy {
|
copy {
|
||||||
from fe.outputFile
|
from fe.outputFile
|
||||||
@@ -206,24 +207,24 @@ android {
|
|||||||
} else {
|
} else {
|
||||||
server = '测试服'
|
server = '测试服'
|
||||||
}
|
}
|
||||||
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.aab"
|
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PoYo-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.aab"
|
||||||
File finalFile = new File("${project.rootDir}\\outputs\\aab", fileName)
|
File finalFile = new File("${project.rootDir}\\outputs\\aab", fileName)
|
||||||
finalBundleFile.set(finalFile)
|
finalBundleFile.set(finalFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias 'phonelive'
|
keyAlias 'poyo'
|
||||||
keyPassword 'phonelive'
|
keyPassword 'poyolive'
|
||||||
storeFile file('../hdl.jks')
|
storeFile file('../py.jks')
|
||||||
storePassword 'phonelive'
|
storePassword 'poyolive'
|
||||||
}
|
}
|
||||||
//陌陌本地配置需要
|
//陌陌本地配置需要
|
||||||
config {//TODO BEAUTYSDK 这里需要配置keystore相关信息
|
config {//TODO BEAUTYSDK 这里需要配置keystore相关信息
|
||||||
keyAlias 'phonelive'
|
keyAlias 'poyo'
|
||||||
keyPassword 'phonelive'
|
keyPassword 'poyolive'
|
||||||
storeFile file('../hdl.jks')//keystore的存放路径
|
storeFile file('../py.jks')//keystore的存放路径
|
||||||
storePassword 'phonelive'
|
storePassword 'poyolive'
|
||||||
v2SigningEnabled true // android 5.0-8.0,必须用V2,否则会有安全问题
|
v2SigningEnabled true // android 5.0-8.0,必须用V2,否则会有安全问题
|
||||||
v1SigningEnabled true
|
v1SigningEnabled true
|
||||||
}
|
}
|
||||||
|
|||||||
47
app/src/google_online/google-services.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "163991854180",
|
||||||
|
"project_id": "poyo-597a0",
|
||||||
|
"storage_bucket": "poyo-597a0.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:163991854180:android:c6d4c189e941c4b1da9371",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdsylive.yo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-lcd5n8kk2q9pv3bktp0ch2e3s2tl4mhs.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdsylive.yo",
|
||||||
|
"certificate_hash": "5dda5ab9aee4b4a8d357b6a953cb331c8f34d1cf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-035qp9l27o2s4n3n2v4hbvrog17ufbs5.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyBjHYkGdAIx9kh-FQ88eLLL6g6KGa8c7bw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-035qp9l27o2s4n3n2v4hbvrog17ufbs5.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
47
app/src/google_test/google-services.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "163991854180",
|
||||||
|
"project_id": "poyo-597a0",
|
||||||
|
"storage_bucket": "poyo-597a0.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:163991854180:android:c6d4c189e941c4b1da9371",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdsylive.yo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-lcd5n8kk2q9pv3bktp0ch2e3s2tl4mhs.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdsylive.yo",
|
||||||
|
"certificate_hash": "5dda5ab9aee4b4a8d357b6a953cb331c8f34d1cf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-035qp9l27o2s4n3n2v4hbvrog17ufbs5.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyBjHYkGdAIx9kh-FQ88eLLL6g6KGa8c7bw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "163991854180-035qp9l27o2s4n3n2v4hbvrog17ufbs5.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
70
app/src/huawei_test/google-services.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "292494634914",
|
||||||
|
"project_id": "pdlive-1631521064967",
|
||||||
|
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdlive.shayu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.live.pd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
70
app/src/link_online/google-services.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "292494634914",
|
||||||
|
"project_id": "pdlive-1631521064967",
|
||||||
|
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdlive.shayu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.live.pd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
70
app/src/link_test/google-services.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "292494634914",
|
||||||
|
"project_id": "pdlive-1631521064967",
|
||||||
|
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdlive.shayu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.live.pd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
<uses-permission android:name="android.permission.NETWORK_PROVIDER" />
|
<uses-permission android:name="android.permission.NETWORK_PROVIDER" />
|
||||||
@@ -105,7 +106,7 @@
|
|||||||
<application
|
<application
|
||||||
android:name="com.shayu.phonelive.AppContext"
|
android:name="com.shayu.phonelive.AppContext"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/new_logo"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:preserveLegacyExternalStorage="true"
|
android:preserveLegacyExternalStorage="true"
|
||||||
@@ -127,11 +128,32 @@
|
|||||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.shayu.phonelive.activity.LauncherActivity"
|
android:name="com.shayu.phonelive.activity.LauncherActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:screenOrientation="portrait"
|
>
|
||||||
tools:ignore="LockedOrientationActivity">
|
<!-- <intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>-->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
|
||||||
|
<data android:scheme="um.64e40ee55488fe7b3afa2c96" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="com.shayu.phonelive.activity.TestActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/MySplashTheme"
|
||||||
|
>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@@ -171,17 +193,32 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="SW_RELEASE_MODEL"
|
android:name="SW_RELEASE_MODEL"
|
||||||
android:value="${swReleaseModel}" />
|
android:value="${swReleaseModel}" />
|
||||||
|
<meta-data
|
||||||
|
android:name="LINE_ID"
|
||||||
|
android:value="${lineChannelId}" />
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.openinstall.APP_KEY"
|
android:name="com.openinstall.APP_KEY"
|
||||||
android:value="smvslm" />
|
android:value="smvslm" />
|
||||||
|
<meta-data
|
||||||
|
android:name="HIDE_GOOGLE_LOGIN"
|
||||||
|
android:value="${isHideGoogleLogin}" />
|
||||||
|
<meta-data
|
||||||
|
android:name="HIDE_FACEBOOK_LOGIN"
|
||||||
|
android:value="${isHideFacebookLogin}" />
|
||||||
|
<meta-data
|
||||||
|
android:name="HIDE_LINE_LOGIN"
|
||||||
|
android:value="${isHideLineLogin}" />
|
||||||
|
<meta-data
|
||||||
|
android:name="HIDE_TWITTER_LOGIN"
|
||||||
|
android:value="${isHideTwitterLogin}" />
|
||||||
|
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.facebook.sdk.ApplicationId"
|
android:name="com.facebook.sdk.ApplicationId"
|
||||||
android:value="@string/facebook_app_id" />
|
android:value="${facebook_app_id}" />
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.facebook.sdk.ClientToken"
|
android:name="com.facebook.sdk.ClientToken"
|
||||||
android:value="@string/facebook_client_token" />
|
android:value="${facebook_client_token}" />
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
|
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
|
||||||
android:value="false" />
|
android:value="false" />
|
||||||
@@ -192,6 +229,7 @@
|
|||||||
android:name="firebase_analytics_collection_enabled"
|
android:name="firebase_analytics_collection_enabled"
|
||||||
android:value="false" />
|
android:value="false" />
|
||||||
|
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name="com.shayu.phonelive.utils.CustomMessageReceiver"
|
android:name="com.shayu.phonelive.utils.CustomMessageReceiver"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|||||||
@@ -144,10 +144,12 @@ public class AppContext extends CommonAppContext {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
|
||||||
if (!isMainProcess()) {
|
if (!isMainProcess()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
super.onCreate();
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
Log.d("AppStart AppContext", "App start time: " + startTime);
|
||||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||||
//注册全局异常捕获
|
//注册全局异常捕获
|
||||||
registerError();
|
registerError();
|
||||||
@@ -372,7 +374,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}).setUncaughtCrashHandler((t, e) -> {
|
}).setUncaughtCrashHandler((t, e) -> {
|
||||||
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
Log.e("ApplicationError", "子线程异常");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}).register(this);
|
}).register(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
setStatusBar();
|
|
||||||
setContentView(R.layout.activity_launcher);
|
setContentView(R.layout.activity_launcher);
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
|
// setStatusBar();
|
||||||
mContext = this;
|
mContext = this;
|
||||||
mRoot = findViewById(R.id.root);
|
mRoot = findViewById(R.id.root);
|
||||||
mCover = findViewById(R.id.cover);
|
mCover = findViewById(R.id.cover);
|
||||||
@@ -131,7 +131,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
mBtnSkipVideo = findViewById(R.id.btn_skip_video);
|
mBtnSkipVideo = findViewById(R.id.btn_skip_video);
|
||||||
mBtnSkipImage.setOnClickListener(this);
|
mBtnSkipImage.setOnClickListener(this);
|
||||||
mBtnSkipVideo.setOnClickListener(this);
|
mBtnSkipVideo.setOnClickListener(this);
|
||||||
ImgLoader.display(mContext, R.mipmap.screen, mCover);
|
|
||||||
mHandler = new Handler() {
|
mHandler = new Handler() {
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
@@ -145,6 +144,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||||
try {
|
try {
|
||||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||||
@@ -188,9 +188,11 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
* 获取Config信息
|
* 获取Config信息
|
||||||
*/
|
*/
|
||||||
private void getConfig() {
|
private void getConfig() {
|
||||||
|
// TODO 这里花了1.5s
|
||||||
CommonHttpUtil.getConfig(mContext, new CommonCallback<ConfigBean>() {
|
CommonHttpUtil.getConfig(mContext, new CommonCallback<ConfigBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void callback(ConfigBean bean) {
|
public void callback(ConfigBean bean) {
|
||||||
|
|
||||||
if (bean != null) {
|
if (bean != null) {
|
||||||
L.e(TAG, "----------> getPaster360Url:" + bean.getBeautyKey() + " " + bean.getPaster360Url());
|
L.e(TAG, "----------> getPaster360Url:" + bean.getBeautyKey() + " " + bean.getPaster360Url());
|
||||||
CommonAppConfig.getInstance().setBeautySdkType(bean.getSproutType());
|
CommonAppConfig.getInstance().setBeautySdkType(bean.getSproutType());
|
||||||
@@ -220,7 +222,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
final String uid = uidAndToken[0];
|
final String uid = uidAndToken[0];
|
||||||
final String token = uidAndToken[1];
|
final String token = uidAndToken[1];
|
||||||
if (!TextUtils.isEmpty(uid) && !TextUtils.isEmpty(token)) {
|
if (!TextUtils.isEmpty(uid) && !TextUtils.isEmpty(token)) {
|
||||||
playAD(obj.getIntValue("type") == 0);
|
// playAD(obj.getIntValue("type") == 0);
|
||||||
} else {
|
} else {
|
||||||
releaseVideo();
|
releaseVideo();
|
||||||
LauncherActivity.this.startActivity(new Intent(LauncherActivity.this, EntryActivity.class));
|
LauncherActivity.this.startActivity(new Intent(LauncherActivity.this, EntryActivity.class));
|
||||||
@@ -235,6 +237,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
} else {
|
} else {
|
||||||
checkUidAndToken();
|
checkUidAndToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show(getString(R.string.net_error));
|
ToastUtil.show(getString(R.string.net_error));
|
||||||
}
|
}
|
||||||
@@ -423,6 +426,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
ImageView imageView = new ImageView(mContext);
|
ImageView imageView = new ImageView(mContext);
|
||||||
imageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
imageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||||
|
// imageView.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||||
imageView.setBackgroundColor(0xffffffff);
|
imageView.setBackgroundColor(0xffffffff);
|
||||||
imageView.setTransitionName("ad_img_" + i);
|
imageView.setTransitionName("ad_img_" + i);
|
||||||
mImageViewList.add(imageView);
|
mImageViewList.add(imageView);
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.shayu.phonelive.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
|
||||||
|
import myname.pdlive.shayu.R;
|
||||||
|
|
||||||
|
|
||||||
|
public class TestActivity extends AppCompatActivity {
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_test);
|
||||||
|
ConstraintLayout constraintLayout = findViewById(R.id.root_view);
|
||||||
|
|
||||||
|
View decorView = getWindow().getDecorView();
|
||||||
|
decorView.setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||||
|
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||||
|
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||||
|
);
|
||||||
|
|
||||||
|
ViewTreeObserver vto = constraintLayout.getViewTreeObserver();
|
||||||
|
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
// 移除监听器,避免重复调用
|
||||||
|
constraintLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
|
|
||||||
|
int width = constraintLayout.getWidth();
|
||||||
|
int height = constraintLayout.getHeight();
|
||||||
|
Log.d("TestActivity", "Width: " + width + ", Height: " + height);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/src/main/res/drawable-xxhdpi/icon_new_splash.9.png
Normal file
|
After Width: | Height: | Size: 535 KiB |
BIN
app/src/main/res/drawable-xxhdpi/screen.9.png
Normal file
|
After Width: | Height: | Size: 228 KiB |
14
app/src/main/res/drawable/test.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@android:color/white"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:gravity="center"> <!-- 使用gravity属性来居中图像 -->
|
||||||
|
<bitmap
|
||||||
|
android:src="@mipmap/logo_middle"
|
||||||
|
android:gravity="center"/> <!-- 尽管在<bitmap>中通常不需要这个,但在某些情况下可能有助于明确意图 -->
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
|
android:background="@color/red"
|
||||||
|
android:padding="1dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
@@ -52,13 +54,22 @@
|
|||||||
android:text="@string/recommend_skip"
|
android:text="@string/recommend_skip"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="11sp"
|
android:textSize="11sp"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible"
|
||||||
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/cover"
|
android:id="@+id/cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clickable="true"
|
android:src="@drawable/screen"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:layout_width="84dp"
|
||||||
|
android:src="@mipmap/logo"
|
||||||
|
android:layout_marginBottom="56dp"
|
||||||
|
android:layout_height="30dp"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|||||||
20
app/src/main/res/layout/activity_test.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:id="@+id/root_view"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/cover"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/logo_middle"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 508 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 508 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 508 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 1.3 MiB |
BIN
app/src/main/res/mipmap-xxxhdpi/logo.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/logo_middle.webp
Normal file
|
After Width: | Height: | Size: 207 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/new_logo.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/screen.9.png
Normal file
|
After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 586 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">PDLIVE</string>
|
<string name="app_name">PoYo</string>
|
||||||
<string name="leak_canary_test_class_name">assertk.Assert</string>
|
<string name="leak_canary_test_class_name">assertk.Assert</string>
|
||||||
</resources>
|
</resources>
|
||||||
9
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="MySplashTheme" parent="Theme.AppCompat.Light.NoActionBar">">
|
||||||
|
<!--正常-->
|
||||||
|
<item name="android:windowBackground">@drawable/test</item>
|
||||||
|
<item name="android:windowFullscreen">true</item>全屏
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
70
app/src/samsung_online/google-services.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "292494634914",
|
||||||
|
"project_id": "pdlive-1631521064967",
|
||||||
|
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdlive.shayu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.live.pd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
70
app/src/samsung_test/google-services.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "292494634914",
|
||||||
|
"project_id": "pdlive-1631521064967",
|
||||||
|
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.pdlive.shayu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-8nuhhoeo061ki1jevbcsrl7dfdl6dlm0.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.pdlive.shayu",
|
||||||
|
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "SSSSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.live.pd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -86,6 +86,7 @@ dependencies {
|
|||||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||||
api files('libs/jcc-bate-0.7.3.jar')
|
api files('libs/jcc-bate-0.7.3.jar')
|
||||||
compileOnly fileTree(dir: '../libs', include: ['*.aar'])
|
compileOnly fileTree(dir: '../libs', include: ['*.aar'])
|
||||||
|
api 'androidx.activity:activity:1.9.1'
|
||||||
api rootProject.ext.dependencies["appcompat-androidx"]
|
api rootProject.ext.dependencies["appcompat-androidx"]
|
||||||
api rootProject.ext.dependencies["recyclerview-androidx"]
|
api rootProject.ext.dependencies["recyclerview-androidx"]
|
||||||
api rootProject.ext.dependencies["cardview-androidx"]
|
api rootProject.ext.dependencies["cardview-androidx"]
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
{
|
|
||||||
"project_info": {
|
|
||||||
"project_number": "292494634914",
|
|
||||||
"project_id": "pdlive-1631521064967",
|
|
||||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
|
||||||
},
|
|
||||||
"client": [
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "com.pdlive.shayu"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
|
||||||
"client_type": 1,
|
|
||||||
"android_info": {
|
|
||||||
"package_name": "com.pdlive.shayu",
|
|
||||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
|
||||||
"client_type": 1,
|
|
||||||
"android_info": {
|
|
||||||
"package_name": "com.pdlive.shayu",
|
|
||||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": [
|
|
||||||
{
|
|
||||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
|
||||||
"client_type": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
|
||||||
"client_type": 2,
|
|
||||||
"ios_info": {
|
|
||||||
"bundle_id": "com.live.pd"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"configuration_version": "1"
|
|
||||||
}
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="com.pdlive.shayu.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ public class CommonAppConfig {
|
|||||||
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
|
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
|
||||||
public static final String BUILD_TIME = getMetaDataString("BUILD_TIME");
|
public static final String BUILD_TIME = getMetaDataString("BUILD_TIME");
|
||||||
public static final boolean IS_SW_RELEASE = getMetaDataBoolean("SW_RELEASE_MODEL");
|
public static final boolean IS_SW_RELEASE = getMetaDataBoolean("SW_RELEASE_MODEL");
|
||||||
|
public static final int LINE_CHANNEL_ID = getMetaDataInt("LINE_ID");
|
||||||
|
public static final boolean IS_HIDE_GOOGLE_LOGIN = getMetaDataBoolean("HIDE_GOOGLE_LOGIN");
|
||||||
|
public static final boolean IS_HIDE_FACEBOOK_LOGIN = getMetaDataBoolean("HIDE_FACEBOOK_LOGIN");
|
||||||
|
public static final boolean IS_HIDE_LINE_LOGIN = getMetaDataBoolean("HIDE_LINE_LOGIN");
|
||||||
|
public static final boolean IS_HIDE_TWITTER_LOGIN = getMetaDataBoolean("HIDE_TWITTER_LOGIN");
|
||||||
//外部sd卡
|
//外部sd卡
|
||||||
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
|
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
|
||||||
//内部存储 /data/data/<application package>/files目录
|
//内部存储 /data/data/<application package>/files目录
|
||||||
@@ -397,7 +401,7 @@ public class CommonAppConfig {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mVersion;
|
return "6.9.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ package com.yunbao.common;
|
|||||||
public class HtmlConfig {
|
public class HtmlConfig {
|
||||||
|
|
||||||
//登录即代表同意服务和隐私条款
|
//登录即代表同意服务和隐私条款
|
||||||
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
|
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/h5/page/index.html?id=706";
|
||||||
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=Portal&m=Page&a=index&id=59";
|
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/h5/page/index.html?id=705";
|
||||||
|
|
||||||
//注册用户协议
|
//注册用户协议
|
||||||
public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=2";
|
public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/h5/page/index.html?id=706";
|
||||||
public static final String REG_PRIVCAY2 = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
|
public static final String REG_PRIVCAY2 = CommonAppConfig.HOST + "/h5/page/index.html?id=705";
|
||||||
|
|
||||||
//直播间贡献榜
|
//直播间贡献榜
|
||||||
public static final String LIVE_LIST = CommonAppConfig.HOST + "/index.php?g=Appapi&m=contribute&a=index&uid=";
|
public static final String LIVE_LIST = CommonAppConfig.HOST + "/index.php?g=Appapi&m=contribute&a=index&uid=";
|
||||||
@@ -33,7 +33,7 @@ public class HtmlConfig {
|
|||||||
public static final String LUCK_GIFT_TIP = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=26";
|
public static final String LUCK_GIFT_TIP = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=26";
|
||||||
|
|
||||||
//直播间玩家看到的心愿单
|
//直播间玩家看到的心愿单
|
||||||
public static final String WISHLIST_URL = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Wish&a=index";
|
public static final String WISHLIST_URL = CommonAppConfig.HOST + "/h5/wish/index.html?1=1";
|
||||||
|
|
||||||
//直播间玩家看到的转盘
|
//直播间玩家看到的转盘
|
||||||
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
||||||
@@ -48,7 +48,7 @@ public class HtmlConfig {
|
|||||||
public static final String PERSONAL = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/Personal";
|
public static final String PERSONAL = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/Personal";
|
||||||
|
|
||||||
//我的徽章 右上角问号
|
//我的徽章 右上角问号
|
||||||
public static final String MEDAL_QUESTION = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Fans&a=rule&isfans=1";
|
public static final String MEDAL_QUESTION = CommonAppConfig.HOST + "/h5/fans/rule.html?isfans=1";
|
||||||
|
|
||||||
//我的明细
|
//我的明细
|
||||||
public static final String DETAIL = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Detail&a=index";
|
public static final String DETAIL = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Detail&a=index";
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import android.os.Build;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@@ -94,6 +95,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
String url = getIntent().getStringExtra(Constants.URL);
|
String url = getIntent().getStringExtra(Constants.URL);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.yunbao.common.adapter;
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -8,29 +11,44 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.SudRoomListModel;
|
import com.yunbao.common.bean.SudRoomListModel;
|
||||||
import com.yunbao.common.views.SudGameListViewHolder;
|
import com.yunbao.common.views.NewSudGameListViewHolder;
|
||||||
|
|
||||||
public class SudGameListAdapter extends RefreshAdapter<SudRoomListModel> {
|
public class SudGameListAdapter extends RefreshAdapter<SudRoomListModel> {
|
||||||
private boolean isHome = false;
|
private boolean isHome = false;
|
||||||
|
|
||||||
|
private final Drawable[] bgList = new Drawable[6];
|
||||||
|
|
||||||
|
@SuppressLint("UseCompatLoadingForDrawables")
|
||||||
public SudGameListAdapter(Context context, boolean isHome) {
|
public SudGameListAdapter(Context context, boolean isHome) {
|
||||||
super(context);
|
super(context);
|
||||||
this.isHome = isHome;
|
this.isHome = isHome;
|
||||||
|
|
||||||
|
bgList[0] = mContext.getDrawable(R.drawable.grid_item_bg_1);
|
||||||
|
bgList[1] = mContext.getDrawable(R.drawable.grid_item_bg_2);
|
||||||
|
bgList[2] = mContext.getDrawable(R.drawable.grid_item_bg_3);
|
||||||
|
bgList[3] = mContext.getDrawable(R.drawable.grid_item_bg_4);
|
||||||
|
bgList[4] = mContext.getDrawable(R.drawable.grid_item_bg_5);
|
||||||
|
bgList[5] = mContext.getDrawable(R.drawable.grid_item_bg_6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
if (isHome){
|
/*if (isHome){
|
||||||
return new SudGameListViewHolder(mInflater.inflate(R.layout.item_home_sud_game_list, parent, false));
|
return new SudGameListViewHolder(mInflater.inflate(R.layout.item_home_sud_game_list, parent, false));
|
||||||
}else {
|
}else {
|
||||||
return new SudGameListViewHolder(mInflater.inflate(R.layout.item_sud_game_list, parent, false));
|
return new SudGameListViewHolder(mInflater.inflate(R.layout.item_sud_game_list, parent, false));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
return new NewSudGameListViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_new_game_room, parent, false));
|
||||||
|
// return new NewSudGameListViewHolder(mInflater.inflate(R.layout.item_new_game_room, parent, false));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
SudGameListViewHolder sudGameListViewHolder = (SudGameListViewHolder) holder;
|
NewSudGameListViewHolder sudGameListViewHolder = (NewSudGameListViewHolder) holder;
|
||||||
|
sudGameListViewHolder.itemView.setBackground(bgList[position % 6]);
|
||||||
sudGameListViewHolder.setData(mList.get(position),isHome);
|
sudGameListViewHolder.setData(mList.get(position),isHome);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class CreateSudRoomModel extends BaseModel {
|
|||||||
private String mgId;
|
private String mgId;
|
||||||
@SerializedName("sud_game_icon")
|
@SerializedName("sud_game_icon")
|
||||||
private String sudGameIcon;
|
private String sudGameIcon;
|
||||||
|
private boolean isActivity;//活动游戏
|
||||||
|
|
||||||
public String getSudGameRoomId() {
|
public String getSudGameRoomId() {
|
||||||
return sudGameRoomId;
|
return sudGameRoomId;
|
||||||
@@ -161,4 +162,12 @@ public class CreateSudRoomModel extends BaseModel {
|
|||||||
this.sudGameIcon = sudGameIcon;
|
this.sudGameIcon = sudGameIcon;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setActivity(boolean isActivity) {
|
||||||
|
this.isActivity=isActivity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isActivity() {
|
||||||
|
return isActivity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,16 @@ public class CustomSidebarChildModel extends BaseModel {
|
|||||||
private String isShow;
|
private String isShow;
|
||||||
@SerializedName("sud_game_is_new")
|
@SerializedName("sud_game_is_new")
|
||||||
private String sudGameIsNew;
|
private String sudGameIsNew;
|
||||||
|
@SerializedName("is_click")
|
||||||
|
private boolean isClick;
|
||||||
|
|
||||||
|
public boolean isClick() {
|
||||||
|
return isClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClick(boolean click) {
|
||||||
|
isClick = click;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSudGameIsNew() {
|
public String getSudGameIsNew() {
|
||||||
return sudGameIsNew;
|
return sudGameIsNew;
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class SudGameActivityInfoRoomBean extends BaseModel{
|
||||||
|
@SerializedName("id")
|
||||||
|
private long id;
|
||||||
|
@SerializedName("room_holder_id")
|
||||||
|
private long roomHolderID;
|
||||||
|
@SerializedName("room_name")
|
||||||
|
private String roomName;
|
||||||
|
@SerializedName("room_holder_type")
|
||||||
|
private long roomHolderType;
|
||||||
|
@SerializedName("sud_game_id")
|
||||||
|
private long sudGameID;
|
||||||
|
@SerializedName("currency_type")
|
||||||
|
private long currencyType;
|
||||||
|
@SerializedName("golden_bean_number")
|
||||||
|
private long goldenBeanNumber;
|
||||||
|
@SerializedName("room_status")
|
||||||
|
private long roomStatus;
|
||||||
|
@SerializedName("is_activity")
|
||||||
|
private long isActivity;
|
||||||
|
@SerializedName("create_time")
|
||||||
|
private String createTime;
|
||||||
|
@SerializedName("end_time")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRoomHolderID() {
|
||||||
|
return roomHolderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomHolderID(long roomHolderID) {
|
||||||
|
this.roomHolderID = roomHolderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoomName() {
|
||||||
|
return roomName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomName(String roomName) {
|
||||||
|
this.roomName = roomName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRoomHolderType() {
|
||||||
|
return roomHolderType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomHolderType(long roomHolderType) {
|
||||||
|
this.roomHolderType = roomHolderType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSudGameID() {
|
||||||
|
return sudGameID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSudGameID(long sudGameID) {
|
||||||
|
this.sudGameID = sudGameID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCurrencyType() {
|
||||||
|
return currencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrencyType(long currencyType) {
|
||||||
|
this.currencyType = currencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getGoldenBeanNumber() {
|
||||||
|
return goldenBeanNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoldenBeanNumber(long goldenBeanNumber) {
|
||||||
|
this.goldenBeanNumber = goldenBeanNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRoomStatus() {
|
||||||
|
return roomStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomStatus(long roomStatus) {
|
||||||
|
this.roomStatus = roomStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getIsActivity() {
|
||||||
|
return isActivity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsActivity(long isActivity) {
|
||||||
|
this.isActivity = isActivity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -412,6 +412,10 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addItemDecoration(RecyclerView.ItemDecoration gridSpacingItemDecoration) {
|
||||||
|
mRecyclerView.addItemDecoration(gridSpacingItemDecoration);
|
||||||
|
}
|
||||||
|
|
||||||
public interface DataHelperNew {
|
public interface DataHelperNew {
|
||||||
void loadData(int p);
|
void loadData(int p);
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ public class MyRelativeLayout5 extends RelativeLayout {
|
|||||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||||
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||||
heightMeasureSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);
|
heightMeasureSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec+150);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
sub_loss_name.setVisibility(View.VISIBLE);
|
sub_loss_name.setVisibility(View.VISIBLE);
|
||||||
winActivityIcon.setVisibility(View.VISIBLE);
|
winActivityIcon.setVisibility(View.VISIBLE);
|
||||||
lossActivityIcon.setVisibility(View.VISIBLE);
|
lossActivityIcon.setVisibility(View.VISIBLE);
|
||||||
|
boolean isFirstMe=false;
|
||||||
if (settleBeans.size() == 2) {
|
if (settleBeans.size() == 2) {
|
||||||
sortByWinNum(settleBeans);
|
sortByWinNum(settleBeans);
|
||||||
SudSettleBean sudSettleBean1 = settleBeans.get(0); // 第一名
|
SudSettleBean sudSettleBean1 = settleBeans.get(0); // 第一名
|
||||||
@@ -118,8 +119,8 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
LogUtils.e("第一名:" + sudSettleBean1.getNick_name());
|
LogUtils.e("第一名:" + sudSettleBean1.getNick_name());
|
||||||
LogUtils.e("第二名:" + sudSettleBean2.getNick_name());
|
LogUtils.e("第二名:" + sudSettleBean2.getNick_name());
|
||||||
// 检查是否是当前用户
|
// 检查是否是当前用户
|
||||||
boolean isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
|
isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
|
||||||
boolean isDraw = sudSettleBean1.getWin_num() == sudSettleBean2.getWin_num();
|
boolean isDraw = sudSettleBean1.getRank() == sudSettleBean2.getRank();
|
||||||
boolean isZh = WordUtil.isNewZh();
|
boolean isZh = WordUtil.isNewZh();
|
||||||
String myUid = CommonAppConfig.getInstance().getUid();
|
String myUid = CommonAppConfig.getInstance().getUid();
|
||||||
LogUtils.e("isFirstMe:" + isFirstMe);
|
LogUtils.e("isFirstMe:" + isFirstMe);
|
||||||
@@ -137,15 +138,14 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
Map<String, Integer> map = showActivityGameScore();
|
Map<String, Integer> map = showActivityGameScore();
|
||||||
if (!map.isEmpty()) {
|
if (!map.isEmpty()) {
|
||||||
isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
//isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||||
isFirstMe = IMLoginManager.get(mContext).getUserInfo().getUid().equals(String.valueOf(map.get("win_uid")));
|
// isFirstMe = IMLoginManager.get(mContext).getUserInfo().getUid().equals(String.valueOf(map.get("win_uid")));
|
||||||
if (lossBean.getUid().equals(map.get("win_uid").toString())) {
|
if (lossBean.getUid().equals(map.get("win_uid").toString())) {
|
||||||
SudSettleBean tmp = lossBean;
|
SudSettleBean tmp = lossBean;
|
||||||
lossBean = winBean;
|
lossBean = winBean;
|
||||||
winBean = tmp;
|
winBean = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToastUtil.show("结算:" + isDraw + " | " + isFirstMe + "|");
|
|
||||||
} else {
|
} else {
|
||||||
sub_win_score.setText(winBean.getWin_num() > 0 ? "+" + winBean.getWin_num() : String.valueOf(winBean.getWin_num()));
|
sub_win_score.setText(winBean.getWin_num() > 0 ? "+" + winBean.getWin_num() : String.valueOf(winBean.getWin_num()));
|
||||||
sub_loss_score.setText(String.valueOf(lossBean.getWin_num()));
|
sub_loss_score.setText(String.valueOf(lossBean.getWin_num()));
|
||||||
@@ -157,6 +157,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
sub_loss_name.setText(lossBean.getNick_name());
|
sub_loss_name.setText(lossBean.getNick_name());
|
||||||
if (isDraw) {
|
if (isDraw) {
|
||||||
// 平局
|
// 平局
|
||||||
|
LogUtils.e("玩家平局",isActivityGame,showActivityGameScore(),gameSettle.activityGameInfoBean);
|
||||||
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
||||||
sub_win_hat.setVisibility(View.GONE);
|
sub_win_hat.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
@@ -182,7 +183,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
Map<String, Integer> map = showActivityGameScore();
|
Map<String, Integer> map = showActivityGameScore();
|
||||||
if (!map.isEmpty()) {
|
if (!map.isEmpty()) {
|
||||||
isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
// isDraw = map.get("win").intValue() == map.get("loss").intValue();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sub_win_score.setText(sudSettleBean1.getWin_num() > 0 ? "+" + sudSettleBean1.getWin_num() : String.valueOf(sudSettleBean1.getWin_num()));
|
sub_win_score.setText(sudSettleBean1.getWin_num() > 0 ? "+" + sudSettleBean1.getWin_num() : String.valueOf(sudSettleBean1.getWin_num()));
|
||||||
@@ -190,6 +191,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
}
|
}
|
||||||
if (isDraw) {
|
if (isDraw) {
|
||||||
// 平局
|
// 平局
|
||||||
|
LogUtils.e("观众平局",isActivityGame,showActivityGameScore(),gameSettle.activityGameInfoBean);
|
||||||
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
||||||
sub_win_hat.setVisibility(View.GONE);
|
sub_win_hat.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
@@ -207,14 +209,40 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
}
|
}
|
||||||
System.out.println("是否为活动游戏" + isActivityGame + " 成就内容:" + gameSettle.achievement);
|
System.out.println("是否为活动游戏" + isActivityGame + " 成就内容:" + gameSettle.achievement);
|
||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
//TODO 败者没显示成就
|
|
||||||
if (!StringUtil.isEmpty(gameSettle.achievement)) {
|
if (!StringUtil.isEmpty(gameSettle.achievement)) {
|
||||||
|
if(!isFirstMe){
|
||||||
|
switch (gameSettle.achievementValue) {
|
||||||
|
case 1:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_1);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_2);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_3);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_4);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_5);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_6);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
gameSettle.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
String activityGameAchievementText = WordUtil.getNewString(R.string.game_dialog_activity_achievements_title);
|
String activityGameAchievementText = WordUtil.getNewString(R.string.game_dialog_activity_achievements_title);
|
||||||
String activityGameAchievementContent = gameSettle.achievement;
|
String activityGameAchievementContent = gameSettle.achievement;
|
||||||
activityGameAchievement.setVisibility(View.VISIBLE);
|
activityGameAchievement.setVisibility(View.VISIBLE);
|
||||||
SpannableString ss = new SpannableString(activityGameAchievementText + activityGameAchievementContent);
|
SpannableString ss = new SpannableString(activityGameAchievementText + activityGameAchievementContent);
|
||||||
ss.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBA6A")), activityGameAchievementText.length(), ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
ss.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBA6A")), activityGameAchievementText.length(), ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
activityGameAchievement.setText(ss);
|
activityGameAchievement.setText(ss);
|
||||||
|
}else{
|
||||||
|
activityGameAchievement.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (sub_loss_score.getVisibility() == View.VISIBLE) {
|
if (sub_loss_score.getVisibility() == View.VISIBLE) {
|
||||||
lossActivityIcon.setVisibility(View.VISIBLE);
|
lossActivityIcon.setVisibility(View.VISIBLE);
|
||||||
@@ -294,14 +322,17 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.sort(list, (bean1, bean2) -> {
|
Collections.sort(list, (bean1, bean2) -> {
|
||||||
return Integer.compare(bean2.getWin_num(), bean1.getWin_num()); // 从大到小排序
|
//return Integer.compare(bean2.getWin_num(), bean1.getWin_num()); // 从大到小排序
|
||||||
|
return bean1.getRank()-bean2.getRank(); // 从大到小排序
|
||||||
});
|
});
|
||||||
LogUtils.e("排序后=====>" + settleBeans);
|
LogUtils.e("排序后=====>" + settleBeans);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void destroyDialog() {
|
private void destroyDialog() {
|
||||||
dismiss();
|
dismiss();
|
||||||
|
if(countDownTimer!=null) {
|
||||||
countDownTimer.cancel();
|
countDownTimer.cancel();
|
||||||
|
}
|
||||||
countDownTimer = null;
|
countDownTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.yunbao.common.event;
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
||||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||||
|
import com.yunbao.common.utils.DebugUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -59,6 +61,10 @@ public class CheckRemainingBalanceEvent extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SudMGPMGState.MGCommonGameSettle getMgCommonGameSettle(List<SudActivityGameInfoBean> data) {
|
public SudMGPMGState.MGCommonGameSettle getMgCommonGameSettle(List<SudActivityGameInfoBean> data) {
|
||||||
|
if(data==null) {
|
||||||
|
LogUtils.e("数据为空");
|
||||||
|
DebugUtils.showStackTrace();
|
||||||
|
}
|
||||||
mgCommonGameSettle.activityGameInfoBean = data;
|
mgCommonGameSettle.activityGameInfoBean = data;
|
||||||
return mgCommonGameSettle;
|
return mgCommonGameSettle;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ import com.yunbao.common.bean.CreateSudRoomModel;
|
|||||||
|
|
||||||
public class LiveOpenSudRoomEvent extends BaseModel {
|
public class LiveOpenSudRoomEvent extends BaseModel {
|
||||||
private CreateSudRoomModel createSudRoomModel = null;
|
private CreateSudRoomModel createSudRoomModel = null;
|
||||||
|
private boolean isActivity;
|
||||||
|
|
||||||
public CreateSudRoomModel getCreateSudRoomModel() {
|
public CreateSudRoomModel getCreateSudRoomModel() {
|
||||||
|
createSudRoomModel.setActivity(isActivity);
|
||||||
return createSudRoomModel;
|
return createSudRoomModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,4 +16,9 @@ public class LiveOpenSudRoomEvent extends BaseModel {
|
|||||||
this.createSudRoomModel = createSudRoomModel;
|
this.createSudRoomModel = createSudRoomModel;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LiveOpenSudRoomEvent setActivity(boolean activity) {
|
||||||
|
isActivity = activity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.common.event;
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.utils.DebugUtils;
|
import com.yunbao.common.utils.DebugUtils;
|
||||||
|
|
||||||
@@ -31,6 +32,8 @@ public class LiveSudGamePopupShowOrHideEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public LiveSudGamePopupShowOrHideEvent setType(int type) {
|
public LiveSudGamePopupShowOrHideEvent setType(int type) {
|
||||||
|
LogUtils.e("调用游戏显示",isActivityGame);
|
||||||
|
DebugUtils.showStackTrace();
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class API extends BaseApi {
|
|||||||
.addInterceptor(initQuery(isNeedUid, isNeedToken, CommonAppContext.sInstance.getApplicationContext()))
|
.addInterceptor(initQuery(isNeedUid, isNeedToken, CommonAppContext.sInstance.getApplicationContext()))
|
||||||
.addInterceptor(loggingInterceptor);
|
.addInterceptor(loggingInterceptor);
|
||||||
return create(builder.build(),
|
return create(builder.build(),
|
||||||
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
JavaConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//公共参数
|
//公共参数
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ public class CommonHttpConsts {
|
|||||||
public static final String DOWNLOAD_GIF = "downloadGif";
|
public static final String DOWNLOAD_GIF = "downloadGif";
|
||||||
public static final String GET_BALANCE = "getBalance";
|
public static final String GET_BALANCE = "getBalance";
|
||||||
public static final String CHECK_TOKEN_INVALID = "checkTokenInvalid";
|
public static final String CHECK_TOKEN_INVALID = "checkTokenInvalid";
|
||||||
public static final String NOTIFY_GOOGLE = "Charge.google_pay";
|
public static final String NOTIFY_GOOGLE = "gugezhifuhuidiao";
|
||||||
public static final String COMMUNITY_SETREPORT = "Community.setReport";
|
public static final String COMMUNITY_SETREPORT = "yonghushequdongtaijubao";
|
||||||
|
|
||||||
public static final String GET_USER_HOME = "getUserHome";
|
public static final String GET_USER_HOME = "getUserHome";
|
||||||
public static final String GET_USER_BASEINFO = "getUserBaseinfo";
|
public static final String GET_USER_BASEINFO = "getUserBaseinfo";
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class CommonHttpUtil {
|
|||||||
}
|
}
|
||||||
Log.i("来了", lang);
|
Log.i("来了", lang);
|
||||||
//或者仅仅使用 locale = Locale.getDefault(); 不需要考虑接口 deprecated(弃用)问题
|
//或者仅仅使用 locale = Locale.getDefault(); 不需要考虑接口 deprecated(弃用)问题
|
||||||
HttpClient.getInstance().get("Home.getConfig", CommonHttpConsts.GET_CONFIG).params("langue", lang).params("version", "" + VersionUtil.getVersion()).params("from", "android").params("appType", "1").execute(new HttpCallback() {
|
HttpClient.getInstance().get("huoquzhuyepeizhixinxi", CommonHttpConsts.GET_CONFIG).params("langue", lang).params("version", "" + VersionUtil.getVersion()).params("from", "android").params("appType", "1").execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
@@ -305,7 +305,7 @@ public class CommonHttpUtil {
|
|||||||
ToastUtil.show(WordUtil.getString(R.string.cannot_follow_self));
|
ToastUtil.show(WordUtil.getString(R.string.cannot_follow_self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpClient.getInstance().get("User.setAttents", tag).params("touid", touid).execute(new HttpCallback() {
|
HttpClient.getInstance().get("caozuoguanzhuzhuangtaiv2", tag).params("touid", touid).execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0 || code == 1001) {
|
if (code == 0 && info.length > 0 || code == 1001) {
|
||||||
@@ -340,7 +340,7 @@ public class CommonHttpUtil {
|
|||||||
} else {
|
} else {
|
||||||
isGoogle = "-1";
|
isGoogle = "-1";
|
||||||
}
|
}
|
||||||
HttpClient.getInstance().get("User.getBalance", CommonHttpConsts.GET_BALANCE).params("type", 0).params("isGooglePay", isGoogle).execute(callback);
|
HttpClient.getInstance().get("huoquwodezuanshi", CommonHttpConsts.GET_BALANCE).params("type", 0).params("isGooglePay", isGoogle).execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -389,7 +389,7 @@ public class CommonHttpUtil {
|
|||||||
* 检查token是否失效
|
* 检查token是否失效
|
||||||
*/
|
*/
|
||||||
public static void checkTokenInvalid() {
|
public static void checkTokenInvalid() {
|
||||||
HttpClient.getInstance().get("User.ifToken", CommonHttpConsts.CHECK_TOKEN_INVALID).execute(NO_CALLBACK);
|
HttpClient.getInstance().get("shezhijiaoyouzhaopianzhuangtai", CommonHttpConsts.CHECK_TOKEN_INVALID).execute(NO_CALLBACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -397,19 +397,19 @@ public class CommonHttpUtil {
|
|||||||
* 谷歌支付成功后,通知自己服务器
|
* 谷歌支付成功后,通知自己服务器
|
||||||
*/
|
*/
|
||||||
public static void notifyMeGoogle(String purchaseToken, String productId, String orderno, HttpCallback callback) {
|
public static void notifyMeGoogle(String purchaseToken, String productId, String orderno, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("productId", productId).params("orderno", orderno).params("package_name", "com.pdlive.shayu").execute(callback);
|
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("productId", productId).params("orderno", orderno).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void notifyGoogle(String purchaseToken, String orderNo, String tradeNo, String allData, String gps_adid, HttpCallback callback) {
|
public static void notifyGoogle(String purchaseToken, String orderNo, String tradeNo, String allData, String gps_adid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("allData", allData).params("gps_adid", gps_adid).params("package_name", "com.pdlive.shayu").execute(callback);
|
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("allData", allData).params("gps_adid", gps_adid).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Google_sec_pay(String purchaseToken, String orderNo, String tradeNo, HttpCallback callback) {
|
public static void Google_sec_pay(String purchaseToken, String orderNo, String tradeNo, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Charge.Google_sec_pay", "Charge.Google_sec_pay").params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("package_name", "com.pdlive.shayu").execute(callback);
|
HttpClient.getInstance().get("gugedingdanyanzheng", "gugedingdanyanzheng").params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("package_name", AppManager.getInstance().getMainActivity().getPackageName()).execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void notifySamsung(String purchaseId, String selfOrderId,HttpCallback callback) {
|
public static void notifySamsung(String purchaseId, String selfOrderId,HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Charge.SamsungNotify", "Charge.SamsungNotify")
|
HttpClient.getInstance().get("sanxingzhifuhuidiao", "sanxingzhifuhuidiao")
|
||||||
.params("purchaseID", purchaseId)
|
.params("purchaseID", purchaseId)
|
||||||
.params("SelfOrderId", selfOrderId)
|
.params("SelfOrderId", selfOrderId)
|
||||||
.params("PackageName", "pd")
|
.params("PackageName", "pd")
|
||||||
@@ -450,13 +450,13 @@ public class CommonHttpUtil {
|
|||||||
* 用户个人主页信息
|
* 用户个人主页信息
|
||||||
*/
|
*/
|
||||||
public static void getUserBaseinfo(String touid, HttpCallback callback) {
|
public static void getUserBaseinfo(String touid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getUserBaseinfo", CommonHttpConsts.GET_USER_BASEINFO).params("touid", touid).execute(callback);
|
HttpClient.getInstance().get("huoquyonghujichuxinxi", CommonHttpConsts.GET_USER_BASEINFO).params("touid", touid).execute(callback);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 上传文件 获取七牛云token的接口
|
* 上传文件 获取七牛云token的接口
|
||||||
*/
|
*/
|
||||||
public static void getUploadQiNiuToken(HttpCallback callback, boolean isImg) {
|
public static void getUploadQiNiuToken(HttpCallback callback, boolean isImg) {
|
||||||
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken2", "Pdluserhome.getQiNiuToken2")
|
HttpClient.getInstance().get("huoquqiniushangchuanlingpaiv2", "huoquqiniushangchuanlingpaiv2")
|
||||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||||
.params("token", CommonAppConfig.getInstance().getToken())
|
.params("token", CommonAppConfig.getInstance().getToken())
|
||||||
.params("ext", isImg ? ".jpeg" : ".mp4")
|
.params("ext", isImg ? ".jpeg" : ".mp4")
|
||||||
@@ -469,7 +469,7 @@ public class CommonHttpUtil {
|
|||||||
if(StringUtil.isEmpty(uid)){
|
if(StringUtil.isEmpty(uid)){
|
||||||
uid="NotLogin_"+ DeviceUtils.getUniqueDeviceId();
|
uid="NotLogin_"+ DeviceUtils.getUniqueDeviceId();
|
||||||
}
|
}
|
||||||
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken3", "Pdluserhome.getQiNiuToken3")
|
HttpClient.getInstance().get("huoquqiniushangchuanlingpaiv3", "huoquqiniushangchuanlingpaiv3")
|
||||||
.params("uid",uid)
|
.params("uid",uid)
|
||||||
.params("token", CommonAppConfig.getInstance().getToken())
|
.params("token", CommonAppConfig.getInstance().getToken())
|
||||||
.params("file_name", fileName)
|
.params("file_name", fileName)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
|||||||
public void onSuccess(Response<JsonBean> response) {
|
public void onSuccess(Response<JsonBean> response) {
|
||||||
JsonBean bean = response.body();
|
JsonBean bean = response.body();
|
||||||
String gson = new Gson().toJson(bean);
|
String gson = new Gson().toJson(bean);
|
||||||
|
L.e("gson:" + gson);
|
||||||
if (bean != null) {
|
if (bean != null) {
|
||||||
if (200 == bean.getRet()) {
|
if (200 == bean.getRet()) {
|
||||||
Data data = bean.getData();
|
Data data = bean.getData();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class HttpClient {
|
|||||||
private String mUrl;
|
private String mUrl;
|
||||||
|
|
||||||
private HttpClient() {
|
private HttpClient() {
|
||||||
mUrl = CommonAppConfig.HOST + "/api/public/?service=";
|
mUrl = CommonAppConfig.HOST + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HttpClient getInstance() {
|
public static HttpClient getInstance() {
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.yunbao.common.http;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.yunbao.common.utils.AesUtils;
|
||||||
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.annotation.Annotation;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.Base64;
|
||||||
|
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
import okhttp3.ResponseBody;
|
||||||
|
import retrofit2.Converter;
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
|
||||||
|
public final class JavaConverterFactory extends Converter.Factory {
|
||||||
|
/**
|
||||||
|
* Create an instance using a default {@link Gson} instance for conversion. Encoding to JSON and
|
||||||
|
* decoding from JSON (when no charset is specified by a header) will use UTF-8.
|
||||||
|
*/
|
||||||
|
public static JavaConverterFactory create() {
|
||||||
|
return create(new Gson());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance using {@code gson} for conversion. Encoding to JSON and
|
||||||
|
* decoding from JSON (when no charset is specified by a header) will use UTF-8.
|
||||||
|
*/
|
||||||
|
public static JavaConverterFactory create(Gson gson) {
|
||||||
|
return new JavaConverterFactory(gson);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Gson gson;
|
||||||
|
|
||||||
|
private JavaConverterFactory(Gson gson) {
|
||||||
|
if (gson == null) throw new NullPointerException("gson == null");
|
||||||
|
this.gson = gson;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) {
|
||||||
|
TypeAdapter<?> adapter = gson.getAdapter(TypeToken.get(type));
|
||||||
|
return new JsonResponseBodyConverter<>(gson, adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) {
|
||||||
|
return super.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit);
|
||||||
|
}
|
||||||
|
|
||||||
|
final class JsonResponseBodyConverter<T> implements Converter<ResponseBody, T> {
|
||||||
|
private final Gson gson;
|
||||||
|
private final TypeAdapter<T> adapter;
|
||||||
|
|
||||||
|
JsonResponseBodyConverter(Gson gson, TypeAdapter<T> adapter) {
|
||||||
|
this.gson = gson;
|
||||||
|
this.adapter = adapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T convert(ResponseBody value) throws IOException {
|
||||||
|
String response = value.string();
|
||||||
|
String allResponseData;
|
||||||
|
L.e("解密前::" + response);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
|
allResponseData = jsonObject.getString("data");
|
||||||
|
if (allResponseData.indexOf(":") <= 0) {
|
||||||
|
byte[] decodedData = null;
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||||
|
decodedData = Base64.getDecoder().decode(allResponseData);
|
||||||
|
}
|
||||||
|
response = AesUtils.decryptToString(decodedData);
|
||||||
|
jsonObject.put("data", JSONObject.parseObject(response));
|
||||||
|
|
||||||
|
response = JSON.toJSONString(jsonObject);
|
||||||
|
L.e("解密后::" + response);
|
||||||
|
//获取加密数据,解密,之后再让adapter去处理json串,解析具体的数据就可以了
|
||||||
|
try {
|
||||||
|
return adapter.fromJson(response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
value.close();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return adapter.fromJson(response);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,18 @@
|
|||||||
package com.yunbao.common.http;
|
package com.yunbao.common.http;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONException;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.blankj.utilcode.util.GsonUtils;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.yunbao.common.bean.AdBean;
|
||||||
|
import com.yunbao.common.utils.AesUtils;
|
||||||
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/5.
|
* Created by cxf on 2017/8/5.
|
||||||
*/
|
*/
|
||||||
@@ -7,7 +20,7 @@ package com.yunbao.common.http;
|
|||||||
public class JsonBean {
|
public class JsonBean {
|
||||||
private int ret;
|
private int ret;
|
||||||
private String msg;
|
private String msg;
|
||||||
private Data data;
|
private String data;
|
||||||
|
|
||||||
public int getRet() {
|
public int getRet() {
|
||||||
return ret;
|
return ret;
|
||||||
@@ -26,10 +39,47 @@ public class JsonBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Data getData() {
|
public Data getData() {
|
||||||
return data;
|
L.e("data:" + data);
|
||||||
|
if (data.indexOf(":") > 0) {
|
||||||
|
L.e("未加密::" + data);
|
||||||
|
return JSON.parseObject(data, Data.class);
|
||||||
|
//return GsonUtils.fromJson(data, Data.class);
|
||||||
|
} else {
|
||||||
|
Data resultData = new Data();
|
||||||
|
byte[] decodedData = null;
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||||
|
decodedData = Base64.getDecoder().decode(data);
|
||||||
|
}
|
||||||
|
String decryptedText = AesUtils.decryptToString(decodedData);
|
||||||
|
L.e("解码前:" + data);
|
||||||
|
L.e("解码前-转成base64:" + decodedData);
|
||||||
|
L.e("解码前-解密後:" + decryptedText);
|
||||||
|
JSONObject object = JSON.parseObject(decryptedText);
|
||||||
|
try {
|
||||||
|
JSONArray jsonArray = object.getJSONArray("info");
|
||||||
|
String[] array = new String[jsonArray.size()];
|
||||||
|
for (int i = 0; i < array.length; i++) {
|
||||||
|
array[i] = jsonArray.getString(i);
|
||||||
|
}
|
||||||
|
resultData.setInfo(array);
|
||||||
|
resultData.setCode(object.getInteger("code"));
|
||||||
|
resultData.setMsg(object.getString("msg"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
String[] array = new String[1];
|
||||||
|
array[0] = object.getString("info");
|
||||||
|
resultData.setInfo(array);
|
||||||
|
resultData.setCode(object.getInteger("code"));
|
||||||
|
resultData.setMsg(object.getString("msg"));
|
||||||
|
} catch (JSONException ex) {
|
||||||
|
L.e("字符串格式错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(Data data) {
|
public void setData(String data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取当前直播间的用户列表
|
* 获取当前直播间的用户列表
|
||||||
*/
|
*/
|
||||||
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
|
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getUserLists", LiveHttpConsts.GET_USER_LIST)
|
HttpClient.getInstance().get("zhibojianyonghuliebiao", LiveHttpConsts.GET_USER_LIST)
|
||||||
.params("liveuid", liveuid)
|
.params("liveuid", liveuid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
@@ -51,7 +51,7 @@ public class LiveHttpUtil {
|
|||||||
* @param callback 回调
|
* @param callback 回调
|
||||||
*/
|
*/
|
||||||
public static void getUserRankList(String liveUid, HttpCallback callback) {
|
public static void getUserRankList(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Contribute.index", LiveHttpConsts.GET_USER_LIST)
|
HttpClient.getInstance().get("xiaofeitongji", LiveHttpConsts.GET_USER_LIST)
|
||||||
.params("uid", liveUid)
|
.params("uid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取当前直播间的连麦用户列表
|
* 获取当前直播间的连麦用户列表
|
||||||
*/
|
*/
|
||||||
public static void getMicList(String liveuid, int p, HttpCallback callback) {
|
public static void getMicList(String liveuid, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getDrLm", "Live.getDrLm")
|
HttpClient.getInstance().get("huoqulianmaizhuangtai", "huoqulianmaizhuangtai")
|
||||||
.params("uid", liveuid, true)
|
.params("uid", liveuid, true)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取活动列表
|
* 获取活动列表
|
||||||
*/
|
*/
|
||||||
public static void getHDList(HttpCallback callback) {
|
public static void getHDList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Active.getActiveList", "Active.getActiveList")
|
HttpClient.getInstance().get("huoquhuodongliebiao", "huoquhuodongliebiao")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ public class LiveHttpUtil {
|
|||||||
* @param stream 主播的stream
|
* @param stream 主播的stream
|
||||||
*/
|
*/
|
||||||
public static void roomCharge(String liveUid, String stream, HttpCallback callback) {
|
public static void roomCharge(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.roomCharge", LiveHttpConsts.ROOM_CHARGE)
|
HttpClient.getInstance().get("fangjiankoufei", LiveHttpConsts.ROOM_CHARGE)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -94,7 +94,7 @@ public class LiveHttpUtil {
|
|||||||
* @param stream 主播的stream
|
* @param stream 主播的stream
|
||||||
*/
|
*/
|
||||||
public static void timeCharge(String liveUid, String stream, HttpCallback callback) {
|
public static void timeCharge(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.timeCharge", LiveHttpConsts.TIME_CHARGE)
|
HttpClient.getInstance().get("fangjianjishikoufei", LiveHttpConsts.TIME_CHARGE)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -105,7 +105,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取用户余额
|
* 获取用户余额
|
||||||
*/
|
*/
|
||||||
public static void getCoin(HttpCallback callback) {
|
public static void getCoin(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getCoin", LiveHttpConsts.GET_COIN)
|
HttpClient.getInstance().get("zhibojianhuoquyonghuyue", LiveHttpConsts.GET_COIN)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ public class LiveHttpUtil {
|
|||||||
* @param touid 对方的uid
|
* @param touid 对方的uid
|
||||||
*/
|
*/
|
||||||
public static void getLiveRecord(String touid, int p, HttpCallback callback) {
|
public static void getLiveRecord(String touid, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getLiverecord", LiveHttpConsts.GET_LIVE_RECORD)
|
HttpClient.getInstance().get("huoquzhibojilu", LiveHttpConsts.GET_LIVE_RECORD)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -127,7 +127,7 @@ public class LiveHttpUtil {
|
|||||||
* @param recordId 视频的id
|
* @param recordId 视频的id
|
||||||
*/
|
*/
|
||||||
public static void getAliCdnRecord(String recordId, HttpCallback callback) {
|
public static void getAliCdnRecord(String recordId, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getAliCdnRecord", LiveHttpConsts.GET_ALI_CDN_RECORD)
|
HttpClient.getInstance().get("huoqulubojilu", LiveHttpConsts.GET_ALI_CDN_RECORD)
|
||||||
.params("id", recordId)
|
.params("id", recordId)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -137,7 +137,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取主播印象列表
|
* 获取主播印象列表
|
||||||
*/
|
*/
|
||||||
public static void getAllImpress(String touid, HttpCallback callback) {
|
public static void getAllImpress(String touid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getUserLabel", LiveHttpConsts.GET_ALL_IMPRESS)
|
HttpClient.getInstance().get("huoquyonghuyingxiangbiaoqian", LiveHttpConsts.GET_ALL_IMPRESS)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ public class LiveHttpUtil {
|
|||||||
* 给主播设置印象
|
* 给主播设置印象
|
||||||
*/
|
*/
|
||||||
public static void setImpress(String touid, String ImpressIDs, HttpCallback callback) {
|
public static void setImpress(String touid, String ImpressIDs, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.setUserLabel", LiveHttpConsts.SET_IMPRESS)
|
HttpClient.getInstance().get("shezhiyonghuyingxiangbiaoqian", LiveHttpConsts.SET_IMPRESS)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("labels", ImpressIDs)
|
.params("labels", ImpressIDs)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -157,7 +157,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取当前直播间的管理员列表
|
* 获取当前直播间的管理员列表
|
||||||
*/
|
*/
|
||||||
public static void getAdminList(String liveUid, HttpCallback callback) {
|
public static void getAdminList(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getAdminList", LiveHttpConsts.GET_ADMIN_LIST)
|
HttpClient.getInstance().get("huoquguanliyuanliebiao", LiveHttpConsts.GET_ADMIN_LIST)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播设置或取消直播间的管理员
|
* 主播设置或取消直播间的管理员
|
||||||
*/
|
*/
|
||||||
public static void setAdmin(String liveUid, String touid, HttpCallback callback) {
|
public static void setAdmin(String liveUid, String touid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.setAdmin", LiveHttpConsts.SET_ADMIN)
|
HttpClient.getInstance().get("shezhiguanliyuanzhuangtai", LiveHttpConsts.SET_ADMIN)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -176,7 +176,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取直播间的禁言列表
|
* 获取直播间的禁言列表
|
||||||
*/
|
*/
|
||||||
public static void getLiveShutUpList(String liveUid, int p, HttpCallback callback) {
|
public static void getLiveShutUpList(String liveUid, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livemanage.getShutList", LiveHttpConsts.GET_LIVE_SHUT_UP_LIST)
|
HttpClient.getInstance().get("jinyanyonghu", LiveHttpConsts.GET_LIVE_SHUT_UP_LIST)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -186,7 +186,7 @@ public class LiveHttpUtil {
|
|||||||
* 直播间解除禁言
|
* 直播间解除禁言
|
||||||
*/
|
*/
|
||||||
public static void liveCancelShutUp(String liveUid, String toUid, HttpCallback callback) {
|
public static void liveCancelShutUp(String liveUid, String toUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livemanage.cancelShut", LiveHttpConsts.LIVE_CANCEL_SHUT_UP)
|
HttpClient.getInstance().get("jiechujinyan", LiveHttpConsts.LIVE_CANCEL_SHUT_UP)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("touid", toUid)
|
.params("touid", toUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -196,7 +196,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取直播间的拉黑列表
|
* 获取直播间的拉黑列表
|
||||||
*/
|
*/
|
||||||
public static void getLiveBlackList(String liveUid, int p, HttpCallback callback) {
|
public static void getLiveBlackList(String liveUid, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livemanage.getKickList", LiveHttpConsts.GET_LIVE_BLACK_LIST)
|
HttpClient.getInstance().get("tichuyonghu", LiveHttpConsts.GET_LIVE_BLACK_LIST)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -206,7 +206,7 @@ public class LiveHttpUtil {
|
|||||||
* 直播间解除拉黑
|
* 直播间解除拉黑
|
||||||
*/
|
*/
|
||||||
public static void liveCancelBlack(String liveUid, String toUid, HttpCallback callback) {
|
public static void liveCancelBlack(String liveUid, String toUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livemanage.cancelKick", LiveHttpConsts.LIVE_CANCEL_BLACK)
|
HttpClient.getInstance().get("jiechutichu", LiveHttpConsts.LIVE_CANCEL_BLACK)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("touid", toUid)
|
.params("touid", toUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -217,7 +217,7 @@ public class LiveHttpUtil {
|
|||||||
* 直播结束后,获取直播收益,观看人数,时长等信息
|
* 直播结束后,获取直播收益,观看人数,时长等信息
|
||||||
*/
|
*/
|
||||||
public static void getLiveEndInfo(String stream, HttpCallback callback) {
|
public static void getLiveEndInfo(String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.stopInfo", LiveHttpConsts.GET_LIVE_END_INFO)
|
HttpClient.getInstance().get("zhibojieshuxinxi", LiveHttpConsts.GET_LIVE_END_INFO)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取直播间举报内容列表
|
* 获取直播间举报内容列表
|
||||||
*/
|
*/
|
||||||
public static void getLiveReportList(HttpCallback callback) {
|
public static void getLiveReportList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getReportClass", LiveHttpConsts.GET_LIVE_REPORT_LIST)
|
HttpClient.getInstance().get("huoqujubaopeizhixinxi", LiveHttpConsts.GET_LIVE_REPORT_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ public class LiveHttpUtil {
|
|||||||
* 举报用户
|
* 举报用户
|
||||||
*/
|
*/
|
||||||
public static void setReport(String touid, String content, HttpCallback callback) {
|
public static void setReport(String touid, String content, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.setReport", LiveHttpConsts.SET_REPORT)
|
HttpClient.getInstance().get("yonghujubao", LiveHttpConsts.SET_REPORT)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("content", content)
|
.params("content", content)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -244,7 +244,7 @@ public class LiveHttpUtil {
|
|||||||
* 举报用户 + 图片
|
* 举报用户 + 图片
|
||||||
*/
|
*/
|
||||||
public static void setReport(String touid,String report_argument, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) {
|
public static void setReport(String touid,String report_argument, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) {
|
||||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.setReport", LiveHttpConsts.SET_REPORT)
|
PostRequest<JsonBean> request = HttpClient.getInstance().post("yonghujubao", LiveHttpConsts.SET_REPORT)
|
||||||
.isMultipart(true)
|
.isMultipart(true)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("report_argument", report_argument)
|
.params("report_argument", report_argument)
|
||||||
@@ -268,7 +268,7 @@ public class LiveHttpUtil {
|
|||||||
* 直播间点击聊天列表和头像出现的弹窗
|
* 直播间点击聊天列表和头像出现的弹窗
|
||||||
*/
|
*/
|
||||||
public static void getLiveUser(String touid, String liveUid, HttpCallback callback) {
|
public static void getLiveUser(String touid, String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getPop", LiveHttpConsts.GET_LIVE_USER)
|
HttpClient.getInstance().get("zhibojiantanchuangxinxi", LiveHttpConsts.GET_LIVE_USER)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -278,7 +278,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播或管理员踢人
|
* 主播或管理员踢人
|
||||||
*/
|
*/
|
||||||
public static void kicking(String liveUid, String touid, HttpCallback callback) {
|
public static void kicking(String liveUid, String touid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.kicking", LiveHttpConsts.KICKING)
|
HttpClient.getInstance().get("zhibojiantiren", LiveHttpConsts.KICKING)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -294,7 +294,7 @@ public class LiveHttpUtil {
|
|||||||
* @param time 禁言时间 (分)
|
* @param time 禁言时间 (分)
|
||||||
*/
|
*/
|
||||||
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
|
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
|
||||||
GetRequest<JsonBean> request = HttpClient.getInstance().get("Live.setShutUp", LiveHttpConsts.SET_SHUT_UP)
|
GetRequest<JsonBean> request = HttpClient.getInstance().get("zhibojianjinyan", LiveHttpConsts.SET_SHUT_UP)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
@@ -312,7 +312,7 @@ public class LiveHttpUtil {
|
|||||||
* @param type 0表示关闭当前直播 1表示禁播,2表示封禁账号
|
* @param type 0表示关闭当前直播 1表示禁播,2表示封禁账号
|
||||||
*/
|
*/
|
||||||
public static void superCloseRoom(String liveUid, int type, HttpCallback callback) {
|
public static void superCloseRoom(String liveUid, int type, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.superStopRoom", LiveHttpConsts.SUPER_CLOSE_ROOM)
|
HttpClient.getInstance().get("chaoguanguanbo", LiveHttpConsts.SUPER_CLOSE_ROOM)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -323,7 +323,7 @@ public class LiveHttpUtil {
|
|||||||
* 守护商品类型列表
|
* 守护商品类型列表
|
||||||
*/
|
*/
|
||||||
public static void getGuardBuyList(HttpCallback callback) {
|
public static void getGuardBuyList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Guard.getList", LiveHttpConsts.GET_GUARD_BUY_LIST)
|
HttpClient.getInstance().get("shouhuliebiaov2", LiveHttpConsts.GET_GUARD_BUY_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ public class LiveHttpUtil {
|
|||||||
* 购买守护接口
|
* 购买守护接口
|
||||||
*/
|
*/
|
||||||
public static void buyGuard(String liveUid, String stream, int guardId, int cid, HttpCallback callback) {
|
public static void buyGuard(String liveUid, String stream, int guardId, int cid, HttpCallback callback) {
|
||||||
GetRequest<JsonBean> request = HttpClient.getInstance().get("Guard.buyGuard", LiveHttpConsts.BUY_GUARD)
|
GetRequest<JsonBean> request = HttpClient.getInstance().get("goumaishouhu", LiveHttpConsts.BUY_GUARD)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("guardid", guardId);
|
.params("guardid", guardId);
|
||||||
@@ -347,13 +347,13 @@ public class LiveHttpUtil {
|
|||||||
* 查看主播的守护列表
|
* 查看主播的守护列表
|
||||||
*/
|
*/
|
||||||
public static void getGuardList(String liveUid, int p, HttpCallback callback) {
|
public static void getGuardList(String liveUid, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Guard.getGuardList", LiveHttpConsts.GET_GUARD_LIST)
|
HttpClient.getInstance().get("shouhuliebiao", LiveHttpConsts.GET_GUARD_LIST)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
public static void getContactMsg(int page, HttpCallback callback) {
|
public static void getContactMsg(int page, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getContactMsg", "getContactMsg")
|
HttpClient.getInstance().get("huoqulianxifangshixiaoxi", "huoqulianxifangshixiaoxi")
|
||||||
.params("p", page)
|
.params("p", page)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ public class LiveHttpUtil {
|
|||||||
* 观众跟主播连麦时,获取自己的流地址
|
* 观众跟主播连麦时,获取自己的流地址
|
||||||
*/
|
*/
|
||||||
public static void getLinkMicStream(HttpCallback callback) {
|
public static void getLinkMicStream(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Linkmic.requestLVBAddrForLinkMic", LiveHttpConsts.GET_LINK_MIC_STREAM)
|
HttpClient.getInstance().get("lianmaituilaliudizhi", LiveHttpConsts.GET_LINK_MIC_STREAM)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ public class LiveHttpUtil {
|
|||||||
* @param pull_url 连麦用户播流地址
|
* @param pull_url 连麦用户播流地址
|
||||||
*/
|
*/
|
||||||
public static void linkMicShowVideo(String touid, String pull_url) {
|
public static void linkMicShowVideo(String touid, String pull_url) {
|
||||||
HttpClient.getInstance().get("Live.showVideo", LiveHttpConsts.LINK_MIC_SHOW_VIDEO)
|
HttpClient.getInstance().get("lianmaixinxi", LiveHttpConsts.LINK_MIC_SHOW_VIDEO)
|
||||||
.params("liveuid", CommonAppConfig.getInstance().getUid())
|
.params("liveuid", CommonAppConfig.getInstance().getUid())
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("pull_url", pull_url)
|
.params("pull_url", pull_url)
|
||||||
@@ -389,7 +389,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播设置是否允许观众发起连麦
|
* 主播设置是否允许观众发起连麦
|
||||||
*/
|
*/
|
||||||
public static void setLinkMicEnable(boolean linkMicEnable, HttpCallback callback) {
|
public static void setLinkMicEnable(boolean linkMicEnable, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Linkmic.setMic", LiveHttpConsts.SET_LINK_MIC_ENABLE)
|
HttpClient.getInstance().get("shezhilianmaikaiguan", LiveHttpConsts.SET_LINK_MIC_ENABLE)
|
||||||
.params("ismic", linkMicEnable ? 1 : 0)
|
.params("ismic", linkMicEnable ? 1 : 0)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -399,7 +399,7 @@ public class LiveHttpUtil {
|
|||||||
* 观众检查主播是否允许连麦
|
* 观众检查主播是否允许连麦
|
||||||
*/
|
*/
|
||||||
public static void checkLinkMicEnable(String liveUid, HttpCallback callback) {
|
public static void checkLinkMicEnable(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Linkmic.isMic", LiveHttpConsts.CHECK_LINK_MIC_ENABLE)
|
HttpClient.getInstance().get("panduanzhubaoshifoukaiqilianmai", LiveHttpConsts.CHECK_LINK_MIC_ENABLE)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -408,7 +408,7 @@ public class LiveHttpUtil {
|
|||||||
* 连麦pk检查对方主播在线状态
|
* 连麦pk检查对方主播在线状态
|
||||||
*/
|
*/
|
||||||
public static void livePkCheckLive(String liveUid, String stream, String uidStream, HttpCallback callback) {
|
public static void livePkCheckLive(String liveUid, String stream, String uidStream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Home.getisPk", "Home.getisPk")
|
HttpClient.getInstance().get("huoqupkzhuangtai", "huoqupkzhuangtai")
|
||||||
.params("uid", liveUid, true)
|
.params("uid", liveUid, true)
|
||||||
// .params("token", CommonAppConfig.getInstance().getToken())
|
// .params("token", CommonAppConfig.getInstance().getToken())
|
||||||
// .params("liveuid", liveUid)
|
// .params("liveuid", liveUid)
|
||||||
@@ -473,7 +473,7 @@ public class LiveHttpUtil {
|
|||||||
* 发送弹幕
|
* 发送弹幕
|
||||||
*/
|
*/
|
||||||
public static void sendDanmu(String content, String liveUid, String stream, HttpCallback callback) {
|
public static void sendDanmu(String content, String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.sendBarrage", LiveHttpConsts.SEND_DANMU)
|
HttpClient.getInstance().get("fasongdanmu", LiveHttpConsts.SEND_DANMU)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("giftid", "1")
|
.params("giftid", "1")
|
||||||
@@ -489,7 +489,7 @@ public class LiveHttpUtil {
|
|||||||
* @param stream 主播的stream
|
* @param stream 主播的stream
|
||||||
*/
|
*/
|
||||||
public static void checkLive(String liveUid, String stream, HttpCallback callback) {
|
public static void checkLive(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.checkLive", LiveHttpConsts.CHECK_LIVE)
|
HttpClient.getInstance().get("jianchazhibo", LiveHttpConsts.CHECK_LIVE)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -500,33 +500,13 @@ public class LiveHttpUtil {
|
|||||||
* 观众进入直播间
|
* 观众进入直播间
|
||||||
*/
|
*/
|
||||||
public static void enterRoom(String liveUid, String stream, HttpCallback callback) {
|
public static void enterRoom(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.enterRoom", LiveHttpConsts.ENTER_ROOM)
|
HttpClient.getInstance().get("jinruzhibojian", LiveHttpConsts.ENTER_ROOM)
|
||||||
.params("city", CommonAppConfig.getInstance().getCity())
|
.params("city", CommonAppConfig.getInstance().getCity())
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 观众进入直播间后,还要请求一次
|
|
||||||
*/
|
|
||||||
public static void enterBackRoom(String liveUid, String stream, HttpCallback callback) {
|
|
||||||
HttpClient.getInstance().get("Tx.userjoinroom", "Tx.userjoinroom")
|
|
||||||
.params("GroupId", "g" + liveUid)
|
|
||||||
.params("stream", stream)
|
|
||||||
.execute(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 观众退出直播间后,还要请求一次
|
|
||||||
*/
|
|
||||||
public static void qBackRoom(String liveUid, String stream, HttpCallback callback) {
|
|
||||||
HttpClient.getInstance().get("Tx.leave_room", "Tx.leave_room")
|
|
||||||
.params("GroupId", "g" + liveUid)
|
|
||||||
.params("stream", stream)
|
|
||||||
.execute(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取礼物列表,同时会返回剩余的钱
|
* 获取礼物列表,同时会返回剩余的钱
|
||||||
*/
|
*/
|
||||||
@@ -539,14 +519,14 @@ public class LiveHttpUtil {
|
|||||||
* 获取礼物列表,同时会返回剩余的钱(新版)
|
* 获取礼物列表,同时会返回剩余的钱(新版)
|
||||||
*/
|
*/
|
||||||
public static void getNewGiftList(HttpCallback callback) {
|
public static void getNewGiftList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getGiftListApp", LiveHttpConsts.GET_GIFT_LIST)
|
HttpClient.getInstance().get("zhibojianliwuxinxi", LiveHttpConsts.GET_GIFT_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取礼物列表,同时会返回剩余的钱(新版) -用于获取联系方式时的礼物设置
|
* 获取礼物列表,同时会返回剩余的钱(新版) -用于获取联系方式时的礼物设置
|
||||||
*/
|
*/
|
||||||
public static void getHotGiftList(HttpCallback callback) {
|
public static void getHotGiftList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Gift.getHotGiftList", LiveHttpConsts.GET_GIFT_LIST)
|
HttpClient.getInstance().get("huoqusuoyouremenliwu", LiveHttpConsts.GET_GIFT_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,7 +534,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取包裹列表
|
* 获取包裹列表
|
||||||
*/
|
*/
|
||||||
public static void getWrapList(HttpCallback callback) {
|
public static void getWrapList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getPackList", LiveHttpConsts.GET_WRAP_LIST)
|
HttpClient.getInstance().get("zhibojianbaoguoxinxi", LiveHttpConsts.GET_WRAP_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,7 +542,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播获取心愿单列表
|
* 主播获取心愿单列表
|
||||||
*/
|
*/
|
||||||
public static void getWishList(HttpCallback callback) {
|
public static void getWishList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Guide.getWishlist", LiveHttpConsts.GET_WISH_LIST)
|
HttpClient.getInstance().get("huoquxinyuandan", LiveHttpConsts.GET_WISH_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +550,7 @@ public class LiveHttpUtil {
|
|||||||
* 用户获取主播的心愿单列表
|
* 用户获取主播的心愿单列表
|
||||||
*/
|
*/
|
||||||
public static void getWishList(String liveId, HttpCallback callback) {
|
public static void getWishList(String liveId, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Guide.getWishlist", LiveHttpConsts.GET_WISH_LIST)
|
HttpClient.getInstance().get("huoquxinyuandan", LiveHttpConsts.GET_WISH_LIST)
|
||||||
.params("uid", liveId, true)
|
.params("uid", liveId, true)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -581,7 +561,7 @@ public class LiveHttpUtil {
|
|||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public static void getFrontTask(HttpCallback callback) {
|
public static void getFrontTask(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getFrontTask", "User.getFrontTask")
|
HttpClient.getInstance().get("huoquxinshouyindaozhuangtai", "huoquxinshouyindaozhuangtai")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,7 +571,7 @@ public class LiveHttpUtil {
|
|||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public static void getFrontTask(String Token, String uid, HttpCallback callback) {
|
public static void getFrontTask(String Token, String uid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getFrontTask", "User.getFrontTask")
|
HttpClient.getInstance().get("huoquxinshouyindaozhuangtai", "huoquxinshouyindaozhuangtai")
|
||||||
.params("token", Token, true)
|
.params("token", Token, true)
|
||||||
.params("uid", uid, true)
|
.params("uid", uid, true)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -601,7 +581,7 @@ public class LiveHttpUtil {
|
|||||||
* 完成新手任務
|
* 完成新手任務
|
||||||
*/
|
*/
|
||||||
public static void setFrontTask(String type, HttpCallback callback) {
|
public static void setFrontTask(String type, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.setFrontTask", "User.setFrontTask")
|
HttpClient.getInstance().get("shezhixinshouyindaozhuangtai", "shezhixinshouyindaozhuangtai")
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -610,7 +590,7 @@ public class LiveHttpUtil {
|
|||||||
* 完成新手任務
|
* 完成新手任務
|
||||||
*/
|
*/
|
||||||
public static void setFrontTask(String type, String liveuid, HttpCallback callback) {
|
public static void setFrontTask(String type, String liveuid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.setFrontTask", "User.setFrontTask")
|
HttpClient.getInstance().get("shezhixinshouyindaozhuangtai", "shezhixinshouyindaozhuangtai")
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
.params("liveuid", liveuid)
|
.params("liveuid", liveuid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -620,7 +600,7 @@ public class LiveHttpUtil {
|
|||||||
* 修改心愿单列表
|
* 修改心愿单列表
|
||||||
*/
|
*/
|
||||||
public static void modifyWishList(String list, HttpCallback callback) {
|
public static void modifyWishList(String list, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Guide.setWishlist", LiveHttpConsts.SET_WISH_LIST)
|
HttpClient.getInstance().get("shezhixinyuandan", LiveHttpConsts.SET_WISH_LIST)
|
||||||
.params("list", list)
|
.params("list", list)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -642,7 +622,7 @@ public class LiveHttpUtil {
|
|||||||
* @param isContactGift 是否为联系方式礼物
|
* @param isContactGift 是否为联系方式礼物
|
||||||
*/
|
*/
|
||||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
HttpClient.getInstance().get("zhibojianzengsongliwu", LiveHttpConsts.SEND_GIFT)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("giftid", giftId)
|
.params("giftid", giftId)
|
||||||
@@ -659,7 +639,7 @@ public class LiveHttpUtil {
|
|||||||
* @param isContactGift 是否为联系方式礼物
|
* @param isContactGift 是否为联系方式礼物
|
||||||
*/
|
*/
|
||||||
public static void sendGiftForPage(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
public static void sendGiftForPage(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.sendPackGift", LiveHttpConsts.SEND_GIFT)
|
HttpClient.getInstance().get("zhibojianzengsongbaoguoliwu", LiveHttpConsts.SEND_GIFT)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("giftid", giftId)
|
.params("giftid", giftId)
|
||||||
@@ -676,7 +656,7 @@ public class LiveHttpUtil {
|
|||||||
* @param isContactGift 是否为联系方式礼物
|
* @param isContactGift 是否为联系方式礼物
|
||||||
*/
|
*/
|
||||||
public static void sendGiftForFansGroup(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
public static void sendGiftForFansGroup(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.fansExclusivePack", LiveHttpConsts.SEND_GIFT)
|
HttpClient.getInstance().get("zengsongfensituanbaoguoliwu", LiveHttpConsts.SEND_GIFT)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("giftid", giftId)
|
.params("giftid", giftId)
|
||||||
@@ -688,7 +668,7 @@ public class LiveHttpUtil {
|
|||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
public static void sendBlindBoxTicket(String by, String liveUid, String stream, int giftId, HttpCallback callback) {
|
public static void sendBlindBoxTicket(String by, String liveUid, String stream, int giftId, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.sendBlindBoxTicket", LiveHttpConsts.SEND_GIFT)
|
HttpClient.getInstance().get("mangheshiyongquan", LiveHttpConsts.SEND_GIFT)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("giftid", giftId)
|
.params("giftid", giftId)
|
||||||
@@ -717,7 +697,7 @@ public class LiveHttpUtil {
|
|||||||
* 点亮發IM
|
* 点亮發IM
|
||||||
*/
|
*/
|
||||||
public static void sendZAN(String liveUid, HttpCallback callback) {
|
public static void sendZAN(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Fans.doubleClickLight", "Fans.DoubleClickLight")
|
HttpClient.getInstance().get("shuangjidianliang", "shuangjidianliang")
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -726,7 +706,7 @@ public class LiveHttpUtil {
|
|||||||
* 连麦pk搜索主播
|
* 连麦pk搜索主播
|
||||||
*/
|
*/
|
||||||
public static void livePkSearchAnchor(String key, int p, HttpCallback callback) {
|
public static void livePkSearchAnchor(String key, int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livepk.search", LiveHttpConsts.LIVE_PK_SEARCH_ANCHOR)
|
HttpClient.getInstance().get("sousuozhiboyonghu", LiveHttpConsts.LIVE_PK_SEARCH_ANCHOR)
|
||||||
.params("key", key)
|
.params("key", key)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -737,7 +717,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取主播连麦pk列表
|
* 获取主播连麦pk列表
|
||||||
*/
|
*/
|
||||||
public static void getLivePkList(int p, HttpCallback callback) {
|
public static void getLivePkList(int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livepk.getLiveList", LiveHttpConsts.GET_LIVE_PK_LIST)
|
HttpClient.getInstance().get("huoquzhiboyonghuliebiao", LiveHttpConsts.GET_LIVE_PK_LIST)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -774,7 +754,7 @@ public class LiveHttpUtil {
|
|||||||
*/
|
*/
|
||||||
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, int clarityType,boolean isSw, HttpCallback callback) {
|
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, int clarityType,boolean isSw, HttpCallback callback) {
|
||||||
|
|
||||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.createRoom2", LiveHttpConsts.CREATE_ROOM)
|
PostRequest<JsonBean> request = HttpClient.getInstance().post("chuangjianzhibov2", LiveHttpConsts.CREATE_ROOM)
|
||||||
.params("title", title)
|
.params("title", title)
|
||||||
.params("liveclassid", liveClassId)
|
.params("liveclassid", liveClassId)
|
||||||
.params("type", type)
|
.params("type", type)
|
||||||
@@ -793,7 +773,7 @@ public class LiveHttpUtil {
|
|||||||
* 修改直播状态
|
* 修改直播状态
|
||||||
*/
|
*/
|
||||||
public static void changeLive(String stream) {
|
public static void changeLive(String stream) {
|
||||||
HttpClient.getInstance().get("Live.changeLive", LiveHttpConsts.CHANGE_LIVE)
|
HttpClient.getInstance().get("xiugaizhibozhuangtai", LiveHttpConsts.CHANGE_LIVE)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.params("status", "1")
|
.params("status", "1")
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@@ -808,7 +788,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播结束直播
|
* 主播结束直播
|
||||||
*/
|
*/
|
||||||
public static void stopLive(String stream, HttpCallback callback) {
|
public static void stopLive(String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.stopRoom", LiveHttpConsts.STOP_LIVE)
|
HttpClient.getInstance().get("guanbizhibo", LiveHttpConsts.STOP_LIVE)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -817,12 +797,12 @@ public class LiveHttpUtil {
|
|||||||
* 主播开播前获取sdk类型 0金山 1腾讯
|
* 主播开播前获取sdk类型 0金山 1腾讯
|
||||||
*/
|
*/
|
||||||
public static void getLiveSdk(HttpCallback callback) {
|
public static void getLiveSdk(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getSDK", LiveHttpConsts.GET_LIVE_SDK)
|
HttpClient.getInstance().get("huoqusdk", LiveHttpConsts.GET_LIVE_SDK)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getisRong(HttpCallback callback) {
|
public static void getisRong(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.isRong", "Live.isRong")
|
HttpClient.getInstance().get("shifouweirongyunzhubo", "shifouweirongyunzhubo")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -831,7 +811,7 @@ public class LiveHttpUtil {
|
|||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public static void getIsSw(HttpCallback callback) {
|
public static void getIsSw(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Tx.setRtcFirm", "Tx.setRtcFirm")
|
HttpClient.getInstance().get("shezhiyuanshengduanshengwangpeizhi", "shezhiyuanshengduanshengwangpeizhi")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,7 +819,7 @@ public class LiveHttpUtil {
|
|||||||
* 腾讯sdk 跟主播连麦时,获取主播的低延时流
|
* 腾讯sdk 跟主播连麦时,获取主播的低延时流
|
||||||
*/
|
*/
|
||||||
public static void getTxLinkMicAccUrl(String originStreamUrl, HttpCallback callback) {
|
public static void getTxLinkMicAccUrl(String originStreamUrl, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Linkmic.requestPlayUrlWithSignForLinkMic", LiveHttpConsts.GET_TX_LINK_MIC_ACC_URL)
|
HttpClient.getInstance().get("jianquanliudizhi", LiveHttpConsts.GET_TX_LINK_MIC_ACC_URL)
|
||||||
.params("originStreamUrl", originStreamUrl)
|
.params("originStreamUrl", originStreamUrl)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -849,7 +829,7 @@ public class LiveHttpUtil {
|
|||||||
* 连麦时候 主播混流
|
* 连麦时候 主播混流
|
||||||
*/
|
*/
|
||||||
public static void linkMicTxMixStream(String mergeparams) {
|
public static void linkMicTxMixStream(String mergeparams) {
|
||||||
HttpClient.getInstance().get("Linkmic.mergeVideoStream", LiveHttpConsts.LINK_MIC_TX_MIX_STREAM)
|
HttpClient.getInstance().get("lianmaihunliu", LiveHttpConsts.LINK_MIC_TX_MIX_STREAM)
|
||||||
.params("mergeparams", mergeparams)
|
.params("mergeparams", mergeparams)
|
||||||
.execute(CommonHttpUtil.NO_CALLBACK);
|
.execute(CommonHttpUtil.NO_CALLBACK);
|
||||||
}
|
}
|
||||||
@@ -859,7 +839,7 @@ public class LiveHttpUtil {
|
|||||||
* 我是哪些直播间的管理员,返回这些直播间列表
|
* 我是哪些直播间的管理员,返回这些直播间列表
|
||||||
*/
|
*/
|
||||||
public static void getMyAdminRoomList(int p, HttpCallback callback) {
|
public static void getMyAdminRoomList(int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Livemanage.getRoomList", LiveHttpConsts.GET_MY_ADMIN_ROOM_LIST)
|
HttpClient.getInstance().get("huoquwodefangjian", LiveHttpConsts.GET_MY_ADMIN_ROOM_LIST)
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -869,7 +849,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取直播间奖池等级
|
* 获取直播间奖池等级
|
||||||
*/
|
*/
|
||||||
public static void getLiveGiftPrizePool(String liveUid, String stream, HttpCallback callback) {
|
public static void getLiveGiftPrizePool(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Jackpot.getJackpot", LiveHttpConsts.GET_LIVE_GIFT_PRIZE_POOL)
|
HttpClient.getInstance().get("huoquyindaoyexinxi", LiveHttpConsts.GET_LIVE_GIFT_PRIZE_POOL)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -879,7 +859,7 @@ public class LiveHttpUtil {
|
|||||||
* 主播checkLive
|
* 主播checkLive
|
||||||
*/
|
*/
|
||||||
public static void anchorCheckLive(String liveUid, String stream, HttpCallback callback) {
|
public static void anchorCheckLive(String liveUid, String stream, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.checkLiveing", LiveHttpConsts.ANCHOR_CHECK_LIVE)
|
HttpClient.getInstance().get("jiancefangjiangzhuangtai", LiveHttpConsts.ANCHOR_CHECK_LIVE)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -890,7 +870,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取直播间信息
|
* 获取直播间信息
|
||||||
*/
|
*/
|
||||||
public static void getLiveInfo(String liveUid, HttpCallback callback) {
|
public static void getLiveInfo(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getLiveInfo", LiveHttpConsts.GET_LIVE_INFO)
|
HttpClient.getInstance().get("huoquzhiboxinxi", LiveHttpConsts.GET_LIVE_INFO)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -901,7 +881,7 @@ public class LiveHttpUtil {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static void getHcGiftList(HttpCallback callback) {
|
public static void getHcGiftList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getSvgaList", LiveHttpConsts.GET_GIFT_LIST)
|
HttpClient.getInstance().get("huoquliwudonghualiebiao", LiveHttpConsts.GET_GIFT_LIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,7 +891,7 @@ public class LiveHttpUtil {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static void getHczGiftList(HttpCallback callback) {
|
public static void getHczGiftList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Home.aoto_load", "Home.aoto_load")
|
HttpClient.getInstance().get("yuxiazai", "yuxiazai")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -920,29 +900,21 @@ public class LiveHttpUtil {
|
|||||||
* 获取活动
|
* 获取活动
|
||||||
*/
|
*/
|
||||||
public static void geteEvent(String anchor_id, HttpCallback callback) {
|
public static void geteEvent(String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Rank.isActivity", LiveHttpConsts.GET_EVENT)
|
HttpClient.getInstance().get("huodongpeizhixinxi", LiveHttpConsts.GET_EVENT)
|
||||||
.params("anchorUid", anchor_id)
|
.params("anchorUid", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
public static void getAnchorActiveImgStatus(String anchor_id, HttpCallback callback) {
|
public static void getAnchorActiveImgStatus(String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.getAnchorActiveImgStatus", LiveHttpConsts.GET_EVENT)
|
HttpClient.getInstance().get("huoquzhuboxunfuchuangzhuangtai", LiveHttpConsts.GET_EVENT)
|
||||||
.params("anchorUid", anchor_id)
|
.params("anchorUid", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 重置活动
|
|
||||||
*/
|
|
||||||
public static void setEvent(String anchor_id, HttpCallback callback) {
|
|
||||||
HttpClient.getInstance().get("Rank.crystalTimeEnd", LiveHttpConsts.GET_EVENT)
|
|
||||||
.params("anchor_id", anchor_id)
|
|
||||||
.execute(callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整蛊转盘拯救主播
|
* 整蛊转盘拯救主播
|
||||||
*/
|
*/
|
||||||
public static void userHopePrankTurntable(String anchor_id, String prankid, HttpCallback callback) {
|
public static void userHopePrankTurntable(String anchor_id, String prankid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Prank.userHopePrankTurntable", LiveHttpConsts.USERHOPEPRANKTURNTABLE)
|
HttpClient.getInstance().get("yonghuzhengjiuzhubo", LiveHttpConsts.USERHOPEPRANKTURNTABLE)
|
||||||
.params("prankid", prankid)
|
.params("prankid", prankid)
|
||||||
.params("anchor_id", anchor_id)
|
.params("anchor_id", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -952,7 +924,7 @@ public class LiveHttpUtil {
|
|||||||
* 倒计时结束
|
* 倒计时结束
|
||||||
*/
|
*/
|
||||||
public static void endPrankTurntable(String anchor_id, HttpCallback callback) {
|
public static void endPrankTurntable(String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Prank.endPrankTurntable", LiveHttpConsts.ENDPRANKTURNTABLE)
|
HttpClient.getInstance().get("zhenggudaojishijieshu", LiveHttpConsts.ENDPRANKTURNTABLE)
|
||||||
.params("anchor_id", anchor_id)
|
.params("anchor_id", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -961,7 +933,7 @@ public class LiveHttpUtil {
|
|||||||
* 周星榜数据
|
* 周星榜数据
|
||||||
*/
|
*/
|
||||||
public static void getAnchorLastWeekList(HttpCallback callback) {
|
public static void getAnchorLastWeekList(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("WeekStar.getAnchorLastWeekList", LiveHttpConsts.GETANCHORLASTWEEKLIST)
|
HttpClient.getInstance().get("huoqushangzhouzhouxingbangzhubo", LiveHttpConsts.GETANCHORLASTWEEKLIST)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -969,7 +941,7 @@ public class LiveHttpUtil {
|
|||||||
* 热度加成列表
|
* 热度加成列表
|
||||||
*/
|
*/
|
||||||
public static void useHotCardUserList(String anchor_id, HttpCallback callback) {
|
public static void useHotCardUserList(String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.useHotCardUserList", LiveHttpConsts.USEHOTCARDUSERLIST)
|
HttpClient.getInstance().get("redukayonghuliebiao", LiveHttpConsts.USEHOTCARDUSERLIST)
|
||||||
.params("anchor_id", anchor_id)
|
.params("anchor_id", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -978,7 +950,7 @@ public class LiveHttpUtil {
|
|||||||
* 是否有热度加成
|
* 是否有热度加成
|
||||||
*/
|
*/
|
||||||
public static void isHotCard(String anchor_id, HttpCallback callback) {
|
public static void isHotCard(String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.isHotCard", LiveHttpConsts.ISHOTCARD)
|
HttpClient.getInstance().get("zhibozhongshifoushiyongreduka", LiveHttpConsts.ISHOTCARD)
|
||||||
.params("anchor_id", anchor_id)
|
.params("anchor_id", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -987,7 +959,7 @@ public class LiveHttpUtil {
|
|||||||
* 修改im备注信息
|
* 修改im备注信息
|
||||||
*/
|
*/
|
||||||
public static void setInstructorRemark(String touid, String remark, HttpCallback callback) {
|
public static void setInstructorRemark(String touid, String remark, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.setInstructorRemark", LiveHttpConsts.SETINSTRUCTORREMARK)
|
HttpClient.getInstance().get("shezhiyonghubeizhuming", LiveHttpConsts.SETINSTRUCTORREMARK)
|
||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.params("remark", remark)
|
.params("remark", remark)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -997,7 +969,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取用户贵族喇叭的数量
|
* 获取用户贵族喇叭的数量
|
||||||
*/
|
*/
|
||||||
public static void getNobleTrumpetNum(HttpCallback callback) {
|
public static void getNobleTrumpetNum(HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Noble.getNobleTrumpetNum", "getNobleTrumpetNum")
|
HttpClient.getInstance().get("huoquguizulabashuliang", "huoquguizulabashuliang")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1005,7 +977,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取用户贵族喇叭的数量
|
* 获取用户贵族喇叭的数量
|
||||||
*/
|
*/
|
||||||
public static void nobleUseTrumpet(String trumpet_msg, String anchor_id, HttpCallback callback) {
|
public static void nobleUseTrumpet(String trumpet_msg, String anchor_id, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Noble.nobleUseTrumpet", "nobleUseTrumpet")
|
HttpClient.getInstance().get("guizushiyonglaba", "guizushiyonglaba")
|
||||||
.params("", trumpet_msg)
|
.params("", trumpet_msg)
|
||||||
.params("", anchor_id)
|
.params("", anchor_id)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
@@ -1015,7 +987,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取用户贵族喇叭的数量
|
* 获取用户贵族喇叭的数量
|
||||||
*/
|
*/
|
||||||
public static void getStarChallengeStatus(String liveUid, HttpCallback callback) {
|
public static void getStarChallengeStatus(String liveUid, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("StarChallenge.getStarChallengeStatus", "StarChallengeStatus")
|
HttpClient.getInstance().get("huoquxingjitiaozhanzhuangtai", "huoquxingjitiaozhanzhuangtai")
|
||||||
.params("liveUid", liveUid)
|
.params("liveUid", liveUid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
@@ -1024,14 +996,14 @@ public class LiveHttpUtil {
|
|||||||
* 首页关注直播
|
* 首页关注直播
|
||||||
*/
|
*/
|
||||||
public static void getHomeFollow(int p, HttpCallback callback) {
|
public static void getHomeFollow(int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Home.getFollow", "Home.getFollow")
|
HttpClient.getInstance().get("huoquguanzhuzhuboliebiao", "huoquguanzhuzhuboliebiao")
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType, int page, HttpCallback callback) {
|
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType, int page, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Sudgameserver.getRoomList", "Sudgameserver.getRoomList")
|
HttpClient.getInstance().get("huoquyouxiliebiao", "huoquyouxiliebiao")
|
||||||
.params("sud_game_id", sudGameId)
|
.params("sud_game_id", sudGameId)
|
||||||
.params("threshold", threshold)
|
.params("threshold", threshold)
|
||||||
.params("room_holder_type", roomHolderType)
|
.params("room_holder_type", roomHolderType)
|
||||||
@@ -1051,7 +1023,7 @@ public class LiveHttpUtil {
|
|||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public static void gameRecord(String sudGameId, String currencyType, String dateType, int page, HttpCallback callback) {
|
public static void gameRecord(String sudGameId, String currencyType, String dateType, int page, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Sudgameserver.gameRecord", "Sudgameserver.gameRecord")
|
HttpClient.getInstance().get("chaxunyouxijilu", "chaxunyouxijilu")
|
||||||
.params("sud_game_id", sudGameId)
|
.params("sud_game_id", sudGameId)
|
||||||
.params("currency_type", currencyType)
|
.params("currency_type", currencyType)
|
||||||
.params("date_type", dateType)
|
.params("date_type", dateType)
|
||||||
@@ -1063,7 +1035,7 @@ public class LiveHttpUtil {
|
|||||||
* 获取短剧Url
|
* 获取短剧Url
|
||||||
*/
|
*/
|
||||||
public static void getCoolydrama(HttpCallback callback){
|
public static void getCoolydrama(HttpCallback callback){
|
||||||
HttpClient.getInstance().get("cool.register", "Home.getFollow")
|
HttpClient.getInstance().get("duanjuzhanghaozhuce", "duanjuzhanghaozhuce")
|
||||||
.params("lang", WordUtil.isNewZh()?"zh_CN":"en")
|
.params("lang", WordUtil.isNewZh()?"zh_CN":"en")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ import com.yunbao.common.bean.SendMoneyLongModel;
|
|||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
||||||
|
import com.yunbao.common.bean.SudGameActivityInfoRoomBean;
|
||||||
import com.yunbao.common.bean.SudGameAiInfo;
|
import com.yunbao.common.bean.SudGameAiInfo;
|
||||||
import com.yunbao.common.bean.SudGameInfoBean;
|
import com.yunbao.common.bean.SudGameInfoBean;
|
||||||
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
||||||
@@ -3713,6 +3714,25 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
public void checkGameForActivity(String gameRoomId, HttpCallback<SudGameActivityInfoRoomBean> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.checkGameForActivity(gameRoomId)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
throwable.printStackTrace();
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
private MultipartBody.Part createUploadFile(File file) {
|
private MultipartBody.Part createUploadFile(File file) {
|
||||||
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private Runnable isInstructorRunnable = new Runnable() {
|
private Runnable isInstructorRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
HttpClient.getInstance().get("User.isInstructor", "isInstructor")
|
HttpClient.getInstance().get("shifouweituiguangzhanghao", "isInstructor")
|
||||||
.params("uid", userInfo.getId(), true)
|
.params("uid", userInfo.getId(), true)
|
||||||
.params("token", userInfo.getToken(), true)
|
.params("token", userInfo.getToken(), true)
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@@ -518,7 +518,7 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
String uid = uidAndToken[0];
|
String uid = uidAndToken[0];
|
||||||
String token = uidAndToken[1];
|
String token = uidAndToken[1];
|
||||||
if (TextUtils.isEmpty(token)) return;
|
if (TextUtils.isEmpty(token)) return;
|
||||||
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
|
HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo")
|
||||||
.params("uid", uid)
|
.params("uid", uid)
|
||||||
.params("token", token)
|
.params("token", token)
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@@ -539,7 +539,7 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateUserCoin() {
|
public void updateUserCoin() {
|
||||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
HttpClient.getInstance().get("chaxunyonghuyue", "chaxunyonghuyue")
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
@@ -557,7 +557,7 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateUserCoin(OnItemClickListener<JSONObject> listener) {
|
public void updateUserCoin(OnItemClickListener<JSONObject> listener) {
|
||||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
HttpClient.getInstance().get("chaxunyonghuyue", "chaxunyonghuyue")
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class InstructorRemarkManager extends BaseCacheManager {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
||||||
HttpClient.getInstance().get("User.getInstructorRemark", "getInstructorRemark")
|
HttpClient.getInstance().get("huoqutuiguangbeizhumingliebiao", "huoqutuiguangbeizhumingliebiao")
|
||||||
.params("uid", userInfo.getId(),true)
|
.params("uid", userInfo.getId(),true)
|
||||||
.params("token", userInfo.getToken(),true)
|
.params("token", userInfo.getToken(),true)
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
|||||||
IMLoginModel userModel = new Gson().fromJson(model1.getExtra(), IMLoginModel.class);
|
IMLoginModel userModel = new Gson().fromJson(model1.getExtra(), IMLoginModel.class);
|
||||||
if (userModel != null && TextUtils.equals(userModel.getIsAdmin(), "1")) {
|
if (userModel != null && TextUtils.equals(userModel.getIsAdmin(), "1")) {
|
||||||
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
||||||
HttpClient.getInstance().get("Message.setZdyMsg", "setZdyMsg")
|
HttpClient.getInstance().get("shezhizhidaoyuanxiaoxizhuangtai", "shezhizhidaoyuanxiaoxizhuangtai")
|
||||||
.params("uid", userInfo.getId(), true)
|
.params("uid", userInfo.getId(), true)
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ package com.yunbao.common.manager;
|
|||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -16,7 +13,6 @@ import com.yunbao.common.R;
|
|||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.BallClearanceTableJoinRoomBean;
|
import com.yunbao.common.bean.BallClearanceTableJoinRoomBean;
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.SudGameRoomInfoBean;
|
|
||||||
import com.yunbao.common.event.CheckCurrencyModel;
|
import com.yunbao.common.event.CheckCurrencyModel;
|
||||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
@@ -28,7 +24,6 @@ import com.yunbao.common.sud.QuickStartGameViewModel;
|
|||||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||||
import com.yunbao.common.utils.AppManager;
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@@ -39,7 +34,6 @@ public class RandomSudGameManager {
|
|||||||
private static RandomSudGameManager manager;
|
private static RandomSudGameManager manager;
|
||||||
private AbsRandomGameManager gameManager;
|
private AbsRandomGameManager gameManager;
|
||||||
private CreateSudRoomModel sudRoomModel;
|
private CreateSudRoomModel sudRoomModel;
|
||||||
private QuickStartGameViewModel gameViewModel;
|
|
||||||
private boolean isRandom = false;
|
private boolean isRandom = false;
|
||||||
|
|
||||||
public static RandomSudGameManager getManager() {
|
public static RandomSudGameManager getManager() {
|
||||||
@@ -81,7 +75,10 @@ public class RandomSudGameManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createRoom(Context mContext) {
|
private void createRoom(Context mContext) {
|
||||||
if(gameManager!=null){
|
if(gameManager==null){
|
||||||
|
gameManager = new BilliardsRandomManager();
|
||||||
|
gameManager.setRandom(isRandom);
|
||||||
|
}
|
||||||
gameManager.randomCreateRoom(mContext, new OnItemClickListener<CreateSudRoomModel>() {
|
gameManager.randomCreateRoom(mContext, new OnItemClickListener<CreateSudRoomModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(CreateSudRoomModel bean, int position) {
|
public void onItemClick(CreateSudRoomModel bean, int position) {
|
||||||
@@ -89,7 +86,6 @@ public class RandomSudGameManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
if (gameManager != null) {
|
if (gameManager != null) {
|
||||||
@@ -247,7 +243,6 @@ public class RandomSudGameManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setGameViewModel(QuickStartGameViewModel gameViewModel) {
|
public void setGameViewModel(QuickStartGameViewModel gameViewModel) {
|
||||||
this.gameManager = gameManager;
|
|
||||||
if (gameManager != null) {
|
if (gameManager != null) {
|
||||||
gameManager.setGameViewModel(gameViewModel);
|
gameManager.setGameViewModel(gameViewModel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
LiveNetManager.get(mContext).createSudRoom(name, sill, currencyType, id, true, new HttpCallback<CreateSudRoomModel>() {
|
LiveNetManager.get(mContext).createSudRoom(name, sill, currencyType, id, true, new HttpCallback<CreateSudRoomModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(CreateSudRoomModel data) {
|
public void onSuccess(CreateSudRoomModel data) {
|
||||||
|
BilliardsRandomManager.this.data = data;
|
||||||
onClickListener.onItemClick(data, 0);
|
onClickListener.onItemClick(data, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,6 +145,9 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
if (event.getSudMGPMGState().equals(SudMGPMGState.MG_GAME_LOAD_OVER)) {
|
if (event.getSudMGPMGState().equals(SudMGPMGState.MG_GAME_LOAD_OVER)) {
|
||||||
joinAiRobot();
|
joinAiRobot();
|
||||||
}
|
}
|
||||||
|
if(SudMGPMGState.MG_COMMON_GAME_STATE.equals(event.getSudMGPMGState())){
|
||||||
|
reset();
|
||||||
|
}
|
||||||
if (event.getSudMGPMGState().equals(SudMGPMGState.MG_COMMON_PLAYER_IN)) {
|
if (event.getSudMGPMGState().equals(SudMGPMGState.MG_COMMON_PLAYER_IN)) {
|
||||||
LogUtils.e("收到的回调: AI uid = " + getAiUid() + "| kickUid = " + event.getPlayerIn().kickUID + "|" + getPlayerSize());
|
LogUtils.e("收到的回调: AI uid = " + getAiUid() + "| kickUid = " + event.getPlayerIn().kickUID + "|" + getPlayerSize());
|
||||||
if (event.getPlayerIn().reason == 1 && aiInfo != null) {
|
if (event.getPlayerIn().reason == 1 && aiInfo != null) {
|
||||||
@@ -184,6 +188,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGameMGCommonGameBilliardsHitState(SudMGPMGState.MGCommonGameBilliardsHitState model) {
|
public void onGameMGCommonGameBilliardsHitState(SudMGPMGState.MGCommonGameBilliardsHitState model) {
|
||||||
|
LogUtils.e("uid:"+model.uid,"state:"+model.state,"isOneOverForMy:"+isOneOverForMy,"isOneOverForOther:"+isOneOverForOther);
|
||||||
if (Integer.parseInt(model.uid) == IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()) {
|
if (Integer.parseInt(model.uid) == IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()) {
|
||||||
if (isOneOverForMy == -1) {
|
if (isOneOverForMy == -1) {
|
||||||
isOneOverForMy = 1;
|
isOneOverForMy = 1;
|
||||||
@@ -219,6 +224,7 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onGameMGCommonGameSettle(SudMGPMGState.MGCommonGameSettle model) {
|
public boolean onGameMGCommonGameSettle(SudMGPMGState.MGCommonGameSettle model) {
|
||||||
System.out.println("游戏结束 :" + isOneOverForMy + "|" + comboNumberForMy);
|
System.out.println("游戏结束 :" + isOneOverForMy + "|" + comboNumberForMy);
|
||||||
|
model.achievementValue=comboNumberForMy;
|
||||||
if (isOneOverForMy == 1 && comboNumberForMy > 1) {
|
if (isOneOverForMy == 1 && comboNumberForMy > 1) {
|
||||||
model.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_0);
|
model.achievement = WordUtil.getNewString(R.string.game_dialog_activity_achievements_0);
|
||||||
} else if (comboNumberForMy > 0) {
|
} else if (comboNumberForMy > 0) {
|
||||||
@@ -279,16 +285,15 @@ public class BilliardsRandomManager extends AbsRandomGameManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onSendNotOneOver() {
|
private void onSendNotOneOver() {
|
||||||
|
ToastUtil.showDebug("标记丢失一杆清台");
|
||||||
LiveNetManager.get(AppManager.getInstance().getMainActivity())
|
LiveNetManager.get(AppManager.getInstance().getMainActivity())
|
||||||
.ballClearanceTableStatus(data.getSudGameRoomId(), new HttpCallback<BaseModel>() {
|
.ballClearanceTableStatus(data.getSudGameRoomId(), new HttpCallback<BaseModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(BaseModel data) {
|
public void onSuccess(BaseModel data) {
|
||||||
ToastUtil.show("标记一杆清台失败");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show("标记一杆清台失败 错误:" + error);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class MessageIMManager {
|
|||||||
if (userInfo == null) {
|
if (userInfo == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
|
HttpClient.getInstance().get("huoquxitongxiaoxiliebiaov2", "huoquxitongxiaoxiliebiaov2")
|
||||||
.params("uid", userInfo.getId())
|
.params("uid", userInfo.getId())
|
||||||
.params("token", userInfo.getToken())
|
.params("token", userInfo.getToken())
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@@ -164,7 +164,7 @@ public class MessageIMManager {
|
|||||||
public void getSystemMessages(SystemMessagesHttpCallback callback) {
|
public void getSystemMessages(SystemMessagesHttpCallback callback) {
|
||||||
systemNumber = 0;
|
systemNumber = 0;
|
||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
|
HttpClient.getInstance().get("huoquxitongxiaoxiliebiaov2", "huoquxitongxiaoxiliebiaov2")
|
||||||
.params("uid", userInfo.getId())
|
.params("uid", userInfo.getId())
|
||||||
.params("token", userInfo.getToken())
|
.params("token", userInfo.getToken())
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class PayPresenter {
|
|||||||
initGooglePay();
|
initGooglePay();
|
||||||
}
|
}
|
||||||
|
|
||||||
String newParm = StringUtil.contact("Charge.getGoogleOrder", orderParams, "&type=android",
|
String newParm = StringUtil.contact("gugeshangpindingdan", orderParams, "&type=android",
|
||||||
"&appname=", mActivity.getString(R.string.app_name),
|
"&appname=", mActivity.getString(R.string.app_name),
|
||||||
"&desc=" + mActivity.getPackageName() + "&source=android"
|
"&desc=" + mActivity.getPackageName() + "&source=android"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ public class SudMGPMGState implements Serializable {
|
|||||||
public List<SudActivityGameInfoBean> activityGameInfoBean;
|
public List<SudActivityGameInfoBean> activityGameInfoBean;
|
||||||
public List<SudSettleBean> sudSettleBeans;
|
public List<SudSettleBean> sudSettleBeans;
|
||||||
public String achievement;
|
public String achievement;
|
||||||
|
public int achievementValue;
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "MGCommonGameSettle{" +
|
return "MGCommonGameSettle{" +
|
||||||
|
|||||||
74
common/src/main/java/com/yunbao/common/utils/AesUtils.java
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
package com.yunbao.common.utils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import javax.crypto.Cipher;
|
||||||
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
|
public class AesUtils {
|
||||||
|
/**
|
||||||
|
* 使用AES/ECB/PKCS5Padding模式解密数据
|
||||||
|
*
|
||||||
|
* @param encryptedData 加密后的字节数组(Base64解码后的结果,如果原始数据是Base64编码的话)
|
||||||
|
* @param keyBytes AES密钥(16/24/32字节长,对应AES-128/192/256)
|
||||||
|
* @return 解密后的明文字节数组,如果解密失败则返回null
|
||||||
|
*/
|
||||||
|
public static byte[] decrypt(byte[] encryptedData, byte[] keyBytes) {
|
||||||
|
try {
|
||||||
|
// 创建密钥规格
|
||||||
|
SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES-128-ECB");
|
||||||
|
|
||||||
|
// 获取Cipher实例并初始化为解密模式
|
||||||
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||||
|
cipher.init(Cipher.DECRYPT_MODE, keySpec);
|
||||||
|
// 执行解密
|
||||||
|
byte[] decryptedBytes = cipher.doFinal(encryptedData);
|
||||||
|
// 返回解密后的字节数组
|
||||||
|
return decryptedBytes;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null; // 解密失败时返回null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果需要将解密后的字节数组转换为字符串(注意:这可能会导致数据丢失或乱码)
|
||||||
|
*
|
||||||
|
* @param encryptedData 加密后的字节数组(或Base64解码后的结果)
|
||||||
|
* @return 解密后的字符串,如果解密失败则返回null
|
||||||
|
*/
|
||||||
|
public static String decryptToString(byte[] encryptedData) {
|
||||||
|
byte[] decryptedBytes = decrypt(encryptedData,"LhHBfcsN2VmBpHCn".getBytes());
|
||||||
|
if (decryptedBytes != null) {
|
||||||
|
// 尝试将字节数组转换为字符串(使用指定的字符集)
|
||||||
|
try {
|
||||||
|
return decodeUnicode(new String(decryptedBytes, "UTF-8"));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String decodeUnicode(String unicode) {
|
||||||
|
/* StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < unicode.length();) {
|
||||||
|
if (unicode.charAt(i) == '\\') {
|
||||||
|
if (i + 5 < unicode.length()) {
|
||||||
|
String codePointStr = unicode.substring(i + 2, i + 6);
|
||||||
|
try {
|
||||||
|
int codePoint = Integer.parseInt(codePointStr, 16);
|
||||||
|
sb.append((char) codePoint);
|
||||||
|
i += 6;
|
||||||
|
continue;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// Handle format error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.append(unicode.charAt(i++));
|
||||||
|
}*/
|
||||||
|
return JSON.parseObject(unicode).toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ package com.yunbao.common.utils;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.yunbao.common.BuildConfig;
|
import com.yunbao.common.BuildConfig;
|
||||||
|
|
||||||
import com.yunbao.common.manager.OpenAdManager;
|
import com.yunbao.common.manager.OpenAdManager;
|
||||||
@@ -83,6 +85,7 @@ public class AppManager {
|
|||||||
if (activityStack == null) {
|
if (activityStack == null) {
|
||||||
activityStack = new Stack<Activity>();
|
activityStack = new Stack<Activity>();
|
||||||
}
|
}
|
||||||
|
LogUtils.e();
|
||||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>class com.yunbao.main.activity.MsgAddressBookActivity
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>class com.yunbao.main.activity.MsgAddressBookActivity
|
||||||
if (getActivity(activity.getClass()) != null) {
|
if (getActivity(activity.getClass()) != null) {
|
||||||
activityStack.remove(getActivity(activity.getClass()));
|
activityStack.remove(getActivity(activity.getClass()));
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ public class JavascriptInterfaceUtils {
|
|||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void androidClickToTaskPage() {
|
public void androidClickToTaskPage() {
|
||||||
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
||||||
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
|
CommonAppConfig.HOST + "/h5/task/index.html?" + "uid=" + CommonAppConfig.getInstance().getUid()
|
||||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ public class JavascriptInterfaceUtils {
|
|||||||
|
|
||||||
@JavascriptInterface
|
@JavascriptInterface
|
||||||
public void wearOrCancelFanMedal() {
|
public void wearOrCancelFanMedal() {
|
||||||
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
|
HttpClient.getInstance().get("huoquyonghujibenxinxiv2", "getBaseInfo")
|
||||||
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
|
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
|
||||||
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
|
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class LogUtil {
|
|||||||
|
|
||||||
|
|
||||||
public static void shareFile(Context context) {
|
public static void shareFile(Context context) {
|
||||||
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
String title = "[POYO]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||||
File dir = new File("/data/data/" + context.getPackageName() + File.separator);
|
File dir = new File("/data/data/" + context.getPackageName() + File.separator);
|
||||||
File zip = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".zip");
|
File zip = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".zip");
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class LogUtils {
|
|||||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||||
String line;
|
String line;
|
||||||
PrintWriter writer = null;
|
PrintWriter writer = null;
|
||||||
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
String title = "[POYO]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||||
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||||
if (dir.listFiles() != null) {
|
if (dir.listFiles() != null) {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class MicStatusManager {
|
|||||||
* 断开连麦
|
* 断开连麦
|
||||||
*/
|
*/
|
||||||
public void downMic() {
|
public void downMic() {
|
||||||
HttpClient.getInstance().get("live.leaveDrLm", "live.leaveDrLm")
|
HttpClient.getInstance().get("tuichuduorenlianmai", "tuichuduorenlianmai")
|
||||||
.params("roomid", micLiveId)
|
.params("roomid", micLiveId)
|
||||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
|
|||||||
@@ -3,13 +3,20 @@ package com.yunbao.common.utils;
|
|||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.ImageDecoder;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
|
|
||||||
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
|
import androidx.activity.result.PickVisualMediaRequest;
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.yalantis.ucrop.UCrop;
|
import com.yalantis.ucrop.UCrop;
|
||||||
import com.yalantis.ucrop.util.FileUtils;
|
import com.yalantis.ucrop.util.FileUtils;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
@@ -39,6 +46,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
private ImageResultCallback mResultCallback;
|
private ImageResultCallback mResultCallback;
|
||||||
private boolean mNeedCrop;//是否需要裁剪
|
private boolean mNeedCrop;//是否需要裁剪
|
||||||
private boolean mNeedGif;//允许gif图
|
private boolean mNeedGif;//允许gif图
|
||||||
|
ActivityResultLauncher<PickVisualMediaRequest> launcher;
|
||||||
|
|
||||||
public void setNeedGif(boolean mNeedGif) {
|
public void setNeedGif(boolean mNeedGif) {
|
||||||
this.mNeedGif = mNeedGif;
|
this.mNeedGif = mNeedGif;
|
||||||
@@ -83,7 +91,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
if (mNeedCrop) {
|
if (mNeedCrop) {
|
||||||
Uri uri = null;
|
Uri uri = null;
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24) {
|
||||||
uri = FileProvider.getUriForFile(mContext, "com.pdlive.shayu.fileprovider", mCameraResult);
|
uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCameraResult);
|
||||||
} else {
|
} else {
|
||||||
uri = Uri.fromFile(mCameraResult);
|
uri = Uri.fromFile(mCameraResult);
|
||||||
}
|
}
|
||||||
@@ -117,6 +125,19 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String path = FileUtils.getPath(mContext, intent.getData());
|
String path = FileUtils.getPath(mContext, intent.getData());
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
ImageDecoder.Source source = ImageDecoder.createSource(mContext.getContentResolver(), intent.getData());
|
||||||
|
try {
|
||||||
|
Bitmap bitmap = ImageDecoder.decodeBitmap(source);
|
||||||
|
path=BitmapUtil.getInstance().saveBitmap(bitmap);
|
||||||
|
bitmap.recycle();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
mResultCallback.onFailure();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
mResultCallback.onSuccess(file);
|
mResultCallback.onSuccess(file);
|
||||||
@@ -153,6 +174,19 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
launcher = ((AppCompatActivity) mContext).registerForActivityResult(new ActivityResultContracts.PickVisualMedia(), new androidx.activity.result.ActivityResultCallback<Uri>() {
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(Uri result) {
|
||||||
|
LogUtils.e("result:" + result);
|
||||||
|
if (result == null) {
|
||||||
|
mAlumbResultCallback.onFailure();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.setData(result);
|
||||||
|
mAlumbResultCallback.onSuccess(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,15 +207,28 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
/**
|
/**
|
||||||
* 相册获取图片
|
* 相册获取图片
|
||||||
*/
|
*/
|
||||||
public void getImageByAlumb() {
|
public void getImageByAlbum() {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
showSystemPick();
|
||||||
|
return;
|
||||||
|
}
|
||||||
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
|
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getImageByAlumb(boolean needCrop) {
|
public void getImageByAlbum(boolean needCrop) {
|
||||||
this.mNeedCrop = needCrop;
|
this.mNeedCrop = needCrop;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
showSystemPick();
|
||||||
|
return;
|
||||||
|
}
|
||||||
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
|
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showSystemPick() {
|
||||||
|
PickVisualMediaRequest.Builder builder = new PickVisualMediaRequest.Builder()
|
||||||
|
.setMediaType(ActivityResultContracts.PickVisualMedia.ImageOnly.INSTANCE);
|
||||||
|
launcher.launch(builder.build());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启摄像头,执行照相
|
* 开启摄像头,执行照相
|
||||||
@@ -195,7 +242,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
mCameraResult = getNewFile();
|
mCameraResult = getNewFile();
|
||||||
Uri uri = null;
|
Uri uri = null;
|
||||||
if (Build.VERSION.SDK_INT >= 24) {
|
if (Build.VERSION.SDK_INT >= 24) {
|
||||||
uri = FileProvider.getUriForFile(mContext, "com.pdlive.shayu.fileprovider", mCameraResult);
|
uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCameraResult);
|
||||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||||
} else {
|
} else {
|
||||||
uri = Uri.fromFile(mCameraResult);
|
uri = Uri.fromFile(mCameraResult);
|
||||||
@@ -255,7 +302,7 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
|||||||
startActivityForResult(intent, mCropResultCallback);
|
startActivityForResult(intent, mCropResultCallback);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
try {
|
try {
|
||||||
Uri resultUri = FileProvider.getUriForFile(mContext, "com.pdlive.shayu.fileprovider", mCorpResult);
|
Uri resultUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", mCorpResult);
|
||||||
if (resultUri == null || mFragment == null || mContext == null) {
|
if (resultUri == null || mFragment == null || mContext == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ public class RouteUtil {
|
|||||||
public static final String PATH_FEEDBACK_ACTIVITY = "/main/FeedbackActivity";
|
public static final String PATH_FEEDBACK_ACTIVITY = "/main/FeedbackActivity";
|
||||||
public static final String PATH_FEEDBACK_EDIT_ACTIVITY = "/main/FeedbackEditActivity";
|
public static final String PATH_FEEDBACK_EDIT_ACTIVITY = "/main/FeedbackEditActivity";
|
||||||
public static final String PATH_LIVE_PUNISHACTIVITY = "/live/PunishActivity";
|
public static final String PATH_LIVE_PUNISHACTIVITY = "/live/PunishActivity";
|
||||||
|
public static final String PATH_NEW_MESSAGE = "/main/NewMessageActivity";
|
||||||
|
public static final String PATH_Community_Video= "/main/CommunityVideoActivity";
|
||||||
|
|
||||||
|
|
||||||
public static void forwardCommunityActivity() {
|
public static void forwardCommunityActivity() {
|
||||||
@@ -235,7 +237,7 @@ public class RouteUtil {
|
|||||||
* 跳转到充值页面
|
* 跳转到充值页面
|
||||||
*/
|
*/
|
||||||
public static void forwardMyCoin(Context context) {
|
public static void forwardMyCoin(Context context) {
|
||||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
String url = CommonAppConfig.HOST + "/h5/mall/zhifu.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||||
ARouter.getInstance().build(PATH_COIN).withString("url", url).navigation();
|
ARouter.getInstance().build(PATH_COIN).withString("url", url).navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,7 +332,7 @@ public class RouteUtil {
|
|||||||
*/
|
*/
|
||||||
public static void forwardCustomerService(String url) {
|
public static void forwardCustomerService(String url) {
|
||||||
ARouter.getInstance().build(PATH_CS)
|
ARouter.getInstance().build(PATH_CS)
|
||||||
.withString(Constants.URL, url)
|
.withString(Constants.URL, url+"?1=1")
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class VersionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+context.getPackageName()));
|
||||||
context.startActivity(i);
|
context.startActivity(i);
|
||||||
context.finish();
|
context.finish();
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class VersionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+context.getPackageName()));
|
||||||
context.startActivity(i);
|
context.startActivity(i);
|
||||||
context.finish();
|
context.finish();
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ public class VersionUtil {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sVersion;
|
return "6.9.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ public class WordUtil {
|
|||||||
|
|
||||||
public static boolean isNewZh() {
|
public static boolean isNewZh() {
|
||||||
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE
|
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE
|
||||||
|| IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.TRADITIONAL_CHINESE ;
|
|| IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.TRADITIONAL_CHINESE
|
||||||
|
|| IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.CHINESE
|
||||||
|
|| IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.CHINA;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getNewString(int res) {
|
public static String getNewString(int res) {
|
||||||
|
|||||||
@@ -125,15 +125,15 @@ public class APKUpdateCustomPopup extends CenterPopupView {
|
|||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||||
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
|
||||||
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pdlive.shayu"));
|
i.setData(Uri.parse("https://play.google.com/store/apps/details?id="+mContext.getPackageName()));
|
||||||
mContext.startActivity(i);
|
mContext.startActivity(i);
|
||||||
mContext.finish();
|
mContext.finish();
|
||||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||||
//华为
|
//华为
|
||||||
launchHwAppDetail(mContext, "com.pdlive.shayu", "com.huawei.appmarket");
|
launchHwAppDetail(mContext, mContext.getPackageName(), "com.huawei.appmarket");
|
||||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||||
//三星
|
//三星
|
||||||
launchSmAppDetail(mContext, "com.pdlive.shayu", "com.sec.android.app.samsungapps");
|
launchSmAppDetail(mContext, mContext.getPackageName(), "com.sec.android.app.samsungapps");
|
||||||
} else {
|
} else {
|
||||||
versionImmediateUse.setVisibility(GONE);
|
versionImmediateUse.setVisibility(GONE);
|
||||||
updateLine.setVisibility(VISIBLE);
|
updateLine.setVisibility(VISIBLE);
|
||||||
|
|||||||
@@ -19,11 +19,13 @@ import com.lxj.xpopup.XPopup;
|
|||||||
import com.lxj.xpopup.core.BottomPopupView;
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
import com.yunbao.common.bean.SudActivityGameInfoBean;
|
||||||
|
import com.yunbao.common.bean.SudGameActivityInfoRoomBean;
|
||||||
import com.yunbao.common.bean.SudGameInfoBean;
|
import com.yunbao.common.bean.SudGameInfoBean;
|
||||||
import com.yunbao.common.bean.SudGameScoreBean;
|
import com.yunbao.common.bean.SudGameScoreBean;
|
||||||
import com.yunbao.common.dialog.SudGameDoubleDialog;
|
import com.yunbao.common.dialog.SudGameDoubleDialog;
|
||||||
@@ -120,8 +122,21 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.checkGameForActivity(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(SudGameActivityInfoRoomBean data) {
|
||||||
|
isActivityGame = data.getIsActivity() == 1;
|
||||||
initView();
|
initView();
|
||||||
initDate();
|
initDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
initView();
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,6 +236,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
gameConfigModel.ui.start_btn.custom = true;
|
gameConfigModel.ui.start_btn.custom = true;
|
||||||
// SudMGP平台64bit游戏ID
|
// SudMGP平台64bit游戏ID
|
||||||
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
|
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
|
||||||
|
LogUtils.e("半窗游戏活动设置:" + isActivityGame);
|
||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
sudGameDoubleDialog.setActivityGame();
|
sudGameDoubleDialog.setActivityGame();
|
||||||
sudLoadDialog.setActivityGame();
|
sudLoadDialog.setActivityGame();
|
||||||
@@ -273,6 +289,8 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BusGetOff() {
|
public void BusGetOff() {
|
||||||
@@ -281,7 +299,9 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
|
if(isActivityGame){
|
||||||
|
RandomSudGameManager.getManager().destroy();
|
||||||
|
}
|
||||||
super.dismiss();
|
super.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,6 +364,14 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
LiveNetManager.get(getContext()).getSudGameInfo(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<List<SudGameInfoBean>>() {
|
LiveNetManager.get(getContext()).getSudGameInfo(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<List<SudGameInfoBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<SudGameInfoBean> infoBean) {
|
public void onSuccess(List<SudGameInfoBean> infoBean) {
|
||||||
|
LiveNetManager.get(getContext()).checkGameForActivity(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<SudGameActivityInfoRoomBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(SudGameActivityInfoRoomBean data) {
|
||||||
|
isActivityGame=data.getIsActivity()==1;
|
||||||
|
if(isActivityGame) {
|
||||||
|
sudLoadDialog.setActivityGame();
|
||||||
|
sudGameDoubleDialog.setActivityGame();
|
||||||
|
}
|
||||||
if (!infoBean.isEmpty()) {
|
if (!infoBean.isEmpty()) {
|
||||||
System.out.println("结算,是否为游戏活动:" + isActivityGame);
|
System.out.println("结算,是否为游戏活动:" + isActivityGame);
|
||||||
if (isActivityGame) {
|
if (isActivityGame) {
|
||||||
@@ -360,6 +388,29 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
if (!infoBean.isEmpty()) {
|
||||||
|
System.out.println("结算,是否为游戏活动:" + isActivityGame);
|
||||||
|
if (isActivityGame) {
|
||||||
|
loadScore(infoBean, 3);
|
||||||
|
} else {
|
||||||
|
gameViewModel.setSudGameInfoBeanList(infoBean);
|
||||||
|
gameViewModel.sudGameRank(event.getMgCommonGameSettle(null));//结算游戏
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isActivityGame) {
|
||||||
|
showDialog();
|
||||||
|
} else {
|
||||||
|
ToastUtil.show(WordUtil.getNewString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void showDialog() {
|
private void showDialog() {
|
||||||
DialogUitl.showSimpleDialog(getContext(), WordUtil.isNewZh() ? "結算超時\n請前往活動頁面查看本局結果" :
|
DialogUitl.showSimpleDialog(getContext(), WordUtil.isNewZh() ? "結算超時\n請前往活動頁面查看本局結果" :
|
||||||
"Settlement timed out\nPlease check the result on the event page Confirm.", new DialogUitl.SimpleCallback() {
|
"Settlement timed out\nPlease check the result on the event page Confirm.", new DialogUitl.SimpleCallback() {
|
||||||
@@ -374,7 +425,8 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadScore(List<SudGameInfoBean> infoBean, int index) {
|
private void loadScore(List<SudGameInfoBean> infoBean, int index) {
|
||||||
if (index == 0) {
|
LogUtils.e("活动判断", isActivityGame);
|
||||||
|
if (index == 0 && isActivityGame) {
|
||||||
showDialog();
|
showDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -382,7 +434,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
.ballClearanceTableGetResultScore(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<>() {
|
.ballClearanceTableGetResultScore(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<SudActivityGameInfoBean> data) {
|
public void onSuccess(List<SudActivityGameInfoBean> data) {
|
||||||
if (data.isEmpty()) {
|
if (data.isEmpty() && isActivityGame) {
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
loadScore(infoBean, index - 1);
|
loadScore(infoBean, index - 1);
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -398,6 +450,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(error);
|
||||||
|
|||||||
@@ -0,0 +1,242 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.SudGameScoreBean;
|
||||||
|
import com.yunbao.common.bean.SudRoomListModel;
|
||||||
|
import com.yunbao.common.event.LiveOpenSudRoomEvent;
|
||||||
|
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||||
|
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||||
|
import com.yunbao.common.event.SudGameListRefreshEvent;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.manager.RandomSudGameManager;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class NewSudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private RoundedImageView mAvatar;
|
||||||
|
private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber;
|
||||||
|
private ImageView sex,tmpImage;
|
||||||
|
|
||||||
|
public NewSudGameListViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mAvatar = itemView.findViewById(R.id.avatar);
|
||||||
|
roomName = itemView.findViewById(R.id.room_name);
|
||||||
|
playerWeAre = itemView.findViewById(R.id.player_we_are);
|
||||||
|
playerWeAre2 = itemView.findViewById(R.id.player_we_are_2);
|
||||||
|
tmpImage = itemView.findViewById(R.id.tmp_image);
|
||||||
|
|
||||||
|
goldenBeanNumber = itemView.findViewById(R.id.golden_bean_number);
|
||||||
|
sex = itemView.findViewById(R.id.sex);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(SudRoomListModel model, boolean isHome) {
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getAvatar(), mAvatar);
|
||||||
|
roomName.setText(model.getRoomName());
|
||||||
|
roomName.setMaxLines(1);
|
||||||
|
playerWeAre.setText(String.format(itemView.getContext().getString(R.string.interactive_game_player_we_are_4), model.getPlayerTotal()));
|
||||||
|
playerWeAre2.setText(String.format(itemView.getContext().getString(R.string.interactive_game_player_we_are_3), model.getTotal()));
|
||||||
|
goldenBeanNumber.setText(model.getGoldenBeanNumber());
|
||||||
|
if (TextUtils.equals(model.getSex(), "1")) {
|
||||||
|
Glide.with(itemView.getContext()).load(R.mipmap.man).into(sex);
|
||||||
|
} else if (TextUtils.equals(model.getSex(), "2")) {
|
||||||
|
Glide.with(itemView.getContext()).load(R.mipmap.girl).into(sex);
|
||||||
|
}
|
||||||
|
// ImgLoader.display(itemView.getContext(), R.mipmap.image, tmp_image);
|
||||||
|
|
||||||
|
/* if (TextUtils.equals(model.getCurrencyType(), "2")) {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.icon_collectibles, gold_coin);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.gold_coin, gold_coin);
|
||||||
|
}*/
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
LiveNetManager.get(itemView.getContext()).checkRoomStatus(model.getId(), new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(CreateSudRoomModel data) {
|
||||||
|
if (TextUtils.equals(data.getRoomStatus(), "0")) {
|
||||||
|
if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
|
ToastUtil.show("房间不存在");
|
||||||
|
} else {
|
||||||
|
ToastUtil.show("The room does not exist");
|
||||||
|
}
|
||||||
|
Bus.get().post(new SudGameListRefreshEvent());
|
||||||
|
} else {
|
||||||
|
if (TextUtils.equals(model.getIsActivity(), "1")) {
|
||||||
|
LiveNetManager.get(mAvatar.getContext())
|
||||||
|
.getScore(model.getSudGameRoomId(), new com.yunbao.common.http.base.HttpCallback<SudGameScoreBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(SudGameScoreBean data) {
|
||||||
|
if(data.getGolden_bean_remaining_balance()!=1){
|
||||||
|
RandomSudGameManager.getManager().showNotActivityTicketDialog(itemView.getContext(), true, new DialogUitl.SimpleCallback2() {
|
||||||
|
@Override
|
||||||
|
public void onCancelClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
toGame(model, isHome, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
toGame(model, isHome, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
toGame(model, isHome, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toGame(SudRoomListModel model, boolean isHome,boolean isActivity) {
|
||||||
|
|
||||||
|
|
||||||
|
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||||
|
createSudRoomModel.setSudGameId(model.getSudGameId());
|
||||||
|
createSudRoomModel.setSudGameRoomId(model.getSudGameRoomId());
|
||||||
|
createSudRoomModel.setAvatar(model.getAvatar());
|
||||||
|
createSudRoomModel.setRoomName(model.getRoomName());
|
||||||
|
createSudRoomModel.setSudGameName(model.getSudGameName());
|
||||||
|
if (isHome) {
|
||||||
|
if (TextUtils.equals(model.getLiveUid(), "0")) {
|
||||||
|
if (CommonAppConfig.getInstance().getConfig().isSw()) {
|
||||||
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel), isActivity,false, isHome);
|
||||||
|
} else {
|
||||||
|
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel), true, isHome);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String yes = "是";
|
||||||
|
if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
|
yes = "是";
|
||||||
|
} else {
|
||||||
|
yes = "Yes";
|
||||||
|
}
|
||||||
|
new XPopup.Builder(itemView.getContext())
|
||||||
|
.asCustom(new HintCustomPopup(itemView.getContext(),
|
||||||
|
itemView.getContext().getString(R.string.interactive_game_search_room_currently_live),
|
||||||
|
itemView.getContext().getString(R.string.interactive_game_search_room_broadcast_room))
|
||||||
|
.setLiveOpenOk(yes)
|
||||||
|
.setLiveOpenCancel(itemView.getContext().getString(R.string.interactive_game_search_room_bhe_game))
|
||||||
|
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onSure() {
|
||||||
|
LiveHttpUtil.getLiveInfo(model.getLiveUid() + "", new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0 && info.length > 0) {
|
||||||
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
new LiveRoomCheckLivePresenter(itemView.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||||
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
||||||
|
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
LiveNetManager.get(mAvatar.getContext())
|
||||||
|
.getScore(model.getSudGameRoomId(), new com.yunbao.common.http.base.HttpCallback<SudGameScoreBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(SudGameScoreBean data) {
|
||||||
|
if(data.getGolden_bean_remaining_balance()!=1){
|
||||||
|
RandomSudGameManager.getManager().showNotActivityTicketDialog(itemView.getContext(), true, new DialogUitl.SimpleCallback2() {
|
||||||
|
@Override
|
||||||
|
public void onCancelClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
Bus.get().post(new LiveOpenSudRoomEvent().setActivity(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bus.get().post(new LiveOpenSudRoomEvent().setActivity(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCheckError(String contextError) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
RouteUtil.forwardUserHome(itemView.getContext(), model.getLiveUid(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel() {
|
||||||
|
if (CommonAppConfig.getInstance().getConfig().isSw()) {
|
||||||
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel), isActivity,false, isHome);
|
||||||
|
} else {
|
||||||
|
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel), true, isHome);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setActivityGame(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
Bus.get().post(new SudGameListDissMissEvent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -212,10 +212,36 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
|||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Bus.get().post(new LiveOpenSudRoomEvent().setCreateSudRoomModel(createSudRoomModel));
|
LiveNetManager.get(mAvatar.getContext())
|
||||||
|
.getScore(model.getSudGameRoomId(), new com.yunbao.common.http.base.HttpCallback<SudGameScoreBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(SudGameScoreBean data) {
|
||||||
|
if(data.getGolden_bean_remaining_balance()!=1){
|
||||||
|
RandomSudGameManager.getManager().showNotActivityTicketDialog(itemView.getContext(), true, new DialogUitl.SimpleCallback2() {
|
||||||
|
@Override
|
||||||
|
public void onCancelClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
Bus.get().post(new LiveOpenSudRoomEvent().setActivity(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bus.get().post(new LiveOpenSudRoomEvent().setActivity(isActivity).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
|||||||
9
common/src/main/res/drawable/bg_main_live_item_title.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="4dp"
|
||||||
|
android:topRightRadius="4dp"
|
||||||
|
android:bottomLeftRadius="4dp"
|
||||||
|
android:bottomRightRadius="4dp"/>
|
||||||
|
<solid android:color="#66000000"/>
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_1.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#D1E6FF"
|
||||||
|
android:startColor="#D4F7FF" />
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_2.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#D2FFF8"
|
||||||
|
android:startColor="#E7FAFF" />
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_3.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#EDD9FF"
|
||||||
|
android:startColor="#FFECFF" />
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_4.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#FFF8CD"
|
||||||
|
android:startColor="#FFFCE0" />
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_5.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#FFD1D1"
|
||||||
|
android:startColor="#FFF4E8" />
|
||||||
|
</shape>
|
||||||
8
common/src/main/res/drawable/grid_item_bg_6.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#ECFFE8"
|
||||||
|
android:startColor="#EFFFE9" />
|
||||||
|
</shape>
|
||||||
9
common/src/main/res/drawable/white_alpa_shape.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="19dp" />
|
||||||
|
<gradient
|
||||||
|
android:angle="0"
|
||||||
|
android:endColor="#FFFFFFFF"
|
||||||
|
android:startColor="#00FFFFFF" />
|
||||||
|
</shape>
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
android:id="@+id/ft_title"
|
android:id="@+id/ft_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
|
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:paddingTop="24dp"
|
android:paddingTop="24dp"
|
||||||
tools:visibility="gone">
|
tools:visibility="gone">
|
||||||
|
|||||||
150
common/src/main/res/layout/item_new_game_room.xml
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:id="@+id/layout"
|
||||||
|
android:layout_height="168dp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:cardCornerRadius="10dp"
|
||||||
|
app:cardBackgroundColor="@color/white"
|
||||||
|
android:id="@+id/top_view_1"
|
||||||
|
android:layout_height="25dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:src="@mipmap/image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:id="@+id/gold_coin"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="1,000"
|
||||||
|
android:textColor="#ff333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/gold_coin"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:id="@+id/golden_bean_number"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#ff000000"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:id="@+id/room_name"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/top_view_1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top_view_1"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#ff777777"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:id="@+id/player_we_are_2"
|
||||||
|
android:text="@string/interactive_game_player_we_are_3"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/top_view_1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/room_name"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="21dp"
|
||||||
|
android:background="@drawable/white_alpa_shape"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:layout_marginStart="37dp"
|
||||||
|
android:id="@+id/tmp_view"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/player_we_are"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="47dp"
|
||||||
|
android:layout_height="47dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:riv_oval="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tmp_view"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/sex"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/avatar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/avatar"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#ff777777"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:id="@+id/player_we_are"
|
||||||
|
android:text="@string/interactive_game_player_we_are_4"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tmp_view"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tmp_view"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tmp_image"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/tmp_image"
|
||||||
|
android:layout_width="8dp"
|
||||||
|
android:layout_height="8dp"
|
||||||
|
android:src="@mipmap/people"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tmp_view"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tmp_view"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/sex"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginEnd="2dp"/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginRight="15dp"
|
||||||
android:text="PD LIVE"
|
android:text="PoYo"
|
||||||
android:textColor="@color/gray3" />
|
android:textColor="@color/gray3" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
android:layout_marginStart="14dp"
|
android:layout_marginStart="14dp"
|
||||||
android:layout_marginEnd="14dp"
|
android:layout_marginEnd="14dp"
|
||||||
android:textColor="#0D21B2"
|
android:textColor="#0D21B2"
|
||||||
tools:text="1.戰令開啟時,完成戰令任務,提升戰令等級,可獲得大量等級獎勵。\n2.所有用戶免費解鎖普通版,戰令開啟時隨時可進階為精英版和尊享版,獲得豐厚額外專屬獎勵。\n3.三種戰令都會獎勵積分,可在兌換商城中兌換心儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數量限制。\n4.每日任務0點刷新,未完成任務進度不再累計,每季任務將會在新一季戰令開啟時刷新。\n5.任務達成時需主動領取經驗,未领取經驗將會在任務刷新時過期。\n6.活動最終解釋權歸PDLIVE所有。"
|
tools:text="1.戰令開啟時,完成戰令任務,提升戰令等級,可獲得大量等級獎勵。\n2.所有用戶免費解鎖普通版,戰令開啟時隨時可進階為精英版和尊享版,獲得豐厚額外專屬獎勵。\n3.三種戰令都會獎勵積分,可在兌換商城中兌換心儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數量限制。\n4.每日任務0點刷新,未完成任務進度不再累計,每季任務將會在新一季戰令開啟時刷新。\n5.任務達成時需主動領取經驗,未领取經驗將會在任務刷新時過期。\n6.活動最終解釋權歸PoYo所有。"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|||||||
@@ -7,37 +7,40 @@
|
|||||||
app:cardBackgroundColor="@color/white"
|
app:cardBackgroundColor="@color/white"
|
||||||
app:cardCornerRadius="15dp"
|
app:cardCornerRadius="15dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
<!--這個不是系統消息-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="通知標題標題通知標題標題"
|
android:text="通知標題標題通知標題標題"
|
||||||
android:textColor="#ff161616"
|
android:textColor="#ff161616"
|
||||||
android:textSize="17sp" />
|
android:textSize="17sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/time_text"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/time_text"
|
android:id="@+id/time_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_marginTop="19dp"
|
android:text="2024-08-22 17:00"
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:text="2-24 17:00"
|
|
||||||
android:textColor="#ff8c8c8c"
|
android:textColor="#ff8c8c8c"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp"
|
||||||
</FrameLayout>
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/banner_card"
|
android:id="@+id/banner_card"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.0 KiB |