Compare commits
3 Commits
dev_6.7.0
...
master_融云升
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c0b126072 | ||
|
|
8cf6271dc3 | ||
|
|
0be4e3440c |
@@ -1,12 +1,18 @@
|
|||||||
apply plugin: 'com.android.library'
|
//apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
//apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
//apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
//apply plugin: 'kotlin-android-extensions'
|
||||||
|
plugins {
|
||||||
|
id 'com.android.library'
|
||||||
|
id 'kotlin-android'
|
||||||
|
id 'kotlin-parcelize'
|
||||||
|
id 'img-optimizer'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
namespace "com.yunbao.faceunity"
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@@ -33,7 +39,7 @@ android {
|
|||||||
versionName rootProject.ext.android.versionName
|
versionName rootProject.ext.android.versionName
|
||||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
@@ -48,8 +54,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
@@ -58,15 +67,15 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
api rootProject.ext.dependencies["appcompat-androidx"]
|
implementation rootProject.ext.dependencies["appcompat-androidx"]
|
||||||
api rootProject.ext.dependencies["recyclerview-androidx"]
|
implementation rootProject.ext.dependencies["recyclerview-androidx"]
|
||||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
//common
|
//common
|
||||||
api project(path: ':common')
|
implementation project(path: ':common')
|
||||||
|
|
||||||
api 'com.faceunity:core:8.7.0'
|
implementation 'com.faceunity:core:8.3.1'
|
||||||
api 'com.faceunity:model:8.7.0'
|
implementation 'com.faceunity:model:8.3.1'
|
||||||
//implementation 'com.faceunity:nama:8.3.1' //底层库-标准版
|
//implementation 'com.faceunity:nama:8.3.1' //底层库-标准版
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.yunbao.faceunity;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.test.platform.app.Instrimport com.yunbao.common.utils.MobclickAgent;ntationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.yunbao.faceunity"
|
|
||||||
>
|
>
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
@@ -11,7 +10,9 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@mipmap/ico_home_animoji"
|
android:icon="@mipmap/ico_home_animoji"
|
||||||
android:allowBackup="true">
|
android:allowBackup="true"
|
||||||
|
tools:replace="allowBackup"
|
||||||
|
>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -96,17 +96,11 @@ public class FaceManager implements SensorEventListener {
|
|||||||
faceUnityView.setIFaceUnityInter(new FaceUnityView.IFaceUnityInter() {
|
faceUnityView.setIFaceUnityInter(new FaceUnityView.IFaceUnityInter() {
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
if(onMirrorChanged!=null){
|
|
||||||
onMirrorChanged.onChange(false);
|
|
||||||
}
|
|
||||||
pauseFace = true;
|
pauseFace = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
if(onMirrorChanged!=null){
|
|
||||||
onMirrorChanged.onChange(true);
|
|
||||||
}
|
|
||||||
pauseFace = false;
|
pauseFace = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -301,18 +295,7 @@ public class FaceManager implements SensorEventListener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OnMirrorChanged onMirrorChanged;
|
|
||||||
|
|
||||||
public void setOnMirrorChanged(OnMirrorChanged onMirrorChanged) {
|
|
||||||
this.onMirrorChanged = onMirrorChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface FaceStatusChanged {
|
public interface FaceStatusChanged {
|
||||||
void onFaceChanged(int num);
|
void onFaceChanged(int num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public interface OnMirrorChanged{
|
|
||||||
void onChange(boolean falg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ public class FURenderer extends IFURenderer {
|
|||||||
|
|
||||||
|
|
||||||
/* 特效FURenderKit*/
|
/* 特效FURenderKit*/
|
||||||
public FURenderKit mFURenderKit;
|
private FURenderKit mFURenderKit;
|
||||||
|
|
||||||
/* AI道具*/
|
/* AI道具*/
|
||||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor.bundle";
|
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||||
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
|
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
|
||||||
|
|
||||||
/* GL 线程 ID */
|
/* GL 线程 ID */
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class FaceUnityConfig {
|
|||||||
|
|
||||||
/************************** 算法Model ******************************/
|
/************************** 算法Model ******************************/
|
||||||
// 人脸识别
|
// 人脸识别
|
||||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor.bundle";
|
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||||
// 手势
|
// 手势
|
||||||
public static String BUNDLE_AI_HAND = "model" + File.separator + "ai_hand_processor.bundle";
|
public static String BUNDLE_AI_HAND = "model" + File.separator + "ai_hand_processor.bundle";
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
namespace "com.samsung.android.sdk.iap.lib"
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion minSdkVersion
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
versionCode versionCode
|
versionCode rootProject.ext.android.versionCode
|
||||||
versionName versionName
|
versionName rootProject.ext.android.versionName
|
||||||
targetSdkVersion targetSdkVersion
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -18,7 +18,15 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
flatDir {
|
||||||
|
dirs 'libs', '../libs'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||||
}
|
}
|
||||||
BIN
IAP6Helper/libs/samsung-iap-6.1.1.aar
Normal file
BIN
IAP6Helper/libs/samsung-iap-6.1.1.aar
Normal file
Binary file not shown.
@@ -1,30 +1,31 @@
|
|||||||
<manifest
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.samsung.android.sdk.iap.lib"
|
|
||||||
android:versionCode="601000004"
|
android:versionCode="601000004"
|
||||||
android:versionName="6.1.0">
|
android:versionName="6.1.0">
|
||||||
<!-- version code [Major/Minor/Bug fix release/Build number ] : x xx xxx xxx -->
|
<!-- version code [Major/Minor/Bug fix release/Build number ] : x xx xxx xxx -->
|
||||||
|
|
||||||
<application>
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
tools:replace="allowBackup">
|
||||||
<!-- IAP 라이브러리 내 Activity 선언 시작-->
|
<!-- IAP 라이브러리 내 Activity 선언 시작-->
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib.activity.DialogActivity"
|
android:name="com.samsung.android.sdk.iap.lib2.activity.DialogActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity"
|
android:name="com.samsung.android.sdk.iap.lib2.activity.CheckPackageActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib.activity.AccountActivity"
|
android:name="com.samsung.android.sdk.iap.lib2.activity.AccountActivity"
|
||||||
android:theme="@style/Theme.Transparent"
|
android:theme="@style/Theme.Transparent"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib.activity.PaymentActivity"
|
android:name="com.samsung.android.sdk.iap.lib2.activity.PaymentActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
|
||||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback Interface used with {@link GetOwnedListTask}
|
|
||||||
*/
|
|
||||||
public interface OnGetOwnedListListener {
|
|
||||||
/**
|
|
||||||
* Callback method to be invoked when {@link GetOwnedListTask} has been finished.
|
|
||||||
*
|
|
||||||
* @param _errorVO
|
|
||||||
* @param _ownedList
|
|
||||||
*/
|
|
||||||
void onGetOwnedProducts(ErrorVo _errorVO, ArrayList<OwnedProductVo> _ownedList);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback Interface used with {@link GetProductsDetailsTask}
|
|
||||||
*/
|
|
||||||
public interface OnGetProductsDetailsListener {
|
|
||||||
/**
|
|
||||||
* Callback method to be invoked when {@link GetProductsDetailsTask} has been finished.
|
|
||||||
*
|
|
||||||
* @param _errorVO
|
|
||||||
* @param _productList
|
|
||||||
*/
|
|
||||||
void onGetProducts(ErrorVo _errorVO, ArrayList<ProductVo> _productList);
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.activity;
|
package com.samsung.android.sdk.iap.lib2.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-06.
|
* Created by sangbum7.kim on 2018-03-06.
|
||||||
@@ -16,12 +16,11 @@ import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
|||||||
public class AccountActivity extends Activity {
|
public class AccountActivity extends Activity {
|
||||||
private static final String TAG = AccountActivity.class.getSimpleName();
|
private static final String TAG = AccountActivity.class.getSimpleName();
|
||||||
|
|
||||||
IapHelper mIapHelper = null;
|
com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
mIapHelper = IapHelper.getInstance(this);
|
mIapHelper = IapHelper.getInstance(this);
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// 1. If IAP package is installed and valid, start SamsungAccount
|
// 1. If IAP package is installed and valid, start SamsungAccount
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.activity;
|
package com.samsung.android.sdk.iap.lib2.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@@ -8,25 +8,25 @@ import android.util.Log;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
import com.samsung.android.sdk.iap.lib2.vo.PurchaseVo;
|
||||||
|
|
||||||
|
|
||||||
public abstract class BaseActivity extends Activity {
|
public abstract class BaseActivity extends Activity {
|
||||||
private static final String TAG = BaseActivity.class.getSimpleName();
|
private static final String TAG = BaseActivity.class.getSimpleName();
|
||||||
|
|
||||||
protected ErrorVo mErrorVo = new ErrorVo();
|
protected com.samsung.android.sdk.iap.lib2.vo.ErrorVo mErrorVo = new com.samsung.android.sdk.iap.lib2.vo.ErrorVo();
|
||||||
private Dialog mProgressDialog = null;
|
private Dialog mProgressDialog = null;
|
||||||
protected PurchaseVo mPurchaseVo = null;
|
protected com.samsung.android.sdk.iap.lib2.vo.PurchaseVo mPurchaseVo = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper Class between IAPService and 3rd Party Application
|
* Helper Class between IAPService and 3rd Party Application
|
||||||
*/
|
*/
|
||||||
IapHelper mIapHelper = null;
|
com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag value to show successful pop-up. Error pop-up appears whenever it fails or not.
|
* Flag value to show successful pop-up. Error pop-up appears whenever it fails or not.
|
||||||
@@ -64,15 +64,15 @@ public abstract class BaseActivity extends Activity {
|
|||||||
public boolean checkAppsPackage(Activity _activity) {
|
public boolean checkAppsPackage(Activity _activity) {
|
||||||
// 1. If Galaxy Store is installed
|
// 1. If Galaxy Store is installed
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
if (HelperUtil.isInstalledAppsPackage(this)) {
|
if (com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isInstalledAppsPackage(this)) {
|
||||||
// 1) If Galaxy Store is enabled
|
// 1) If Galaxy Store is enabled
|
||||||
// ================================================================
|
// ================================================================
|
||||||
if (!HelperUtil.isEnabledAppsPackage(this)) {
|
if (!com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isEnabledAppsPackage(this)) {
|
||||||
HelperUtil.showEnableGalaxyStoreDialog(_activity);
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showEnableGalaxyStoreDialog(_activity);
|
||||||
// ================================================================
|
// ================================================================
|
||||||
// 2) If Galaxy Store is valid
|
// 2) If Galaxy Store is valid
|
||||||
// ================================================================
|
// ================================================================
|
||||||
} else if (HelperUtil.isValidAppsPackage(this)) {
|
} else if (com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isValidAppsPackage(this)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// Set error to notify result to third-party application
|
// Set error to notify result to third-party application
|
||||||
@@ -84,7 +84,7 @@ public abstract class BaseActivity extends Activity {
|
|||||||
R.string.dream_ph_body_contact_p1sscustomer_servicep2ss_for_more_information_n_nerror_code_c_p3ss),
|
R.string.dream_ph_body_contact_p1sscustomer_servicep2ss_for_more_information_n_nerror_code_c_p3ss),
|
||||||
"", "", ERROR_ISSUER_IAP_CLIENT + ERROR_CODE_INVALID_GALAXY_STORE);
|
"", "", ERROR_ISSUER_IAP_CLIENT + ERROR_CODE_INVALID_GALAXY_STORE);
|
||||||
mErrorVo.setError(HelperDefine.IAP_PAYMENT_IS_CANCELED, errorString);
|
mErrorVo.setError(HelperDefine.IAP_PAYMENT_IS_CANCELED, errorString);
|
||||||
HelperUtil.showInvalidGalaxyStoreDialog(this);
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showInvalidGalaxyStoreDialog(this);
|
||||||
}
|
}
|
||||||
// ================================================================
|
// ================================================================
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public abstract class BaseActivity extends Activity {
|
|||||||
// 2. If Galaxy Store is not installed
|
// 2. If Galaxy Store is not installed
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
} else {
|
} else {
|
||||||
HelperUtil.installAppsPackage(this);
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.installAppsPackage(this);
|
||||||
}
|
}
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
return false;
|
return false;
|
||||||
@@ -161,12 +161,12 @@ public abstract class BaseActivity extends Activity {
|
|||||||
else {
|
else {
|
||||||
Log.e(TAG, "finishPurchase: " + mErrorVo.dump());
|
Log.e(TAG, "finishPurchase: " + mErrorVo.dump());
|
||||||
if (mShowErrorDialog) {
|
if (mShowErrorDialog) {
|
||||||
HelperUtil.showIapErrorDialog(
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showIapErrorDialog(
|
||||||
this,
|
this,
|
||||||
getString(R.string.dream_ph_pheader_couldnt_complete_purchase),
|
getString(R.string.dream_ph_pheader_couldnt_complete_purchase),
|
||||||
mErrorVo.getErrorString(),
|
mErrorVo.getErrorString(),
|
||||||
mErrorVo.getErrorDetailsString(),
|
mErrorVo.getErrorDetailsString(),
|
||||||
new BaseDialogFragment.OnClickListener() {
|
new com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick() {
|
public void onClick() {
|
||||||
finish();
|
finish();
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.activity;
|
package com.samsung.android.sdk.iap.lib2.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-07.
|
* Created by sangbum7.kim on 2018-03-07.
|
||||||
@@ -27,12 +27,12 @@ public class CheckPackageActivity extends Activity {
|
|||||||
int DialogType = extras.getInt("DialogType");
|
int DialogType = extras.getInt("DialogType");
|
||||||
switch (DialogType) {
|
switch (DialogType) {
|
||||||
case HelperDefine.DIALOG_TYPE_INVALID_PACKAGE: {
|
case HelperDefine.DIALOG_TYPE_INVALID_PACKAGE: {
|
||||||
HelperUtil.showInvalidGalaxyStoreDialog(this);
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showInvalidGalaxyStoreDialog(this);
|
||||||
mFinishFlag = false;
|
mFinishFlag = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HelperDefine.DIALOG_TYPE_DISABLE_APPLICATION: {
|
case HelperDefine.DIALOG_TYPE_DISABLE_APPLICATION: {
|
||||||
HelperUtil.showEnableGalaxyStoreDialog(this);
|
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showEnableGalaxyStoreDialog(this);
|
||||||
mFinishFlag = false;
|
mFinishFlag = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1,16 +1,12 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.activity;
|
package com.samsung.android.sdk.iap.lib2.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ActivityNotFoundException;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-05.
|
* Created by sangbum7.kim on 2018-03-05.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.activity;
|
package com.samsung.android.sdk.iap.lib2.activity;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -9,9 +9,9 @@ import android.util.Log;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperListenerManager;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperListenerManager;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
||||||
|
|
||||||
public class PaymentActivity extends BaseActivity {
|
public class PaymentActivity extends BaseActivity {
|
||||||
private static final String TAG = PaymentActivity.class.getSimpleName();
|
private static final String TAG = PaymentActivity.class.getSimpleName();
|
||||||
@@ -56,7 +56,7 @@ public class PaymentActivity extends BaseActivity {
|
|||||||
super.preDestory();
|
super.preDestory();
|
||||||
if (isFinishing()) {
|
if (isFinishing()) {
|
||||||
OnPaymentListener onPaymentListener =
|
OnPaymentListener onPaymentListener =
|
||||||
HelperListenerManager.getInstance().getOnPaymentListener();
|
com.samsung.android.sdk.iap.lib2.helper.HelperListenerManager.getInstance().getOnPaymentListener();
|
||||||
HelperListenerManager.getInstance().setOnPaymentListener(null);
|
HelperListenerManager.getInstance().setOnPaymentListener(null);
|
||||||
if (null != onPaymentListener) {
|
if (null != onPaymentListener) {
|
||||||
onPaymentListener.onPayment(mErrorVo, mPurchaseVo);
|
onPaymentListener.onPayment(mErrorVo, mPurchaseVo);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.dialog;
|
package com.samsung.android.sdk.iap.lib2.dialog;
|
||||||
|
|
||||||
import android.app.ActionBar;
|
import android.app.ActionBar;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@@ -8,7 +8,6 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.util.Log;
|
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper;
|
package com.samsung.android.sdk.iap.lib2.helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-07-17.
|
* Created by sangbum7.kim on 2017-07-17.
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper;
|
package com.samsung.android.sdk.iap.lib2.helper;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-08-29.
|
* Created by sangbum7.kim on 2017-08-29.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper;
|
package com.samsung.android.sdk.iap.lib2.helper;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@@ -14,9 +14,9 @@ import android.text.Html;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.activity.BaseActivity;
|
import com.samsung.android.sdk.iap.lib2.activity.BaseActivity;
|
||||||
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-08-17.
|
* Created by sangbum7.kim on 2017-08-17.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper;
|
package com.samsung.android.sdk.iap.lib2.helper;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -12,20 +12,20 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity;
|
import com.samsung.android.sdk.iap.lib2.activity.CheckPackageActivity;
|
||||||
import com.samsung.android.sdk.iap.lib.activity.PaymentActivity;
|
import com.samsung.android.sdk.iap.lib2.activity.PaymentActivity;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib2.service.BaseService;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib2.service.ConsumePurchasedItems;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib2.service.OwnedProduct;
|
||||||
import com.samsung.android.sdk.iap.lib.service.BaseService;
|
import com.samsung.android.sdk.iap.lib2.service.ProductsDetails;
|
||||||
import com.samsung.android.sdk.iap.lib.service.ConsumePurchasedItems;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib.service.OwnedProduct;
|
import com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask;
|
||||||
import com.samsung.android.sdk.iap.lib.service.ProductsDetails;
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -46,9 +46,9 @@ public class IapHelper extends HelperDefine {
|
|||||||
|
|
||||||
// AsyncTask for API
|
// AsyncTask for API
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
private GetProductsDetailsTask mGetProductsDetailsTask = null;
|
private com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask mGetProductsDetailsTask = null;
|
||||||
private GetOwnedListTask mGetOwnedListTask = null;
|
private com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask mGetOwnedListTask = null;
|
||||||
private ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
private com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
||||||
private ArrayList<BaseService> mServiceQueue = new ArrayList<BaseService>();
|
private ArrayList<BaseService> mServiceQueue = new ArrayList<BaseService>();
|
||||||
@@ -267,7 +267,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
if (mIapConnector == null || mContext == null) {
|
if (mIapConnector == null || mContext == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
mGetProductsDetailsTask = new GetProductsDetailsTask(_baseService,
|
mGetProductsDetailsTask = new com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_productIDs,
|
_productIDs,
|
||||||
@@ -344,7 +344,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
if (mIapConnector == null || mContext == null) {
|
if (mIapConnector == null || mContext == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
mGetOwnedListTask = new GetOwnedListTask(_baseService,
|
mGetOwnedListTask = new com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_productType,
|
_productType,
|
||||||
@@ -417,7 +417,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
mConsumePurchasedItemsTask.cancel(true);
|
mConsumePurchasedItemsTask.cancel(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mConsumePurchasedItemsTask = new ConsumePurchasedItemsTask(_baseService,
|
mConsumePurchasedItemsTask = new com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_purchaseIds,
|
_purchaseIds,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper.task;
|
package com.samsung.android.sdk.iap.lib2.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
@@ -6,9 +6,8 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.service.BaseService;
|
||||||
import com.samsung.android.sdk.iap.lib.service.BaseService;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-09-01.
|
* Created by sangbum7.kim on 2017-09-01.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper.task;
|
package com.samsung.android.sdk.iap.lib2.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.service.ConsumePurchasedItems;
|
import com.samsung.android.sdk.iap.lib2.service.ConsumePurchasedItems;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper.task;
|
package com.samsung.android.sdk.iap.lib2.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.service.OwnedProduct;
|
import com.samsung.android.sdk.iap.lib2.service.OwnedProduct;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.helper.task;
|
package com.samsung.android.sdk.iap.lib2.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.service.ProductsDetails;
|
import com.samsung.android.sdk.iap.lib2.service.ProductsDetails;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface used with {@link GetOwnedListTask}
|
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask}
|
||||||
*/
|
*/
|
||||||
public interface OnConsumePurchasedItemsListener {
|
public interface OnConsumePurchasedItemsListener {
|
||||||
/**
|
/**
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
||||||
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
|
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask}
|
||||||
|
*/
|
||||||
|
public interface OnGetOwnedListListener {
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when {@link GetOwnedListTask} has been finished.
|
||||||
|
*
|
||||||
|
* @param _errorVO
|
||||||
|
* @param _ownedList
|
||||||
|
*/
|
||||||
|
void onGetOwnedProducts(ErrorVo _errorVO, ArrayList<OwnedProductVo> _ownedList);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
|
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
||||||
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
|
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask}
|
||||||
|
*/
|
||||||
|
public interface OnGetProductsDetailsListener {
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when {@link GetProductsDetailsTask} has been finished.
|
||||||
|
*
|
||||||
|
* @param _errorVO
|
||||||
|
* @param _productList
|
||||||
|
*/
|
||||||
|
void onGetProducts(ErrorVo _errorVO, ArrayList<ProductVo> _productList);
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface to be invoked when bind to IAPService has been finished.
|
* Callback Interface to be invoked when bind to IAPService has been finished.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
import com.samsung.android.sdk.iap.lib2.vo.PurchaseVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface to be invoked when payment has been finished.
|
* Callback Interface to be invoked when payment has been finished.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.listener;
|
package com.samsung.android.sdk.iap.lib2.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-02-28.
|
* Created by sangbum7.kim on 2018-02-28.
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.service;
|
package com.samsung.android.sdk.iap.lib2.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.activity.AccountActivity;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.activity.DialogActivity;
|
import com.samsung.android.sdk.iap.lib2.activity.AccountActivity;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.activity.DialogActivity;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-02-28.
|
* Created by sangbum7.kim on 2018-02-28.
|
||||||
@@ -18,8 +18,8 @@ import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
|||||||
public abstract class BaseService {
|
public abstract class BaseService {
|
||||||
private static final String TAG = BaseService.class.getSimpleName();
|
private static final String TAG = BaseService.class.getSimpleName();
|
||||||
|
|
||||||
protected ErrorVo mErrorVo = new ErrorVo();
|
protected com.samsung.android.sdk.iap.lib2.vo.ErrorVo mErrorVo = new com.samsung.android.sdk.iap.lib2.vo.ErrorVo();
|
||||||
protected IapHelper mIapHelper = null;
|
protected com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
||||||
protected Context mContext = null;
|
protected Context mContext = null;
|
||||||
|
|
||||||
public BaseService(IapHelper _iapHelper, Context _context) {
|
public BaseService(IapHelper _iapHelper, Context _context) {
|
||||||
@@ -28,7 +28,7 @@ public abstract class BaseService {
|
|||||||
mErrorVo.setError(HelperDefine.IAP_ERROR_INITIALIZATION, mContext.getString(R.string.mids_sapps_pop_unknown_error_occurred));
|
mErrorVo.setError(HelperDefine.IAP_ERROR_INITIALIZATION, mContext.getString(R.string.mids_sapps_pop_unknown_error_occurred));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ErrorVo getErrorVo() {
|
public com.samsung.android.sdk.iap.lib2.vo.ErrorVo getErrorVo() {
|
||||||
return mErrorVo;
|
return mErrorVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.service;
|
package com.samsung.android.sdk.iap.lib2.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class ConsumePurchasedItems extends BaseService {
|
public class ConsumePurchasedItems extends BaseService {
|
||||||
private static final String TAG = ConsumePurchasedItems.class.getSimpleName();
|
private static final String TAG = ConsumePurchasedItems.class.getSimpleName();
|
||||||
|
|
||||||
private OnConsumePurchasedItemsListener mOnConsumePurchasedItemsListener = null;
|
private com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener mOnConsumePurchasedItemsListener = null;
|
||||||
private static String mPurchaseIds = "";
|
private static String mPurchaseIds = "";
|
||||||
protected ArrayList<ConsumeVo> mConsumeList = null;
|
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.ConsumeVo> mConsumeList = null;
|
||||||
|
|
||||||
public ConsumePurchasedItems(IapHelper _iapHelper, Context _context, OnConsumePurchasedItemsListener _onConsumePurchasedItemsListener) {
|
public ConsumePurchasedItems(IapHelper _iapHelper, Context _context, OnConsumePurchasedItemsListener _onConsumePurchasedItemsListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.service;
|
package com.samsung.android.sdk.iap.lib2.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class OwnedProduct extends BaseService {
|
public class OwnedProduct extends BaseService {
|
||||||
private static final String TAG = OwnedProduct.class.getSimpleName();
|
private static final String TAG = OwnedProduct.class.getSimpleName();
|
||||||
|
|
||||||
private OnGetOwnedListListener mOnGetOwnedListListener = null;
|
private com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener mOnGetOwnedListListener = null;
|
||||||
private static String mProductType = "";
|
private static String mProductType = "";
|
||||||
protected ArrayList<OwnedProductVo> mOwnedList = null;
|
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo> mOwnedList = null;
|
||||||
|
|
||||||
public OwnedProduct(IapHelper _iapHelper, Context _context, OnGetOwnedListListener _onGetOwnedListListener) {
|
public OwnedProduct(IapHelper _iapHelper, Context _context, OnGetOwnedListListener _onGetOwnedListListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.service;
|
package com.samsung.android.sdk.iap.lib2.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class ProductsDetails extends BaseService {
|
public class ProductsDetails extends BaseService {
|
||||||
private static final String TAG = ProductsDetails.class.getSimpleName();
|
private static final String TAG = ProductsDetails.class.getSimpleName();
|
||||||
|
|
||||||
private OnGetProductsDetailsListener mOnGetProductsDetailsListener = null;
|
private com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener mOnGetProductsDetailsListener = null;
|
||||||
private static String mProductIds = "";
|
private static String mProductIds = "";
|
||||||
protected ArrayList<ProductVo> mProductsDetails = null;
|
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.ProductVo> mProductsDetails = null;
|
||||||
|
|
||||||
public ProductsDetails(IapHelper _iapHelper, Context _context, OnGetProductsDetailsListener _onGetProductsDetailsListener) {
|
public ProductsDetails(IapHelper _iapHelper, Context _context, OnGetProductsDetailsListener _onGetProductsDetailsListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
||||||
|
|
||||||
public class ErrorVo {
|
public class ErrorVo {
|
||||||
private int mErrorCode = HelperDefine.IAP_PAYMENT_IS_CANCELED;
|
private int mErrorCode = HelperDefine.IAP_PAYMENT_IS_CANCELED;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib.vo;
|
package com.samsung.android.sdk.iap.lib2.vo;
|
||||||
|
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
apply plugin: 'com.android.library'
|
//apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
//apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
//apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-parcelize'
|
//apply plugin: 'kotlin-android-extensions'
|
||||||
|
plugins {
|
||||||
|
id 'com.android.library'
|
||||||
|
id 'kotlin-android'
|
||||||
|
id 'kotlin-parcelize'
|
||||||
|
id 'img-optimizer'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
namespace "com.pdlive.shayu"
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@@ -33,7 +39,7 @@ android {
|
|||||||
versionName rootProject.ext.android.versionName
|
versionName rootProject.ext.android.versionName
|
||||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
@@ -48,8 +54,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.pdlive.shayu">
|
>
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="com.pdlive.shayu"/>
|
<package android:name="com.pdlive.shayu"/>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
tools:ignore="ExportedContentProvider" />
|
tools:ignore="ExportedContentProvider" />
|
||||||
|
|
||||||
</queries>
|
</queries>
|
||||||
<application android:allowBackup="true">
|
<application>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.facebook.FacebookActivity"
|
android:name="com.facebook.FacebookActivity"
|
||||||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||||
|
|||||||
17
Share/src/test/java/com/yunbao/share/ExampleUnitTest.java
Normal file
17
Share/src/test/java/com/yunbao/share/ExampleUnitTest.java
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
package com.yunbao.share;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
public class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
public void addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,32 +4,10 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
apply plugin: 'com.alibaba.arouter'
|
apply plugin: 'com.alibaba.arouter'
|
||||||
android {
|
android {
|
||||||
|
namespace "com.pandoralive.shayu"
|
||||||
dexOptions {
|
dexOptions {
|
||||||
jumboMode = true
|
jumboMode = true
|
||||||
}
|
}
|
||||||
project.tasks.getByName("tasks").doFirst {
|
|
||||||
|
|
||||||
}
|
|
||||||
/* flavorDimensions "packageApk"
|
|
||||||
productFlavors {
|
|
||||||
LinkTest {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://ceshi.yaoulive.com",isGooglePlay:0,isPluginModel:true]
|
|
||||||
}
|
|
||||||
LinkOfficial {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://napi.yaoulive.com",isGooglePlay:0,isPluginModel:true]
|
|
||||||
}
|
|
||||||
GoogleTest {
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://ceshi.yaoulive.com",isGooglePlay:1,isPluginModel:false]
|
|
||||||
}
|
|
||||||
GoogleOfficial{
|
|
||||||
dimension "packageApk"
|
|
||||||
manifestPlaceholders = [serverHost: "https://napi.yaoulive.com",isGooglePlay:1,isPluginModel:false]
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
/* applicationVariants.all { variant ->
|
/* applicationVariants.all { variant ->
|
||||||
variant.mergeAssetsProvider.configure {
|
variant.mergeAssetsProvider.configure {
|
||||||
doLast {
|
doLast {
|
||||||
@@ -53,9 +31,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@@ -125,8 +101,11 @@ android {
|
|||||||
|
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
println "清空build文件夹";
|
println "清空build文件夹";
|
||||||
@@ -139,32 +118,19 @@ android {
|
|||||||
processManifestTask.doLast { pm ->
|
processManifestTask.doLast { pm ->
|
||||||
String manifestPath = "build/intermediates/bundle_manifest/release/bundle-manifest/AndroidManifest.xml"
|
String manifestPath = "build/intermediates/bundle_manifest/release/bundle-manifest/AndroidManifest.xml"
|
||||||
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
|
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
|
||||||
println "谷歌版本:" + isGooglePlay
|
if (file(manifestPath).exists() && isGooglePlay) {
|
||||||
println "文件存在" + file(manifestPath).exists()
|
|
||||||
println "" + (isGooglePlay != 0)
|
|
||||||
println "" + (file(manifestPath).exists() && isGooglePlay != 0)
|
|
||||||
if (file(manifestPath).exists() && isGooglePlay != 0) {
|
|
||||||
def manifestContent = file(manifestPath).getText()
|
def manifestContent = file(manifestPath).getText()
|
||||||
println "移除权限"
|
|
||||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
||||||
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
|
||||||
file(manifestPath).write(manifestContent)
|
file(manifestPath).write(manifestContent)
|
||||||
} else {
|
} else {
|
||||||
print "not Exists = " + manifestPath
|
print "not Exists = " + manifestPath
|
||||||
}
|
}
|
||||||
manifestPath = "build/intermediates/merged_manifests/release/processReleaseManifest/AndroidManifest.xml"
|
|
||||||
if (file(manifestPath).exists() && isGooglePlay != 0) {
|
|
||||||
def manifestContent = file(manifestPath).getText()
|
|
||||||
println "移除权限2"
|
|
||||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
|
||||||
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
|
||||||
file(manifestPath).write(manifestContent)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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',
|
||||||
@@ -191,7 +157,7 @@ android {
|
|||||||
]))
|
]))
|
||||||
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
||||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||||
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor.bundle',
|
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor_lite.bundle',
|
||||||
'graphics/face_beautification.bundle']))
|
'graphics/face_beautification.bundle']))
|
||||||
} else {
|
} else {
|
||||||
println "不删除bundle"
|
println "不删除bundle"
|
||||||
@@ -204,7 +170,7 @@ android {
|
|||||||
isGoogle = "谷歌"
|
isGoogle = "谷歌"
|
||||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
|
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
|
||||||
isGoogle = "Huawei"
|
isGoogle = "Huawei"
|
||||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
|
}else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
|
||||||
isGoogle = "Samsung"
|
isGoogle = "Samsung"
|
||||||
}
|
}
|
||||||
def isPlugin = "完整"
|
def isPlugin = "完整"
|
||||||
@@ -216,6 +182,7 @@ android {
|
|||||||
isTest = "正式服"
|
isTest = "正式服"
|
||||||
}
|
}
|
||||||
outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -257,8 +224,7 @@ android {
|
|||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
ndk {
|
ndk {
|
||||||
// TODO: 谷歌商城需要兼容两个平台
|
// TODO: 谷歌商城需要兼容两个平台
|
||||||
//abiFilters "armeabi-v7a", "arm64-v8a"
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
|
||||||
}
|
}
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
annotationProcessorOptions {
|
annotationProcessorOptions {
|
||||||
|
|||||||
21
app/proguard-rules.pro
vendored
21
app/proguard-rules.pro
vendored
@@ -190,15 +190,16 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
|||||||
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
|
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
|
||||||
|
|
||||||
#--------ARouter
|
#--------ARouter
|
||||||
|
|
||||||
-keep public class com.alibaba.android.arouter.**{*;}
|
|
||||||
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
||||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||||
|
|
||||||
# If you use the byType method to obtain Service, add the following rules to protect the interface:
|
# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
|
||||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||||
|
|
||||||
|
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
|
||||||
|
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||||
|
|
||||||
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
||||||
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||||
|
|
||||||
@@ -277,18 +278,6 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
|||||||
-keep class tech.sud.mgp.hello.ui.main.settings.model.** {*;}
|
-keep class tech.sud.mgp.hello.ui.main.settings.model.** {*;}
|
||||||
-keep class tech.sud.mgp.hello.ui.main.nft.model.** {*;}
|
-keep class tech.sud.mgp.hello.ui.main.nft.model.** {*;}
|
||||||
-keep class tech.sud.mgp.hello.common.event.model.** {*;}
|
-keep class tech.sud.mgp.hello.common.event.model.** {*;}
|
||||||
-keep class tech.sud.mgp.**{*;}
|
|
||||||
|
|
||||||
-keep class bitter.jnibridge.** { *; }
|
|
||||||
-keep class com.google.androidgamesdk.** { *; }
|
|
||||||
-keep class com.unity3d.** { *; }
|
|
||||||
-keep class do.do.do.** { *; }
|
|
||||||
-keep class do.if.do.** { *; }
|
|
||||||
-keep class for.do.** { *; }
|
|
||||||
-keep class if.do.do.do.** { *; }
|
|
||||||
-keep class org.fmod.** { *; }
|
|
||||||
-keep class tech.sud.** { *; }
|
|
||||||
-keep class tech.unity3d.** { *; }
|
|
||||||
|
|
||||||
-keep class com.yunbao.common.sud.** {*;}
|
-keep class com.yunbao.common.sud.** {*;}
|
||||||
|
|
||||||
@@ -306,5 +295,3 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
|||||||
|
|
||||||
-keep class com.shayu.lib_google.**{*;}
|
-keep class com.shayu.lib_google.**{*;}
|
||||||
-keep class com.shayu.lib_huawei.**{*;}
|
-keep class com.shayu.lib_huawei.**{*;}
|
||||||
|
|
||||||
-keep class io.agora.**{*;}
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="myname.pdlive.shayu">
|
>
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.CALL_PHONE"
|
android:name="android.permission.CALL_PHONE"
|
||||||
@@ -89,11 +89,6 @@
|
|||||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||||
|
|
||||||
<!-- 声网新增 -->
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
|
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="com.twitter.android" />
|
<package android:name="com.twitter.android" />
|
||||||
<package android:name="jp.naver.line.android" />
|
<package android:name="jp.naver.line.android" />
|
||||||
@@ -162,12 +157,6 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="firebase_crashlytics_collection_enabled"
|
android:name="firebase_crashlytics_collection_enabled"
|
||||||
android:value="${isUploadLog}" />
|
android:value="${isUploadLog}" />
|
||||||
<meta-data
|
|
||||||
android:name="BUILD_TIME"
|
|
||||||
android:value="${buildTime}" />
|
|
||||||
<meta-data
|
|
||||||
android:name="SW_RELEASE_MODEL"
|
|
||||||
android:value="${swReleaseModel}" />
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.openinstall.APP_KEY"
|
android:name="com.openinstall.APP_KEY"
|
||||||
android:value="smvslm" />
|
android:value="smvslm" />
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
|||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
import com.tencent.imsdk.v2.V2TIMManager;
|
||||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||||
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
||||||
import com.yunbao.common.manager.OpenAdManager;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
import com.yunbao.common.BuildConfig;
|
import com.yunbao.common.BuildConfig;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
@@ -51,11 +51,9 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.live.socket.SocketReceiveBean;
|
import com.yunbao.live.socket.SocketReceiveBean;
|
||||||
import com.yunbao.live.socket.SocketRyClient;
|
import com.yunbao.live.socket.SocketRyClient;
|
||||||
import com.yunbao.live.socket.SocketSwClient;
|
|
||||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||||
import com.yunbao.live.views.PortraitLiveManager;
|
import com.yunbao.live.views.PortraitLiveManager;
|
||||||
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
||||||
import com.yunbao.main.activity.LoginActivity;
|
|
||||||
import com.yunbao.main.activity.MsgSettActivity;
|
import com.yunbao.main.activity.MsgSettActivity;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -65,7 +63,6 @@ import java.io.IOException;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.rong.imkit.config.RongConfigCenter;
|
import io.rong.imkit.config.RongConfigCenter;
|
||||||
@@ -111,31 +108,27 @@ public class AppContext extends CommonAppContext {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityDestroyed(@NonNull Activity activity) {
|
public void onActivityDestroyed(@NonNull Activity activity) {
|
||||||
AppManager.getInstance().removeActivity(activity);
|
|
||||||
for (WeakReference<Activity> reference : activities) {
|
for (WeakReference<Activity> reference : activities) {
|
||||||
if (reference.get() == activity) {
|
if (reference.get() == activity) {
|
||||||
activities.remove(reference);
|
activities.remove(reference);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AppManager.getInstance().removeActivity(activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
||||||
activities.add(new WeakReference<>(activity));
|
activities.add(new WeakReference<>(activity));
|
||||||
if (activity instanceof LoginActivity) {
|
|
||||||
AppManager.getInstance().clear();
|
|
||||||
}
|
|
||||||
CrashSaveBean.getInstance().setActivitySize(activities);
|
CrashSaveBean.getInstance().setActivitySize(activities);
|
||||||
AppManager.getInstance().addActivity(activity);
|
AppManager.getInstance().addActivity(activity);
|
||||||
OpenAdManager.getInstance().dismiss();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityStarted(@NonNull Activity activity) {
|
public void onActivityStarted(@NonNull Activity activity) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -149,7 +142,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
registerError();
|
registerError();
|
||||||
registerFirebaseCrash();
|
registerFirebaseCrash();
|
||||||
LogUtils.start(this);
|
LogUtils.start(this);
|
||||||
//DebugDialog.getInstance().setParams("初始化","启动");
|
|
||||||
sInstance = this;
|
sInstance = this;
|
||||||
L.setDeBug(BuildConfig.DEBUG);
|
L.setDeBug(BuildConfig.DEBUG);
|
||||||
AppEventsLogger.activateApp(this);
|
AppEventsLogger.activateApp(this);
|
||||||
@@ -172,20 +164,20 @@ public class AppContext extends CommonAppContext {
|
|||||||
OpenInstall.init(this);
|
OpenInstall.init(this);
|
||||||
}
|
}
|
||||||
//设置LOG开关,默认为false
|
//设置LOG开关,默认为false
|
||||||
//UMConfigure.setLogEnabled(true);
|
UMConfigure.setLogEnabled(true);
|
||||||
|
|
||||||
|
|
||||||
//友盟正式初始化
|
//友盟正式初始化
|
||||||
//UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE, "64e40ee55488fe7b3afa2c96");
|
UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE, "64e40ee55488fe7b3afa2c96");
|
||||||
|
|
||||||
//集成umeng-crash-vx.x.x.aar,则需要关闭原有统计SDK异常捕获功能
|
//集成umeng-crash-vx.x.x.aar,则需要关闭原有统计SDK异常捕获功能
|
||||||
MobclickAgent.setCatchUncaughtExceptions(false);
|
MobclickAgent.setCatchUncaughtExceptions(false);
|
||||||
//PushSDK初始化(如使用推送SDK,必须调用此方法)
|
//PushSDK初始化(如使用推送SDK,必须调用此方法)
|
||||||
|
|
||||||
//统计SDK是否支持采集在子进程中打点的自定义事件,默认不支持
|
//统计SDK是否支持采集在子进程中打点的自定义事件,默认不支持
|
||||||
//UMConfigure.setProcessEvent(true);//支持多进程打点
|
UMConfigure.setProcessEvent(true);//支持多进程打点
|
||||||
//MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
||||||
//UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
|
UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
|
||||||
|
|
||||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||||
//初始化 AndroidUtilCode
|
//初始化 AndroidUtilCode
|
||||||
@@ -206,7 +198,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
||||||
Log.e("wewe", message.getConversationType() + "112121 " + message.getContent());
|
Log.e("wewe", message.getConversationType() + "112121");
|
||||||
MessageIMManager.get(sInstance).getSystemForRongcloud(message);
|
MessageIMManager.get(sInstance).getSystemForRongcloud(message);
|
||||||
//融云直播间聊天
|
//融云直播间聊天
|
||||||
Message msg = Message.obtain();
|
Message msg = Message.obtain();
|
||||||
@@ -217,31 +209,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
if (content.getContent().contains("_method_")) {
|
if (content.getContent().contains("_method_")) {
|
||||||
msg.obj = content.getContent();
|
msg.obj = content.getContent();
|
||||||
//观众页面
|
//观众页面
|
||||||
|
|
||||||
String time = String.valueOf(new Date().getTime());
|
|
||||||
//声网
|
|
||||||
if (SocketSwClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
|
||||||
SocketSwClient.mSocketHandler.sendMessage(msg);
|
|
||||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
|
||||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
|
||||||
JSONObject map = received.getMsg().getJSONObject(0);
|
|
||||||
sendStartAnchorLive(map);
|
|
||||||
} else if (message.getTargetId().contains("v")) {
|
|
||||||
/*String contentJson = ((TextMessage) message.getContent()).getContent();
|
|
||||||
Log.e("wewe", contentJson);
|
|
||||||
SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
|
|
||||||
if (sudGameSocketImEvent.getMsg().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
sudGameSocketImEvent.getMsg().get(0).setTime(time);
|
|
||||||
Bus.get().post(sudGameSocketImEvent);*/
|
|
||||||
}
|
|
||||||
//主播页面
|
|
||||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketSwClient.mSocketHandler != null) {
|
|
||||||
SocketSwClient.mSocketHandler.sendMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
//融云
|
|
||||||
if (SocketRyClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
if (SocketRyClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||||
@@ -252,16 +219,13 @@ public class AppContext extends CommonAppContext {
|
|||||||
String contentJson = ((TextMessage) message.getContent()).getContent();
|
String contentJson = ((TextMessage) message.getContent()).getContent();
|
||||||
Log.e("wewe", contentJson);
|
Log.e("wewe", contentJson);
|
||||||
SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
|
SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
|
||||||
if (sudGameSocketImEvent.getMsg().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
sudGameSocketImEvent.getMsg().get(0).setTime(time);
|
|
||||||
Bus.get().post(sudGameSocketImEvent);
|
Bus.get().post(sudGameSocketImEvent);
|
||||||
}
|
}
|
||||||
//主播页面
|
//主播页面
|
||||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
||||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
}
|
}
|
||||||
@@ -310,7 +274,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
|
|
||||||
});
|
});
|
||||||
configSPApp();
|
configSPApp();
|
||||||
|
|
||||||
//初始化美颜SDK
|
//初始化美颜SDK
|
||||||
// FaceManager.initFaceUnity(this);
|
// FaceManager.initFaceUnity(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import androidx.core.app.NotificationManagerCompat;
|
|||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.pandoralive.shayu.R;
|
||||||
import com.shayu.phonelive.AppContext;
|
import com.shayu.phonelive.AppContext;
|
||||||
import com.tencent.rtmp.ITXLivePlayListener;
|
import com.tencent.rtmp.ITXLivePlayListener;
|
||||||
import com.tencent.rtmp.TXLiveBase;
|
import com.tencent.rtmp.TXLiveBase;
|
||||||
@@ -72,7 +73,6 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import myname.pdlive.shayu.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/17.
|
* Created by cxf on 2018/9/17.
|
||||||
@@ -113,7 +113,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
res.updateConfiguration(config, res.getDisplayMetrics());
|
res.updateConfiguration(config, res.getDisplayMetrics());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
||||||
@@ -145,11 +144,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||||
try {
|
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +229,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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import com.bumptech.glide.request.target.SimpleTarget;
|
|||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
|
import com.pandoralive.shayu.R;
|
||||||
import com.shayu.phonelive.AppContext;
|
import com.shayu.phonelive.AppContext;
|
||||||
import com.shayu.phonelive.activity.LauncherActivity;
|
import com.shayu.phonelive.activity.LauncherActivity;
|
||||||
import com.yunbao.common.bean.NotificationMsgBean;
|
import com.yunbao.common.bean.NotificationMsgBean;
|
||||||
@@ -51,7 +52,6 @@ import io.rong.imlib.ConnectChangeReceiver;
|
|||||||
import io.rong.push.PushType;
|
import io.rong.push.PushType;
|
||||||
import io.rong.push.notification.PushMessageReceiver;
|
import io.rong.push.notification.PushMessageReceiver;
|
||||||
import io.rong.push.notification.PushNotificationMessage;
|
import io.rong.push.notification.PushNotificationMessage;
|
||||||
import myname.pdlive.shayu.R;
|
|
||||||
|
|
||||||
public class CustomMessageReceiver extends PushMessageReceiver {
|
public class CustomMessageReceiver extends PushMessageReceiver {
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ apply plugin: 'img-optimizer'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
targetSdk rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@@ -31,7 +31,7 @@ android {
|
|||||||
versionName rootProject.ext.android.versionName
|
versionName rootProject.ext.android.versionName
|
||||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64"
|
abiFilters "armeabi-v7a","arm64-v8a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -42,8 +42,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.yunbao.baidu"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ apply plugin: 'img-optimizer'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
targetSdk rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@@ -31,7 +31,7 @@ android {
|
|||||||
versionName rootProject.ext.android.versionName
|
versionName rootProject.ext.android.versionName
|
||||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64"
|
abiFilters "armeabi-v7a","arm64-v8a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
@@ -45,8 +45,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.yunbao.beauty"/>
|
/>
|
||||||
|
|||||||
23
build.gradle
23
build.gradle
@@ -4,27 +4,28 @@ apply from: "dependencies.gradle"
|
|||||||
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.20'
|
ext.kotlin_version = '1.8.22'
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://mvn.mob.com/android" }
|
maven { url "https://mvn.mob.com/android" }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||||
maven {url 'https://developer.huawei.com/repo/'}
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
|
maven { url "https://jitpack.io" }
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.0.2'
|
classpath 'com.android.tools.build:gradle:8.3.1'
|
||||||
//一键压缩png工具
|
//一键压缩png工具
|
||||||
classpath 'com.chenenyu:img-optimizer:1.3.0'
|
classpath 'com.chenenyu:img-optimizer:1.3.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22"
|
||||||
classpath 'com.google.gms:google-services:4.3.3'
|
classpath 'com.google.gms:google-services:4.3.3'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||||
classpath "com.alibaba:arouter-register:1.0.2"
|
classpath "com.github.jadepeakpoet.ARouter:arouter-register:1.0.3"
|
||||||
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,9 +41,9 @@ allprojects {
|
|||||||
maven { url "https://mvn.mob.com/android" }
|
maven { url "https://mvn.mob.com/android" }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
maven { url 'http://developer.huawei.com/repo'}//华为库
|
maven { url 'https://developer.huawei.com/repo'}//华为库
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||||
google() // Google's Maven repository
|
google() // Google's Maven repository
|
||||||
@@ -52,10 +53,4 @@ allprojects {
|
|||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
ext {
|
|
||||||
IS_PUBLISH_LOCAL=true
|
|
||||||
LIB_VERSION="1.0.6"
|
|
||||||
AGORA_RTC_SDK= 'io.agora.rtc:agora-special-full:4.2.6.12'
|
|
||||||
// AGORA_RTC_SDK= "${rootProject.rootDir.absolutePath}/sdk"
|
|
||||||
// AGORA_RTC_SDK="io.agora.rtc:full-sdk:4.2.6"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
namespace "com.yunbao.common"
|
||||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
compileSdk rootProject.ext.android.compileSdkVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
@@ -14,7 +13,7 @@ android {
|
|||||||
versionName rootProject.ext.android.versionName
|
versionName rootProject.ext.android.versionName
|
||||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,8 +53,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_18
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_18
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
@@ -134,9 +136,6 @@ dependencies {
|
|||||||
//鲁班
|
//鲁班
|
||||||
api rootProject.ext.dependencies["Luban"]
|
api rootProject.ext.dependencies["Luban"]
|
||||||
|
|
||||||
//工具
|
|
||||||
api rootProject.ext.dependencies["blank-utilcode"]
|
|
||||||
|
|
||||||
//一个Picker控件,选择日期,城市用
|
//一个Picker控件,选择日期,城市用
|
||||||
api files('libs/AndroidPicker-1.5.6.jar')
|
api files('libs/AndroidPicker-1.5.6.jar')
|
||||||
|
|
||||||
@@ -162,14 +161,14 @@ dependencies {
|
|||||||
//腾讯im
|
//腾讯im
|
||||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||||
api 'com.google.code.gson:gson:2.8.8'
|
api 'com.google.code.gson:gson:2.8.8'
|
||||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
api 'cn.rongcloud.sdk:rtc_lib:5.6.9' // 音视频通话基础能力库
|
||||||
//此处以集成 5.1.2 版本为例
|
//此处以集成 5.1.2 版本为例
|
||||||
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
api 'cn.rongcloud.sdk:im_lib:5.6.10'
|
||||||
|
|
||||||
//此处以集成 5.1.2 版本为例
|
//此处以集成 5.1.2 版本为例
|
||||||
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
api 'cn.rongcloud.sdk:im_kit:5.6.10' // 即时通讯 UI 基础组件
|
||||||
//融云小视频模块
|
//融云小视频模块
|
||||||
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
api 'cn.rongcloud.sdk:sight:5.6.10'
|
||||||
api 'com.facebook.android:facebook-android-sdk:15.2.0'
|
api 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||||
implementation 'com.facebook.android:facebook-android-sdk:15.2.0'
|
implementation 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||||
|
|
||||||
@@ -204,7 +203,9 @@ dependencies {
|
|||||||
//自定义圆角图片
|
//自定义圆角图片
|
||||||
api 'com.makeramen:roundedimageview:2.3.0'
|
api 'com.makeramen:roundedimageview:2.3.0'
|
||||||
// 友盟统计SDK
|
// 友盟统计SDK
|
||||||
// api(name: 'umeng-common-9.6.8+000', ext: 'aar')
|
api 'com.umeng.umsdk:common:9.6.3'// 必选
|
||||||
|
api 'com.umeng.umsdk:asms:1.8.0'// 必选
|
||||||
|
api 'com.umeng.umsdk:uyumao:1.1.2'
|
||||||
//高级运营分析功能依赖库,使用卸载分析、开启反作弊能力请务必集成,以免影响高级功能使用。common需搭配v9.6.3及以上版本,asms需搭配v1.7.0及以上版本。需更新隐私声明。
|
//高级运营分析功能依赖库,使用卸载分析、开启反作弊能力请务必集成,以免影响高级功能使用。common需搭配v9.6.3及以上版本,asms需搭配v1.7.0及以上版本。需更新隐私声明。
|
||||||
// 标准版本SudMGP SDK
|
// 标准版本SudMGP SDK
|
||||||
api 'tech.sud.mgp:SudMGP:1.3.3.1158'
|
api 'tech.sud.mgp:SudMGP:1.3.3.1158'
|
||||||
@@ -215,22 +216,18 @@ dependencies {
|
|||||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||||
|
|
||||||
//华为支付插件包
|
//华为支付插件包
|
||||||
//api project(':lib_huawei')
|
// api project(':lib_huawei')
|
||||||
|
|
||||||
//google插件包
|
//google插件包
|
||||||
api project(':lib_google')
|
api project(':lib_google')
|
||||||
|
|
||||||
//samsung插件包
|
//samsung插件包
|
||||||
api project(':IAP6Helper')
|
//api project(':IAP6Helper')
|
||||||
|
|
||||||
//文字渐变色
|
//文字渐变色
|
||||||
api 'com.github.FlyJingFish:GradientTextView:1.2.4'
|
api 'com.github.FlyJingFish:GradientTextView:1.2.4'
|
||||||
//轮播 一屏显示多个
|
//轮播 一屏显示多个
|
||||||
api 'com.github.xiaohaibin:XBanner:androidx_v1.2.6'
|
api 'com.github.xiaohaibin:XBanner:androidx_v1.2.6'
|
||||||
//声网SDK
|
|
||||||
//api 'io.agora.rtc:agora-special-full:4.2.6.245'
|
|
||||||
|
|
||||||
//ExoPlayer,腾讯的播放器不支持无缝切换
|
|
||||||
api 'com.google.android.exoplayer:exoplayer:2.18.2'
|
|
||||||
api 'com.google.android.exoplayer:exoplayer-core:2.18.2@aar'
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
common/libs/samsung-iap-6.1.1.aar
Normal file
BIN
common/libs/samsung-iap-6.1.1.aar
Normal file
Binary file not shown.
@@ -1,11 +1,14 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.yunbao.common">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
|
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />-->
|
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />-->
|
||||||
|
|
||||||
<application android:allowBackup="true">
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
tools:replace="allowBackup"
|
||||||
|
>
|
||||||
|
|
||||||
<!-- <meta-data-->
|
<!-- <meta-data-->
|
||||||
<!-- android:name="com.google.ar.core"-->
|
<!-- android:name="com.google.ar.core"-->
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ public class CommonAppConfig {
|
|||||||
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
|
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
|
||||||
//是否为插件包模式
|
//是否为插件包模式
|
||||||
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 boolean IS_SW_RELEASE = getMetaDataBoolean("SW_RELEASE_MODEL");
|
|
||||||
|
|
||||||
//外部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();
|
||||||
@@ -78,30 +76,7 @@ public class CommonAppConfig {
|
|||||||
public static boolean isGetNewWrap = false;//是否获取到新的包裹礼物
|
public static boolean isGetNewWrap = false;//是否获取到新的包裹礼物
|
||||||
public static int alert_time = 1;
|
public static int alert_time = 1;
|
||||||
public static int alert_end_time = 1;
|
public static int alert_end_time = 1;
|
||||||
public static String SWToken = ""; //声网Token
|
|
||||||
public static final String SWChannelPrefix = "g";
|
|
||||||
//测试服
|
|
||||||
public static final String SWAPPId_debug = "4cf0376582d742ac8a96778b25b1079e";
|
|
||||||
//正式服
|
|
||||||
public static final String SWAPPId = "d4a5879524d74c20a7bdd667b0f2ca21";
|
|
||||||
|
|
||||||
public static String getSwAppId() {
|
|
||||||
if (IS_SW_RELEASE) {
|
|
||||||
return SWAPPId;
|
|
||||||
} else {
|
|
||||||
return SWAPPId_debug;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取通道
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getChannelName() {
|
|
||||||
return SWChannelPrefix + getInstance().getUid();
|
|
||||||
}
|
|
||||||
|
|
||||||
private CommonAppConfig() {
|
private CommonAppConfig() {
|
||||||
|
|
||||||
@@ -144,7 +119,8 @@ public class CommonAppConfig {
|
|||||||
|
|
||||||
public String getUid() {
|
public String getUid() {
|
||||||
if (TextUtils.isEmpty(mUid)) {
|
if (TextUtils.isEmpty(mUid)) {
|
||||||
String[] uidAndToken = SpUtil.getInstance().getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
|
String[] uidAndToken = SpUtil.getInstance()
|
||||||
|
.getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
|
||||||
if (uidAndToken != null) {
|
if (uidAndToken != null) {
|
||||||
if (!TextUtils.isEmpty(uidAndToken[0]) && !TextUtils.isEmpty(uidAndToken[1])) {
|
if (!TextUtils.isEmpty(uidAndToken[0]) && !TextUtils.isEmpty(uidAndToken[1])) {
|
||||||
mUid = uidAndToken[0];
|
mUid = uidAndToken[0];
|
||||||
@@ -335,7 +311,9 @@ public class CommonAppConfig {
|
|||||||
mUid = null;
|
mUid = null;
|
||||||
mToken = null;
|
mToken = null;
|
||||||
mLoginIM = false;
|
mLoginIM = false;
|
||||||
SpUtil.getInstance().removeValue(SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN);
|
SpUtil.getInstance().removeValue(
|
||||||
|
SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -371,7 +349,12 @@ public class CommonAppConfig {
|
|||||||
mProvince = null;
|
mProvince = null;
|
||||||
mCity = null;
|
mCity = null;
|
||||||
mDistrict = null;
|
mDistrict = null;
|
||||||
SpUtil.getInstance().removeValue(SpUtil.LOCATION_LNG, SpUtil.LOCATION_LAT, SpUtil.LOCATION_PROVINCE, SpUtil.LOCATION_CITY, SpUtil.LOCATION_DISTRICT);
|
SpUtil.getInstance().removeValue(
|
||||||
|
SpUtil.LOCATION_LNG,
|
||||||
|
SpUtil.LOCATION_LAT,
|
||||||
|
SpUtil.LOCATION_PROVINCE,
|
||||||
|
SpUtil.LOCATION_CITY,
|
||||||
|
SpUtil.LOCATION_DISTRICT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,8 +202,6 @@ public class Constants {
|
|||||||
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
||||||
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
||||||
|
|
||||||
public static final String PrankSendData = "PrankSendData";//整蛊进度
|
|
||||||
|
|
||||||
public static final int SOCKET_WHAT_CONN = 0;
|
public static final int SOCKET_WHAT_CONN = 0;
|
||||||
public static final int SOCKET_WHAT_DISCONN = 2;
|
public static final int SOCKET_WHAT_DISCONN = 2;
|
||||||
public static final int SOCKET_WHAT_BROADCAST = 1;
|
public static final int SOCKET_WHAT_BROADCAST = 1;
|
||||||
@@ -269,15 +267,11 @@ public class Constants {
|
|||||||
public static final String LIVE_PK_RANDOM_START="RankingStartRandomPK";
|
public static final String LIVE_PK_RANDOM_START="RankingStartRandomPK";
|
||||||
public static final int LIVE_SDK_KSY = 0;//金山推流
|
public static final int LIVE_SDK_KSY = 0;//金山推流
|
||||||
public static final int LIVE_SDK_TX = 1;//腾讯推流
|
public static final int LIVE_SDK_TX = 1;//腾讯推流
|
||||||
public static final int LIVE_SDK_SW = 2;//声网
|
|
||||||
|
|
||||||
public static final String LIVE_SDK_IS_SW = "liveSdkIsSw"; //是否是聲網
|
|
||||||
|
|
||||||
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
|
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
|
||||||
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
|
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
|
||||||
|
|
||||||
public static final String SOCKET_LIVE_ANCHOR_PK_DIALOG="GuildCompetitionNotice";//公会赛弹窗
|
|
||||||
|
|
||||||
//视频举报获取位置
|
//视频举报获取位置
|
||||||
public static int xIndex = 0;
|
public static int xIndex = 0;
|
||||||
public static int yindex = 0;
|
public static int yindex = 0;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class HtmlConfig {
|
|||||||
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
||||||
|
|
||||||
//在线商城
|
//在线商城
|
||||||
public static final String SHOP = CommonAppConfig.HOST + "/h5/shop/index.html";
|
public static final String SHOP = CommonAppConfig.HOST + "/h5/shoppingMall.html";
|
||||||
|
|
||||||
//社区
|
//社区
|
||||||
public static final String ENCOURAGE = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ";
|
public static final String ENCOURAGE = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ";
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import android.content.Intent;
|
|||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.Typeface;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -25,12 +24,13 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.LifeCycleListener;
|
import com.yunbao.common.interfaces.LifeCycleListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.ClickUtil;
|
import com.yunbao.common.utils.ClickUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -92,8 +92,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
protected void main() {
|
protected void main() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
protected void create(){
|
||||||
protected void create() {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,17 +107,6 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setTitleBold(boolean bold) {
|
|
||||||
TextView titleView = (TextView) findViewById(R.id.titleView);
|
|
||||||
if (titleView != null) {
|
|
||||||
if (bold) {
|
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
|
||||||
} else {
|
|
||||||
titleView.setTypeface(Typeface.DEFAULT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void backClick(View v) {
|
public void backClick(View v) {
|
||||||
if (v.getId() == R.id.btn_back) {
|
if (v.getId() == R.id.btn_back) {
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
@@ -193,14 +181,14 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
//友盟统计
|
//友盟统计
|
||||||
// MobclickAgent.onResume(this);
|
// MobclickAgent.onResume(this);
|
||||||
MobclickAgent.onPageStart(this.mTag);
|
MobclickAgent.onPageStart(this.mTag);
|
||||||
Log.e("MobclickAgent", "MobclickAgent:_onResume_" + this.mTag);
|
Log.e("MobclickAgent","MobclickAgent:_onResume_"+this.mTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
MobclickAgent.onPageEnd(this.mTag);
|
MobclickAgent.onPageEnd(this.mTag);
|
||||||
Log.e("MobclickAgent", "MobclickAgent:_onPause_" + this.mTag);
|
Log.e("MobclickAgent","MobclickAgent:_onPause_"+this.mTag);
|
||||||
if (mLifeCycleListeners != null) {
|
if (mLifeCycleListeners != null) {
|
||||||
for (LifeCycleListener listener : mLifeCycleListeners) {
|
for (LifeCycleListener listener : mLifeCycleListeners) {
|
||||||
listener.onPause();
|
listener.onPause();
|
||||||
@@ -394,12 +382,11 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public boolean isKefu(String url){
|
||||||
public boolean isKefu(String url) {
|
if(url.contains("kefu")){
|
||||||
if (url.contains("kefu")) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (url.contains("https://newkf.yaoulive.com/")) {
|
if(url.contains("https://newkf.yaoulive.com/")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return url.startsWith("https://kefu.yaoulive.com");
|
return url.startsWith("https://kefu.yaoulive.com");
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import com.lxj.xpopup.XPopup;
|
|||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.HtmlConfig;
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||||
@@ -101,6 +100,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||||
mWebView = findViewById(R.id.webView);
|
mWebView = findViewById(R.id.webView);
|
||||||
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
params.topMargin = DpUtil.dp2px(1);
|
params.topMargin = DpUtil.dp2px(1);
|
||||||
// mWebView.setLayoutParams(params);
|
// mWebView.setLayoutParams(params);
|
||||||
@@ -136,17 +136,11 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
if (url.contains("for")) {
|
if (url.contains("for")) {
|
||||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(url.startsWith(HtmlConfig.SHOP)){
|
|
||||||
//商店页不做动态变换
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||||
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
||||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||||
if (!navigationGestureEnabled(mContext)) {
|
if (!navigationGestureEnabled(mContext)) {
|
||||||
// view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -200,8 +194,6 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
mWebView.getSettings().setAllowFileAccess(true);
|
mWebView.getSettings().setAllowFileAccess(true);
|
||||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
||||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
||||||
mWebView.setHorizontalScrollBarEnabled(false);
|
|
||||||
mWebView.setVerticalScrollBarEnabled(false);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
@@ -221,9 +213,6 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
ft_title.setVisibility(View.VISIBLE);
|
ft_title.setVisibility(View.VISIBLE);
|
||||||
v_spacing.setVisibility(View.GONE);
|
v_spacing.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(!StringUtil.isEmpty(url)&&url.startsWith(HtmlConfig.SHOP)){
|
|
||||||
ft_title.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -435,7 +424,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
@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) {
|
||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -451,7 +440,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)));
|
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)));
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk),isSw);
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.BaseViewHolder> {
|
|
||||||
private Context context;
|
|
||||||
public List<T> data;
|
|
||||||
|
|
||||||
public BaseAdapter(Context context, List<T> data) {
|
|
||||||
this.context = context;
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
|
||||||
View view = LayoutInflater.from(context).inflate(getItemLayoutId(), parent, false);
|
|
||||||
return new BaseViewHolder(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(BaseAdapter.BaseViewHolder holder, int position) {
|
|
||||||
T t = data.get(position);
|
|
||||||
convert(holder, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return data == null ? 0 : data.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void convert(BaseViewHolder holder, T t);
|
|
||||||
|
|
||||||
public abstract int getItemLayoutId();
|
|
||||||
|
|
||||||
class BaseViewHolder extends RecyclerView.ViewHolder {
|
|
||||||
|
|
||||||
private HashMap<Integer,View> views;
|
|
||||||
|
|
||||||
public BaseViewHolder(View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
views = new HashMap<>();
|
|
||||||
if (onItemClickListener != null){
|
|
||||||
itemView.setOnClickListener(v ->onItemClickListener.onItemClick(getAdapterPosition()) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public View getView(int id) {
|
|
||||||
View view = views.get(id);
|
|
||||||
if (view == null) {
|
|
||||||
view = itemView.findViewById(id);
|
|
||||||
views.put(id, view);
|
|
||||||
if (onItemClickListener != null){
|
|
||||||
view.setOnClickListener(v -> {
|
|
||||||
onItemClickListener.onItemChildClick(v, getAdapterPosition());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private OnItemClickListener onItemClickListener;
|
|
||||||
|
|
||||||
private void setOnItemClickListener(OnItemClickListener onItemClickListener){
|
|
||||||
this.onItemClickListener = onItemClickListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnItemClickListener{
|
|
||||||
default void onItemClick(int position){}
|
|
||||||
|
|
||||||
default void onItemChildClick(View view,int position){}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -40,15 +40,12 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
|||||||
private final int RIGHTS_INTERESTS = 4;
|
private final int RIGHTS_INTERESTS = 4;
|
||||||
private final int RECOMMEND = 5;
|
private final int RECOMMEND = 5;
|
||||||
private String liveId;
|
private String liveId;
|
||||||
private boolean mIs_shengwang;
|
|
||||||
|
|
||||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||||
|
|
||||||
private List<CustomSidebarInfoModel> infoModels = new ArrayList<>();
|
private List<CustomSidebarInfoModel> infoModels = new ArrayList<>();
|
||||||
|
|
||||||
public CustomDrawerPopupAdapter(Context mContext,boolean mIs_shengwang) {
|
public CustomDrawerPopupAdapter(Context mContext) {
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
this.mIs_shengwang = mIs_shengwang;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -117,7 +114,6 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
|||||||
map.put("num", "9");
|
map.put("num", "9");
|
||||||
map.put("live_recommend", "sidebar");
|
map.put("live_recommend", "sidebar");
|
||||||
map.put("refresh", "1");
|
map.put("refresh", "1");
|
||||||
map.put(" is_shengwang", mIs_shengwang?"1":"0");
|
|
||||||
//推荐位
|
//推荐位
|
||||||
MainNetManager.get((Activity) mContext)
|
MainNetManager.get((Activity) mContext)
|
||||||
.anchorRecommend(map, new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
.anchorRecommend(map, new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||||
|
|||||||
@@ -1,81 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.utils.StringUtil;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.DebugViewHolder> {
|
|
||||||
HashMap<String, View> paramMap = new HashMap<>();
|
|
||||||
private Context mContext;
|
|
||||||
|
|
||||||
public DebugDialogAdapter(Context mContext) {
|
|
||||||
this.mContext = mContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParamMap(HashMap<String, View> paramMap) {
|
|
||||||
Log.i("debug弹窗", "setParamMap: 添加值到view " + paramMap.size());
|
|
||||||
this.paramMap = paramMap;
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public DebugViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
Log.i("debug弹窗", "onCreateViewHolder: 创建适配器");
|
|
||||||
return new DebugViewHolder(new LinearLayout(mContext));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull DebugViewHolder holder, int position) {
|
|
||||||
List<String> list = new ArrayList<>(paramMap.keySet());
|
|
||||||
Log.i("debug弹窗", "onBindViewHolder: 添加值到view " + list.size() + "|" + paramMap.size());
|
|
||||||
holder.setData(list.get(position), paramMap.get(list.get(position)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
Log.i("debug弹窗", "getItemCount: " + paramMap.size());
|
|
||||||
return paramMap.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DebugViewHolder extends RecyclerView.ViewHolder {
|
|
||||||
|
|
||||||
public DebugViewHolder(@NonNull View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(String msg, View view) {
|
|
||||||
Log.i("debug弹窗", "setData: 添加值到view " + view + "|" + msg + "|" + ((LinearLayout) itemView).indexOfChild(view));
|
|
||||||
if (view instanceof TextView && StringUtil.isEmpty(((TextView) view).getText().toString())) {
|
|
||||||
((TextView) view).setText(msg);
|
|
||||||
}
|
|
||||||
int indexOfChild = ((LinearLayout) itemView).indexOfChild(view);
|
|
||||||
if (indexOfChild != -1) {
|
|
||||||
if (((LinearLayout) itemView).getChildAt(indexOfChild) instanceof TextView) {
|
|
||||||
((TextView) ((LinearLayout) itemView).getChildAt(indexOfChild)).setText(msg);
|
|
||||||
} else {
|
|
||||||
((LinearLayout) itemView).removeViewAt(indexOfChild);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (view.getParent() != null) {
|
|
||||||
((ViewGroup) view.getParent()).removeView(view);
|
|
||||||
}
|
|
||||||
((LinearLayout) itemView).addView(view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.PagerSnapHelper;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by cxf on 2018/11/28.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ImagePreviewAdapter extends RecyclerView.Adapter<ImagePreviewAdapter.Vh> {
|
|
||||||
|
|
||||||
private LayoutInflater mInflater;
|
|
||||||
private ActionListener mActionListener;
|
|
||||||
private int mPageCount;
|
|
||||||
private LinearLayoutManager mLayoutManager;
|
|
||||||
private int mCurPosition;
|
|
||||||
|
|
||||||
public ImagePreviewAdapter(Context context, int pageCount) {
|
|
||||||
mPageCount = pageCount;
|
|
||||||
mInflater = LayoutInflater.from(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public Vh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
return new Vh(mInflater.inflate(R.layout.item_preview_img, parent, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull Vh vh, int position) {
|
|
||||||
vh.setData(position);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return mPageCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class Vh extends RecyclerView.ViewHolder {
|
|
||||||
|
|
||||||
ImageView mImg;
|
|
||||||
|
|
||||||
public Vh(View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
mImg = (ImageView) itemView;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setData(int position) {
|
|
||||||
if (mActionListener != null) {
|
|
||||||
mActionListener.loadImage(mImg, position);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setActionListener(ActionListener actionListener) {
|
|
||||||
mActionListener = actionListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCurPosition(int curPosition) {
|
|
||||||
mCurPosition = curPosition;
|
|
||||||
if (mActionListener != null) {
|
|
||||||
mActionListener.onPageChanged(curPosition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCurPosition(){
|
|
||||||
return mCurPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
|
||||||
super.onAttachedToRecyclerView(recyclerView);
|
|
||||||
mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
|
|
||||||
PagerSnapHelper pagerSnapHelper = new PagerSnapHelper();
|
|
||||||
pagerSnapHelper.attachToRecyclerView(recyclerView);
|
|
||||||
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
|
|
||||||
@Override
|
|
||||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
|
||||||
int position = mLayoutManager.findFirstCompletelyVisibleItemPosition();
|
|
||||||
if (position >= 0 && mCurPosition != position) {
|
|
||||||
mCurPosition = position;
|
|
||||||
if (mActionListener != null) {
|
|
||||||
mActionListener.onPageChanged(position);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface ActionListener {
|
|
||||||
void onPageChanged(int position);
|
|
||||||
|
|
||||||
void loadImage(ImageView imageView, int position);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,14 +18,10 @@ import com.yunbao.common.views.InteractionGamesChildViewHolder;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* 侧边栏游戏列表适配器,改游戏列表数量在这里改
|
|
||||||
*/
|
|
||||||
public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private boolean rigts;
|
private boolean rigts;
|
||||||
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||||
private List<CustomSidebarChildModel> srcChild = new ArrayList<>();
|
|
||||||
|
|
||||||
public InteractionGamesAdapter(Context mContext, boolean rigts) {
|
public InteractionGamesAdapter(Context mContext, boolean rigts) {
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
@@ -50,7 +46,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
|||||||
long activityID = TextUtils.isEmpty(model.getSrc()) ? 0 : Long.parseLong(model.getSrc());
|
long activityID = TextUtils.isEmpty(model.getSrc()) ? 0 : Long.parseLong(model.getSrc());
|
||||||
if (activityID != 0) {
|
if (activityID != 0) {
|
||||||
Bus.get().post(new CustomDrawerPopupEvent()
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(srcChild));
|
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(child));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +61,6 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
child.clear();
|
child.clear();
|
||||||
srcChild.clear();
|
|
||||||
if (mChild.size() > 8) {
|
if (mChild.size() > 8) {
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
child.add(mChild.get(i));
|
child.add(mChild.get(i));
|
||||||
@@ -73,7 +68,6 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
|||||||
} else {
|
} else {
|
||||||
child.addAll(mChild);
|
child.addAll(mChild);
|
||||||
}
|
}
|
||||||
srcChild.addAll(mChild);
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,14 +67,13 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
child.clear();
|
child.clear();
|
||||||
/* if (mChild.size() > 8) {
|
if (mChild.size() > 8) {
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
child.add(mChild.get(i));
|
child.add(mChild.get(i));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
child.addAll(mChild);
|
child.addAll(mChild);
|
||||||
}*/
|
}
|
||||||
child.addAll(mChild);
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机器人助手IM消息
|
* 机器人助手IM消息
|
||||||
@@ -24,9 +21,6 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
|||||||
//标签图片
|
//标签图片
|
||||||
@SerializedName("icon")
|
@SerializedName("icon")
|
||||||
private String icon;
|
private String icon;
|
||||||
@SerializedName("icon_en")
|
|
||||||
@JSONField(name = "icon_en")
|
|
||||||
private String iconEn;
|
|
||||||
//气泡背景
|
//气泡背景
|
||||||
@SerializedName("system_bubble")
|
@SerializedName("system_bubble")
|
||||||
private String systemBubble;
|
private String systemBubble;
|
||||||
@@ -41,7 +35,7 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getAiName() {
|
public String getAiName() {
|
||||||
return aiName + ":";
|
return aiName+":";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AiAutomaticSpeechModel setAiName(String aiName) {
|
public AiAutomaticSpeechModel setAiName(String aiName) {
|
||||||
@@ -53,16 +47,6 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getIconEn() {
|
|
||||||
return iconEn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AiAutomaticSpeechModel setIconEn(String iconEn) {
|
|
||||||
this.iconEn = iconEn;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AiAutomaticSpeechModel setContent(String content) {
|
public AiAutomaticSpeechModel setContent(String content) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
return this;
|
return this;
|
||||||
@@ -78,9 +62,6 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getIcon() {
|
public String getIcon() {
|
||||||
if (!WordUtil.isNewZh() && !StringUtil.isEmpty(iconEn)) {
|
|
||||||
return iconEn;
|
|
||||||
}
|
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
|
|
||||||
@SerializedName("live_battle_pass_show_status")
|
@SerializedName("live_battle_pass_show_status")
|
||||||
private int showWarOrder = 0;//是否显示首页戰令
|
private int showWarOrder = 0;//是否显示首页戰令
|
||||||
@SerializedName("live_battle_pass_image_cn")
|
|
||||||
private String battlePassImageCn;
|
|
||||||
@SerializedName("live_battle_pass_image_en")
|
|
||||||
private String battlePassImageEn;
|
|
||||||
//是否支持换一批0=不支持 1=支持
|
//是否支持换一批0=不支持 1=支持
|
||||||
|
|
||||||
@SerializedName("up_show")
|
@SerializedName("up_show")
|
||||||
@@ -62,22 +58,6 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
return listShow;
|
return listShow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBattlePassImageCn() {
|
|
||||||
return battlePassImageCn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBattlePassImageCn(String battlePassImageCn) {
|
|
||||||
this.battlePassImageCn = battlePassImageCn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBattlePassImageEn() {
|
|
||||||
return battlePassImageEn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBattlePassImageEn(String battlePassImageEn) {
|
|
||||||
this.battlePassImageEn = battlePassImageEn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AnchorRecommendModel setListShow(int listShow) {
|
public AnchorRecommendModel setListShow(int listShow) {
|
||||||
this.listShow = listShow;
|
this.listShow = listShow;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
public class AvatarBean extends BaseModel {
|
|
||||||
private String avatar;
|
|
||||||
private String avatarThumb;
|
|
||||||
|
|
||||||
public AvatarBean() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAvatar() {
|
|
||||||
return avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAvatar(String avatar) {
|
|
||||||
this.avatar = avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAvatarThumb() {
|
|
||||||
return avatarThumb;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAvatarThumb(String avatarThumb) {
|
|
||||||
this.avatarThumb = avatarThumb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@ package com.yunbao.common.bean;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.BuildConfig;
|
|
||||||
|
|
||||||
public class CheckLiveModel extends BaseModel {
|
public class CheckLiveModel extends BaseModel {
|
||||||
|
|
||||||
@@ -14,16 +13,6 @@ public class CheckLiveModel extends BaseModel {
|
|||||||
private String typeMsg;
|
private String typeMsg;
|
||||||
@SerializedName("live_sdk")
|
@SerializedName("live_sdk")
|
||||||
private String liveSdk;
|
private String liveSdk;
|
||||||
@SerializedName("is_shengwang")
|
|
||||||
private String isShengwang;
|
|
||||||
|
|
||||||
public String getIsShengwang() {
|
|
||||||
return isShengwang;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsShengwang(String isShengwang) {
|
|
||||||
this.isShengwang = isShengwang;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static CheckLiveModel objectFromData(String str) {
|
public static CheckLiveModel objectFromData(String str) {
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package com.yunbao.common.bean;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.BuildConfig;
|
|
||||||
import com.yunbao.common.utils.StringUtil;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -61,9 +59,6 @@ public class ConfigBean extends BaseModel {
|
|||||||
private String txPlayUgcLicenceUrl;//腾讯短视频鉴权
|
private String txPlayUgcLicenceUrl;//腾讯短视频鉴权
|
||||||
private String txVideoUgcKey;
|
private String txVideoUgcKey;
|
||||||
private String google_isup;
|
private String google_isup;
|
||||||
|
|
||||||
private String sud_game_speech;
|
|
||||||
|
|
||||||
@SerializedName("is_return_user")//是否需要弹窗(0否,1是)
|
@SerializedName("is_return_user")//是否需要弹窗(0否,1是)
|
||||||
private String isReturnUser="";
|
private String isReturnUser="";
|
||||||
@SerializedName("popup_img_url")//弹窗图片地址
|
@SerializedName("popup_img_url")//弹窗图片地址
|
||||||
@@ -187,20 +182,6 @@ public class ConfigBean extends BaseModel {
|
|||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isSw(){
|
|
||||||
return getSud_game_speech().equals("1");
|
|
||||||
}
|
|
||||||
|
|
||||||
@JSONField(name = "sud_game_speech")
|
|
||||||
public String getSud_game_speech() {
|
|
||||||
return sud_game_speech;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSud_game_speech(String sud_game_speech) {
|
|
||||||
this.sud_game_speech = sud_game_speech;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JSONField(name = "apk_ver")
|
@JSONField(name = "apk_ver")
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return version;
|
return version;
|
||||||
|
|||||||
@@ -114,17 +114,6 @@ public class EnterRoomInfoModel extends BaseModel {
|
|||||||
@SerializedName("gift_wall_lighten_total")
|
@SerializedName("gift_wall_lighten_total")
|
||||||
private String giftWallLightenTotal;
|
private String giftWallLightenTotal;
|
||||||
|
|
||||||
@SerializedName("connection_info")
|
|
||||||
private LivePkMicModel connectionInfo;
|
|
||||||
|
|
||||||
public LivePkMicModel getConnectionInfo() {
|
|
||||||
return connectionInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConnectionInfo(LivePkMicModel connectionInfo) {
|
|
||||||
this.connectionInfo = connectionInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGiftWallLightenNumber() {
|
public String getGiftWallLightenNumber() {
|
||||||
return giftWallLightenNumber;
|
return giftWallLightenNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public class EnterRoomNewModel extends BaseModel {
|
|||||||
private SudGameDateModel sudGameDateModel;
|
private SudGameDateModel sudGameDateModel;
|
||||||
@SerializedName("quick_gift_remaining_quantity")
|
@SerializedName("quick_gift_remaining_quantity")
|
||||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||||
|
|
||||||
@SerializedName("if_viewing_duration_complete")
|
@SerializedName("if_viewing_duration_complete")
|
||||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||||
@SerializedName("sendMoneyLongStatus")
|
@SerializedName("sendMoneyLongStatus")
|
||||||
|
|||||||
@@ -7,21 +7,12 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class LiveBattlePassRewardsBean extends BaseModel{
|
public class LiveBattlePassRewardsBean extends BaseModel{
|
||||||
private int level;
|
private int level;
|
||||||
private int is_received;
|
|
||||||
private List<BattlePassType> live_battle_pass_type;
|
private List<BattlePassType> live_battle_pass_type;
|
||||||
private Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards;
|
private Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards;
|
||||||
|
|
||||||
public LiveBattlePassRewardsBean() {
|
public LiveBattlePassRewardsBean() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIs_received() {
|
|
||||||
return is_received;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIs_received(int is_received) {
|
|
||||||
this.is_received = is_received;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getLevel() {
|
public int getLevel() {
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class LivePkMicModel extends BaseModel {
|
|
||||||
@SerializedName("pkuid")
|
|
||||||
private String pkuid;
|
|
||||||
@SerializedName("pkuname")
|
|
||||||
private String pkuname;
|
|
||||||
@SerializedName("pkuimg")
|
|
||||||
private String pkuimg;
|
|
||||||
|
|
||||||
public String getPkuid() {
|
|
||||||
return pkuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPkuid(String pkuid) {
|
|
||||||
this.pkuid = pkuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPkuname() {
|
|
||||||
return pkuname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPkuname(String pkuname) {
|
|
||||||
this.pkuname = pkuname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPkuimg() {
|
|
||||||
return pkuimg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPkuimg(String pkuimg) {
|
|
||||||
this.pkuimg = pkuimg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@ package com.yunbao.common.bean;
|
|||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@@ -21,8 +22,6 @@ public class OpenAdModel extends BaseModel {
|
|||||||
public static final int SHOW_ONE = 3;//3. 仅弹出一次;
|
public static final int SHOW_ONE = 3;//3. 仅弹出一次;
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private int id;
|
private int id;
|
||||||
@SerializedName("popup_name")
|
|
||||||
private String name;
|
|
||||||
@SerializedName("popup_location")
|
@SerializedName("popup_location")
|
||||||
private int type = TYPE_HOME;
|
private int type = TYPE_HOME;
|
||||||
@SerializedName("activity_url")
|
@SerializedName("activity_url")
|
||||||
@@ -36,27 +35,24 @@ public class OpenAdModel extends BaseModel {
|
|||||||
@SerializedName("popup_model")
|
@SerializedName("popup_model")
|
||||||
private int model = MODEL_SQUARE;
|
private int model = MODEL_SQUARE;
|
||||||
@SerializedName("start_show_time")
|
@SerializedName("start_show_time")
|
||||||
private String startTime;//活动开始时间 1
|
private String startTime;//活动开始时间
|
||||||
@SerializedName("end_show_time")
|
@SerializedName("end_show_time")
|
||||||
private String endTime;//活动结束时间 5
|
private String endTime;//活动结束时间
|
||||||
@SerializedName("popup_permission")
|
@SerializedName("popup_permission")
|
||||||
private int permission;
|
private int permission;
|
||||||
@SerializedName("popup_frequency")
|
@SerializedName("popup_frequency")
|
||||||
private int showModel = SHOW_DEF;//显示模式,1:杀死程序后弹出 2:指定时间内(本机时间) 3:1. 仅弹出一次
|
private int showModel = SHOW_DEF;//显示模式,1:杀死程序后弹出 2:指定时间内(本机时间) 3:1. 仅弹出一次
|
||||||
@SerializedName("popup_frequency_time")
|
@SerializedName("popup_frequency_time")
|
||||||
private String section = "0";// SHOW_DEF = 2 1
|
private String section = "0";// SHOW_DEF = 2
|
||||||
@SerializedName("popup_sort")
|
|
||||||
private int popupSort = 1;//弹框类型 1.图片 2.H5
|
|
||||||
@SerializedName("sort")
|
|
||||||
private int sort = 0;
|
|
||||||
|
|
||||||
public OpenAdModel() {
|
public OpenAdModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OpenAdModel createTestData() {
|
public static OpenAdModel createTestData() {
|
||||||
OpenAdModel model = new OpenAdModel();
|
OpenAdModel model = new OpenAdModel();
|
||||||
model.id = 3;
|
model.id=3;
|
||||||
model.type = 1;
|
model.type=1;
|
||||||
model.url = "/h5/GuildTournament/20230821/rank.html";
|
model.url = "/h5/GuildTournament/20230821/rank.html";
|
||||||
model.imageUrl = "https://ceshi.yaoulive.com/data/upload/20230913/1694589490.png";
|
model.imageUrl = "https://ceshi.yaoulive.com/data/upload/20230913/1694589490.png";
|
||||||
model.showTime = 10;
|
model.showTime = 10;
|
||||||
@@ -70,30 +66,6 @@ public class OpenAdModel extends BaseModel {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPopupSort() {
|
|
||||||
return popupSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSort() {
|
|
||||||
return sort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSort(int sort) {
|
|
||||||
this.sort = sort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPopupSort(int popupSort) {
|
|
||||||
this.popupSort = popupSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getShowModel() {
|
public int getShowModel() {
|
||||||
return showModel;
|
return showModel;
|
||||||
}
|
}
|
||||||
@@ -119,13 +91,12 @@ public class OpenAdModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
if (!url.startsWith("http://") || !url.startsWith("https://")) {
|
||||||
url = CommonAppConfig.HOST + (url.startsWith("/") ? url : "/" + url);
|
url = CommonAppConfig.HOST + url;
|
||||||
}
|
}
|
||||||
return url;
|
return url + "?t=" + System.currentTimeMillis() / 1000;
|
||||||
}
|
}
|
||||||
|
public String getOriginalUrl(){
|
||||||
public String getOriginalUrl() {
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +198,6 @@ public class OpenAdModel extends BaseModel {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "OpenAdModel{" +
|
return "OpenAdModel{" +
|
||||||
"id=" + id +
|
"id=" + id +
|
||||||
", name='" + name + '\'' +
|
|
||||||
", type=" + type +
|
", type=" + type +
|
||||||
", url='" + url + '\'' +
|
", url='" + url + '\'' +
|
||||||
", imageUrl='" + imageUrl + '\'' +
|
", imageUrl='" + imageUrl + '\'' +
|
||||||
@@ -236,10 +206,7 @@ public class OpenAdModel extends BaseModel {
|
|||||||
", model=" + model +
|
", model=" + model +
|
||||||
", startTime='" + startTime + '\'' +
|
", startTime='" + startTime + '\'' +
|
||||||
", endTime='" + endTime + '\'' +
|
", endTime='" + endTime + '\'' +
|
||||||
", permission=" + permission +
|
", permission='" + permission + '\'' +
|
||||||
", showModel=" + showModel +
|
|
||||||
", section='" + section + '\'' +
|
|
||||||
", sort=" + popupSort +
|
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,15 +56,4 @@ public class PrankGiftBean extends BaseModel{
|
|||||||
public void setGiftId(String giftId) {
|
public void setGiftId(String giftId) {
|
||||||
this.giftId = giftId;
|
this.giftId = giftId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "PrankGiftBean{" +
|
|
||||||
"title='" + title + '\'' +
|
|
||||||
", name='" + name + '\'' +
|
|
||||||
", icon='" + icon + '\'' +
|
|
||||||
", num=" + num +
|
|
||||||
", giftId='" + giftId + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class PrankGiftResultBean extends BaseModel{
|
|
||||||
private List<PrankGiftBean> prank_list;
|
|
||||||
private String status;
|
|
||||||
private String prank_type;
|
|
||||||
|
|
||||||
public List<PrankGiftBean> getPrank_list() {
|
|
||||||
return prank_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_list(List<PrankGiftBean> prank_list) {
|
|
||||||
this.prank_list = prank_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrank_type() {
|
|
||||||
return prank_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_type(String prank_type) {
|
|
||||||
this.prank_type = prank_type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,176 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class PrankProgressBean extends BaseModel {
|
|
||||||
private int status;//整蛊状态 0.关闭 1.开启
|
|
||||||
private int prank_turntable_status;// 转盘整蛊状态 0=关闭 1=开启
|
|
||||||
private int prank_type;// 整蛊类型 1.礼物整蛊 2.连击整蛊
|
|
||||||
private List<PrankList> prank_list;// 整蛊进度
|
|
||||||
private List<PrankList> completed_list;// 待完成的整蛊
|
|
||||||
|
|
||||||
public PrankProgressBean(){
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static class PrankList{
|
|
||||||
private int gift_id;// 礼物ID
|
|
||||||
private int gift_num;// 整蛊需要的礼物数量
|
|
||||||
private String prank_content; // 整蛊内容
|
|
||||||
private int send_num; // 用户已赠送的礼物数量
|
|
||||||
private int completed_num;// 待完成的整蛊次数
|
|
||||||
private String gift_name;// 礼物名称
|
|
||||||
private String gift_icon; // 礼物图片链接
|
|
||||||
|
|
||||||
private String gift_name_en;
|
|
||||||
|
|
||||||
private int continuous_click_num;
|
|
||||||
|
|
||||||
public int getContinuous_click_num() {
|
|
||||||
return continuous_click_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContinuous_click_num(int continuous_click_num) {
|
|
||||||
this.continuous_click_num = continuous_click_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGift_name_en() {
|
|
||||||
return gift_name_en;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGift_name_en(String gift_name_en) {
|
|
||||||
this.gift_name_en = gift_name_en;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getGift_id() {
|
|
||||||
return gift_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGift_id(int gift_id) {
|
|
||||||
this.gift_id = gift_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getGift_num() {
|
|
||||||
return gift_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGift_num(int gift_num) {
|
|
||||||
this.gift_num = gift_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrank_content() {
|
|
||||||
return prank_content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_content(String prank_content) {
|
|
||||||
this.prank_content = prank_content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSend_num() {
|
|
||||||
return send_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSend_num(int send_num) {
|
|
||||||
this.send_num = send_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCompleted_num() {
|
|
||||||
return completed_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCompleted_num(int completed_num) {
|
|
||||||
this.completed_num = completed_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGift_name() {
|
|
||||||
return gift_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGift_name(String gift_name) {
|
|
||||||
this.gift_name = gift_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGift_icon() {
|
|
||||||
return gift_icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGift_icon(String gift_icon) {
|
|
||||||
this.gift_icon = gift_icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
//计算完成度
|
|
||||||
public double getCompletionRate() {
|
|
||||||
if (gift_num == 0) return 0; // Avoid division by zero
|
|
||||||
return (double) send_num / gift_num;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "PrankList{" +
|
|
||||||
"gift_id=" + gift_id +
|
|
||||||
", gift_num=" + gift_num +
|
|
||||||
", prank_content='" + prank_content + '\'' +
|
|
||||||
", send_num=" + send_num +
|
|
||||||
", completed_num=" + completed_num +
|
|
||||||
", gift_name='" + gift_name + '\'' +
|
|
||||||
", gift_icon='" + gift_icon + '\'' +
|
|
||||||
", gift_name_en='" + gift_name_en + '\'' +
|
|
||||||
", continuous_click_num=" + continuous_click_num +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(int status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPrank_type() {
|
|
||||||
return prank_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_type(int prank_type) {
|
|
||||||
this.prank_type = prank_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PrankList> getPrank_list() {
|
|
||||||
return prank_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_list(List<PrankList> prank_list) {
|
|
||||||
this.prank_list = prank_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PrankList> getCompleted_list() {
|
|
||||||
return completed_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCompleted_list(List<PrankList> completed_list) {
|
|
||||||
this.completed_list = completed_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPrank_turntable_status() {
|
|
||||||
return prank_turntable_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrank_turntable_status(int prank_turntable_status) {
|
|
||||||
this.prank_turntable_status = prank_turntable_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "PrankProgressBean{" +
|
|
||||||
"status=" + status +
|
|
||||||
", prank_turntable_status=" + prank_turntable_status +
|
|
||||||
", prank_type=" + prank_type +
|
|
||||||
", prank_list=" + prank_list +
|
|
||||||
", completed_list=" + completed_list +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,16 +49,6 @@ public class RedPacketInfoModel extends BaseModel {
|
|||||||
//超级红包ID
|
//超级红包ID
|
||||||
@SerializedName("super_jackpot_id")
|
@SerializedName("super_jackpot_id")
|
||||||
private String superJackpotId;
|
private String superJackpotId;
|
||||||
@SerializedName("red_packet_type")
|
|
||||||
private int redPacketType;// 1.普通红包 2.特殊红包
|
|
||||||
|
|
||||||
public int getRedPacketType() {
|
|
||||||
return redPacketType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRedPacketType(int redPacketType) {
|
|
||||||
this.redPacketType = redPacketType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSuperJackpotId() {
|
public String getSuperJackpotId() {
|
||||||
return superJackpotId;
|
return superJackpotId;
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 声网token
|
|
||||||
*/
|
|
||||||
public class SwTokenModel extends BaseModel {
|
|
||||||
private String token;
|
|
||||||
|
|
||||||
public SwTokenModel() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public SwTokenModel(String token) {
|
|
||||||
this.token = token;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getToken() {
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setToken(String token) {
|
|
||||||
this.token = token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -67,6 +67,7 @@ public class UserBean implements Parcelable {
|
|||||||
//随机天梯排位赛PK img,仅在主播PK时使用
|
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||||
private String mRankPkImgUrl;
|
private String mRankPkImgUrl;
|
||||||
//是否填写完整资料
|
//是否填写完整资料
|
||||||
|
@SerializedName("user_info_complete")
|
||||||
private int user_info_complete;
|
private int user_info_complete;
|
||||||
//粉丝团等级
|
//粉丝团等级
|
||||||
private int fansLevel;
|
private int fansLevel;
|
||||||
@@ -109,6 +110,14 @@ public class UserBean implements Parcelable {
|
|||||||
return user_info_complete;
|
return user_info_complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getUser_info_complete() {
|
||||||
|
return user_info_complete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_info_complete(int user_info_complete) {
|
||||||
|
this.user_info_complete = user_info_complete;
|
||||||
|
}
|
||||||
|
|
||||||
public UserBean seUserInfoComplete(int userInfoComplete) {
|
public UserBean seUserInfoComplete(int userInfoComplete) {
|
||||||
this.user_info_complete = userInfoComplete;
|
this.user_info_complete = userInfoComplete;
|
||||||
return this;
|
return this;
|
||||||
@@ -865,20 +874,11 @@ public class UserBean implements Parcelable {
|
|||||||
private String medal;
|
private String medal;
|
||||||
private String bubble;
|
private String bubble;
|
||||||
private String medal_new;
|
private String medal_new;
|
||||||
private String medal_new_en;
|
|
||||||
|
|
||||||
public String getMedal_new() {
|
public String getMedal_new() {
|
||||||
return medal_new;
|
return medal_new;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMedal_new_en() {
|
|
||||||
return medal_new_en;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMedal_new_en(String medal_new_en) {
|
|
||||||
this.medal_new_en = medal_new_en;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMedal_new(String medal_new) {
|
public void setMedal_new(String medal_new) {
|
||||||
this.medal_new = medal_new;
|
this.medal_new = medal_new;
|
||||||
}
|
}
|
||||||
@@ -907,66 +907,6 @@ public class UserBean implements Parcelable {
|
|||||||
this.bubble = bubble;
|
this.bubble = bubble;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "UserBean{" +
|
|
||||||
"id='" + id + '\'' +
|
|
||||||
", userNiceName='" + userNiceName + '\'' +
|
|
||||||
", avatar='" + avatar + '\'' +
|
|
||||||
", avatarThumb='" + avatarThumb + '\'' +
|
|
||||||
", sex=" + sex +
|
|
||||||
", signature='" + signature + '\'' +
|
|
||||||
", coin='" + coin + '\'' +
|
|
||||||
", gold='" + gold + '\'' +
|
|
||||||
", votes='" + votes + '\'' +
|
|
||||||
", consumption='" + consumption + '\'' +
|
|
||||||
", votestotal='" + votestotal + '\'' +
|
|
||||||
", province='" + province + '\'' +
|
|
||||||
", city='" + city + '\'' +
|
|
||||||
", location='" + location + '\'' +
|
|
||||||
", birthday='" + birthday + '\'' +
|
|
||||||
", level=" + level +
|
|
||||||
", levelAnchor=" + levelAnchor +
|
|
||||||
", lives=" + lives +
|
|
||||||
", follows=" + follows +
|
|
||||||
", fans=" + fans +
|
|
||||||
", vip=" + vip +
|
|
||||||
", liang=" + liang +
|
|
||||||
", car=" + car +
|
|
||||||
", medal_level=" + medal_level +
|
|
||||||
", medal_name='" + medal_name + '\'' +
|
|
||||||
", Dress=" + Dress +
|
|
||||||
", noble_id='" + noble_id + '\'' +
|
|
||||||
", yuanbao='" + yuanbao + '\'' +
|
|
||||||
", noble_name='" + noble_name + '\'' +
|
|
||||||
", islive='" + islive + '\'' +
|
|
||||||
", medal_no_display_src='" + medal_no_display_src + '\'' +
|
|
||||||
", hot_num='" + hot_num + '\'' +
|
|
||||||
", goodnum='" + goodnum + '\'' +
|
|
||||||
", fans_pic='" + fans_pic + '\'' +
|
|
||||||
", gifticon='" + gifticon + '\'' +
|
|
||||||
", department_name='" + department_name + '\'' +
|
|
||||||
", token_rong='" + token_rong + '\'' +
|
|
||||||
", noble_end_time='" + noble_end_time + '\'' +
|
|
||||||
", slide='" + slide + '\'' +
|
|
||||||
", users_type='" + users_type + '\'' +
|
|
||||||
", is_bind='" + is_bind + '\'' +
|
|
||||||
", mobile='" + mobile + '\'' +
|
|
||||||
", front_task='" + front_task + '\'' +
|
|
||||||
", is_admin='" + is_admin + '\'' +
|
|
||||||
", praise=" + praise +
|
|
||||||
", isHide=" + isHide +
|
|
||||||
", randomPk=" + randomPk +
|
|
||||||
", mRankPkImgUrl='" + mRankPkImgUrl + '\'' +
|
|
||||||
", user_info_complete=" + user_info_complete +
|
|
||||||
", fansLevel=" + fansLevel +
|
|
||||||
", typeMic=" + typeMic +
|
|
||||||
", isMicList=" + isMicList +
|
|
||||||
", isRequest=" + isRequest +
|
|
||||||
", fansEnterRoomUrl='" + fansEnterRoomUrl + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
package com.yunbao.common.custom;
|
|
||||||
|
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
|
|
||||||
import com.stx.xhb.androidx.transformers.BasePageTransformer;
|
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
|
|
||||||
public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
|
||||||
/**
|
|
||||||
* author: xiaohaibin.
|
|
||||||
* time: 2018/10/9
|
|
||||||
* mail:xhb_199409@163.com
|
|
||||||
* github:https://github.com/xiaohaibin
|
|
||||||
* describe: 适用于一屏显示多个模式
|
|
||||||
*/
|
|
||||||
private float mMinScale = 0.85f;
|
|
||||||
private float mMinAlpha = 1f;
|
|
||||||
|
|
||||||
public LiveGuardScalePageTransformer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveGuardScalePageTransformer(float minAlpha, float minScale) {
|
|
||||||
setMinAlpha(minAlpha);
|
|
||||||
setMinScale(minScale);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleInvisiblePage(View view, float position) {
|
|
||||||
ViewCompat.setAlpha(view, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleLeftPage(View view, float position) {
|
|
||||||
float scale = Math.max(mMinScale, 1 + position);
|
|
||||||
float vertMargin = view.getHeight() * (1 - scale) / 2;
|
|
||||||
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
|
||||||
view.setTranslationX(horzMargin - vertMargin / 2);
|
|
||||||
view.setScaleX(scale);
|
|
||||||
view.setScaleY( scale);
|
|
||||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleRightPage(View view, float position) {
|
|
||||||
float scale = Math.max(mMinScale, 1 - position);
|
|
||||||
float vertMargin = view.getHeight() * (1 - scale) / 2;
|
|
||||||
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
|
||||||
view.setTranslationX( -horzMargin + vertMargin / 2);
|
|
||||||
view.setScaleX( scale);
|
|
||||||
|
|
||||||
view.setScaleY( scale);
|
|
||||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMinAlpha(float minAlpha) {
|
|
||||||
if (minAlpha >= 0.6f && minAlpha <= 1.0f) {
|
|
||||||
mMinAlpha = minAlpha;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMinScale(float minScale) {
|
|
||||||
if (minScale >= 0.6f && minScale <= 1.0f) {
|
|
||||||
mMinScale = minScale;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.CoolConfig;
|
import com.yunbao.common.bean.CoolConfig;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import com.google.gson.Gson;
|
|||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.lxj.xpopup.core.BottomPopupView;
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
import com.lxj.xpopup.enums.PopupPosition;
|
import com.lxj.xpopup.enums.PopupPosition;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
@@ -46,9 +45,6 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
|
||||||
* 半屏创建游戏房间
|
|
||||||
*/
|
|
||||||
public class CreateSudGamePopup extends BottomPopupView {
|
public class CreateSudGamePopup extends BottomPopupView {
|
||||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||||
private TextView createGameType, selectCurrencyType;
|
private TextView createGameType, selectCurrencyType;
|
||||||
@@ -154,6 +150,8 @@ public class CreateSudGamePopup extends BottomPopupView {
|
|||||||
.asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID))
|
.asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_back),
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_back),
|
||||||
@@ -281,11 +279,7 @@ public class CreateSudGamePopup extends BottomPopupView {
|
|||||||
public void onSuccess(CreateSudRoomModel data) {
|
public void onSuccess(CreateSudRoomModel data) {
|
||||||
if (isHome) {
|
if (isHome) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
if(CommonAppConfig.getInstance().getConfig().isSw()){
|
RouteUtil.forwardSudGameActivity(new Gson().toJson(data));
|
||||||
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(data),true,isHome);
|
|
||||||
}else{
|
|
||||||
RouteUtil.forwardRySudGameActivity(new Gson().toJson(data),true,isHome);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
|
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
|
||||||
|
|
||||||
@@ -318,50 +312,20 @@ public class CreateSudGamePopup extends BottomPopupView {
|
|||||||
animator.setDuration(animDuration);
|
animator.setDuration(animDuration);
|
||||||
animator.setInterpolator(new LinearInterpolator());
|
animator.setInterpolator(new LinearInterpolator());
|
||||||
animator.start();
|
animator.start();
|
||||||
if (hasMoveUp) {
|
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
||||||
InputMethodManager imm = getSystemService(getContext(), InputMethodManager.class);
|
builder.hasShadowBg(false)
|
||||||
if (imm != null) {
|
.isDestroyOnDismiss(true)
|
||||||
imm.hideSoftInputFromWindow(roomName.getWindowToken(), 0);
|
.isLightStatusBar(false)
|
||||||
imm.hideSoftInputFromWindow(gameSill.getWindowToken(), 0);
|
.popupPosition(PopupPosition.Bottom)
|
||||||
}
|
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
||||||
new Handler().postDelayed(new Runnable() {
|
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void onDismiss(DialogInterface dialog) {
|
||||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
closeAnimSudGameListEvent();
|
||||||
builder.hasShadowBg(false)
|
}
|
||||||
.isDestroyOnDismiss(true)
|
})
|
||||||
.isLightStatusBar(false)
|
)
|
||||||
.popupPosition(PopupPosition.Bottom)
|
.show();
|
||||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
|
||||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
|
||||||
@Override
|
|
||||||
public void onDismiss(DialogInterface dialog) {
|
|
||||||
closeAnimSudGameListEvent();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
}else {
|
|
||||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
|
||||||
builder.hasShadowBg(false)
|
|
||||||
.isDestroyOnDismiss(true)
|
|
||||||
.isLightStatusBar(false)
|
|
||||||
.popupPosition(PopupPosition.Bottom)
|
|
||||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
|
||||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
|
||||||
@Override
|
|
||||||
public void onDismiss(DialogInterface dialog) {
|
|
||||||
closeAnimSudGameListEvent();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,172 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
|
||||||
import com.lzf.easyfloat.enums.ShowPattern;
|
|
||||||
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
|
||||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.adapter.DebugDialogAdapter;
|
|
||||||
import com.yunbao.common.utils.AppManager;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.TimerTask;
|
|
||||||
|
|
||||||
|
|
||||||
public class DebugDialog {
|
|
||||||
RecyclerView recyclerView;
|
|
||||||
LinkedHashMap<String, View> params;
|
|
||||||
DebugDialogAdapter adapter;
|
|
||||||
private static DebugDialog debugDialog;
|
|
||||||
Context mContext;
|
|
||||||
private ShowPattern showPattern = ShowPattern.CURRENT_ACTIVITY;
|
|
||||||
|
|
||||||
private DebugDialogRunnable runnable;
|
|
||||||
|
|
||||||
public static void getInstance(DebugDialogRunnable runnable) {
|
|
||||||
if (debugDialog == null) {
|
|
||||||
debugDialog = new DebugDialog(runnable);
|
|
||||||
} else {
|
|
||||||
runnable.run(debugDialog);
|
|
||||||
}
|
|
||||||
debugDialog.showPattern = ShowPattern.CURRENT_ACTIVITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean checkShow() {
|
|
||||||
return EasyFloat.isShow("debug");
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebugDialog clear() {
|
|
||||||
params.clear();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParams(String tag, String msg) {
|
|
||||||
Log.i("debug弹窗", "setParams: " + tag + "|" + msg);
|
|
||||||
if (params.containsKey(tag)) {
|
|
||||||
((TextView) params.get(tag)).setText(tag + ":" + msg);
|
|
||||||
} else {
|
|
||||||
TextView textView = new TextView(mContext);
|
|
||||||
textView.setText(tag + ":" + msg);
|
|
||||||
params.put(tag, textView);
|
|
||||||
adapter.setParamMap(params);
|
|
||||||
}
|
|
||||||
EasyFloat.updateFloat("debug");
|
|
||||||
}
|
|
||||||
|
|
||||||
private DebugDialog(DebugDialogRunnable runnable) {
|
|
||||||
this.runnable = runnable;
|
|
||||||
if (params == null) {
|
|
||||||
Log.i("debug弹窗", "DebugDialog: 初始化参数");
|
|
||||||
params = new LinkedHashMap<>();
|
|
||||||
}
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init() {
|
|
||||||
this.mContext = AppManager.getInstance().getMainActivity();
|
|
||||||
if (mContext == null) {
|
|
||||||
startWaitMainActivity();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runnable.run(this);
|
|
||||||
// createView();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startWaitMainActivity() {
|
|
||||||
new Timer().schedule(new TimerTask() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Log.i("debug弹窗", "run: " + AppManager.getInstance().getMainActivity());
|
|
||||||
if (AppManager.getInstance().getMainActivity() != null) {
|
|
||||||
init();
|
|
||||||
cancel();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 0, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void close() {
|
|
||||||
EasyFloat.dismiss("debug");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void show() {
|
|
||||||
if (recyclerView != null) return;
|
|
||||||
if (showPattern == ShowPattern.CURRENT_ACTIVITY) {
|
|
||||||
createView();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (PermissionUtils.checkPermission(mContext)) {
|
|
||||||
createView();
|
|
||||||
} else {
|
|
||||||
PermissionUtils.requestPermission((Activity) mContext, new OnPermissionResult() {
|
|
||||||
@Override
|
|
||||||
public void permissionResult(boolean b) {
|
|
||||||
ToastUtil.show("悬浮权限" + b);
|
|
||||||
if (b) {
|
|
||||||
createView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void createView() {
|
|
||||||
recyclerView = new RecyclerView(mContext);
|
|
||||||
adapter = new DebugDialogAdapter(mContext);
|
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
|
||||||
recyclerView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
|
||||||
recyclerView.setAdapter(adapter);
|
|
||||||
recyclerView.setBackgroundColor(Color.WHITE);
|
|
||||||
TextView textView = new TextView(mContext);
|
|
||||||
textView.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
ToastUtil.show("debug弹窗:" + params.size());
|
|
||||||
EasyFloat.updateFloat("debug");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
params.put("发包时间:" + CommonAppConfig.BUILD_TIME, textView);
|
|
||||||
adapter.setParamMap(params);
|
|
||||||
|
|
||||||
EasyFloat.with(mContext)
|
|
||||||
.setTag("debug")
|
|
||||||
.setShowPattern(this.showPattern)
|
|
||||||
.setLayout(recyclerView)
|
|
||||||
.show();
|
|
||||||
runnable.run(this);
|
|
||||||
Log.i("debug弹窗", "createView: 创建");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setView(String value, View view, View.OnClickListener onClickListener) {
|
|
||||||
if (params.containsKey(value)) {
|
|
||||||
params.get(value).setOnClickListener(onClickListener);
|
|
||||||
} else {
|
|
||||||
view.setOnClickListener(onClickListener);
|
|
||||||
params.put(value, view);
|
|
||||||
}
|
|
||||||
adapter.setParamMap(params);
|
|
||||||
EasyFloat.updateFloat("debug");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShowPattern(ShowPattern showPattern) {
|
|
||||||
this.showPattern = showPattern;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface DebugDialogRunnable {
|
|
||||||
void run(DebugDialog dialog);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.animation.Animator;
|
|
||||||
import android.animation.AnimatorListenerAdapter;
|
|
||||||
import android.animation.ValueAnimator;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.adapter.ImagePreviewAdapter;
|
|
||||||
import com.yunbao.common.utils.StringUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Martin on 2024/3/15.
|
|
||||||
* 图片预览弹窗
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ImagePreviewDialog extends AbsDialogFragment implements View.OnClickListener {
|
|
||||||
|
|
||||||
private View mBg;
|
|
||||||
private RecyclerView mRecyclerView;
|
|
||||||
private ValueAnimator mAnimator;
|
|
||||||
private int mPosition;
|
|
||||||
private int mPageCount;
|
|
||||||
private ActionListener mActionListener;
|
|
||||||
private TextView mCount;
|
|
||||||
private ImagePreviewAdapter mAdapter;
|
|
||||||
private boolean mNeedDelete;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getLayoutId() {
|
|
||||||
return R.layout.view_preview_image;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getDialogStyle() {
|
|
||||||
return R.style.dialog2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean canCancel() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void setWindowAttributes(Window window) {
|
|
||||||
WindowManager.LayoutParams params = window.getAttributes();
|
|
||||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
|
||||||
params.height = WindowManager.LayoutParams.MATCH_PARENT;
|
|
||||||
window.setAttributes(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
|
||||||
super.onActivityCreated(savedInstanceState);
|
|
||||||
mBg = mRootView.findViewById(R.id.bg);
|
|
||||||
mCount = (TextView) findViewById(R.id.count);
|
|
||||||
findViewById(R.id.btn_close).setOnClickListener(this);
|
|
||||||
if (mNeedDelete) {
|
|
||||||
View btnDelete = findViewById(R.id.btn_delete);
|
|
||||||
btnDelete.setVisibility(View.VISIBLE);
|
|
||||||
btnDelete.setOnClickListener(this);
|
|
||||||
}
|
|
||||||
mRecyclerView = mRootView.findViewById(R.id.recyclerView);
|
|
||||||
mRecyclerView.setHasFixedSize(true);
|
|
||||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
|
||||||
mAnimator = ValueAnimator.ofFloat(0, 1);
|
|
||||||
mAnimator.setDuration(150);
|
|
||||||
mAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
|
||||||
mAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationUpdate(ValueAnimator animation) {
|
|
||||||
float v = (float) animation.getAnimatedValue();
|
|
||||||
mBg.setAlpha(v);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mAnimator.addListener(new AnimatorListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationEnd(Animator animation) {
|
|
||||||
if (mRecyclerView != null && mPageCount > 0) {
|
|
||||||
ImagePreviewAdapter adapter = new ImagePreviewAdapter(mContext, mPageCount);
|
|
||||||
mAdapter = adapter;
|
|
||||||
adapter.setActionListener(new ImagePreviewAdapter.ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void onPageChanged(int position) {
|
|
||||||
if (mCount != null) {
|
|
||||||
mCount.setText(StringUtil.contact(String.valueOf(position + 1), "/", String.valueOf(mPageCount)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void loadImage(ImageView imageView, int position) {
|
|
||||||
if (mActionListener != null) {
|
|
||||||
mActionListener.loadImage(imageView, position);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mRecyclerView.setAdapter(adapter);
|
|
||||||
if (mPosition >= 0 && mPosition < mPageCount) {
|
|
||||||
adapter.setCurPosition(mPosition);
|
|
||||||
mRecyclerView.scrollToPosition(mPosition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mAnimator.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImageInfo(int pageCount, int position, boolean needDelete, ActionListener actionListener) {
|
|
||||||
mActionListener = actionListener;
|
|
||||||
mPageCount = pageCount;
|
|
||||||
mPosition = position;
|
|
||||||
mNeedDelete = needDelete;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroy() {
|
|
||||||
if (mAnimator != null) {
|
|
||||||
mAnimator.cancel();
|
|
||||||
}
|
|
||||||
mContext = null;
|
|
||||||
mActionListener = null;
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
int i = v.getId();
|
|
||||||
if (i == R.id.btn_close) {
|
|
||||||
dismiss();
|
|
||||||
} else if (i == R.id.btn_delete) {
|
|
||||||
delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void delete() {
|
|
||||||
if (mAdapter != null && mActionListener != null) {
|
|
||||||
mActionListener.onDeleteClick(mAdapter.getCurPosition());
|
|
||||||
}
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ActionListener {
|
|
||||||
void loadImage(ImageView imageView, int position);
|
|
||||||
|
|
||||||
void onDeleteClick(int position);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -21,7 +21,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
//游戏弹窗
|
|
||||||
public class LiveNewRolePopup extends BottomPopupView {
|
public class LiveNewRolePopup extends BottomPopupView {
|
||||||
private boolean showRed = false;
|
private boolean showRed = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.yunbao.common.dialog;
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.webkit.WebView;
|
|
||||||
import android.webkit.WebViewClient;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@@ -13,21 +9,12 @@ import com.lxj.xpopup.XPopup;
|
|||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.OpenAdModel;
|
import com.yunbao.common.bean.OpenAdModel;
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
import com.yunbao.common.utils.DpUtil;
|
|
||||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
|
||||||
import com.yunbao.common.utils.L;
|
|
||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow {
|
public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow {
|
||||||
|
private ImageView mImageView;
|
||||||
private ImageView mClose;
|
private ImageView mClose;
|
||||||
private LinearLayout contentLayout;
|
|
||||||
private OpenAdModel model;
|
private OpenAdModel model;
|
||||||
private OnItemClickListener<OpenAdModel> mListener;
|
private OnItemClickListener<OpenAdModel> mListener;
|
||||||
|
|
||||||
@@ -40,11 +27,6 @@ public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
public void buildDialog(XPopup.Builder builder) {
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
builder.animationDuration(0);
|
builder.animationDuration(0);
|
||||||
builder.hasShadowBg(true);
|
|
||||||
if(model.getPopupSort()==2){
|
|
||||||
builder.dismissOnTouchOutside(false);
|
|
||||||
builder.dismissOnBackPressed(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,63 +51,8 @@ public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
contentLayout = findViewById(R.id.content_layout);
|
mImageView = findViewById(R.id.img);
|
||||||
mClose = findViewById(R.id.close);
|
mClose = findViewById(R.id.close);
|
||||||
if (model.getPopupSort() == 1) {
|
|
||||||
setImage();
|
|
||||||
} else {
|
|
||||||
setWeb();
|
|
||||||
}
|
|
||||||
|
|
||||||
mClose.setOnClickListener(v -> dismiss());
|
|
||||||
if (model.getShowTime() > 0) {
|
|
||||||
mClose.postDelayed(this::dismiss, model.getShowTime());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setWeb() {
|
|
||||||
WebView mWebView = new WebView(mContext);
|
|
||||||
mWebView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
|
|
||||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext((Activity) mContext, mWebView).setPageClose(true).setLiveZhuangBana(false), "androidObject");
|
|
||||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
|
||||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
|
||||||
mWebView.getSettings().setDomStorageEnabled(true);
|
|
||||||
String appCachePath = mContext.getCacheDir().getAbsolutePath();
|
|
||||||
// mWebView.getSettings().setAppCachePath(appCachePath);
|
|
||||||
mWebView.getSettings().setAllowFileAccess(true);
|
|
||||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
|
||||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
|
||||||
mWebView.setHorizontalScrollBarEnabled(false);
|
|
||||||
mWebView.setVerticalScrollBarEnabled(false);
|
|
||||||
mWebView.setWebViewClient(new WebViewClient() {
|
|
||||||
@Override
|
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
||||||
L.e("H5-------->" + url);
|
|
||||||
view.loadUrl(url);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPageFinished(WebView view, String url) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
String url=model.getUrl();
|
|
||||||
if(url.contains("?")){
|
|
||||||
url+="&uid="+ IMLoginManager.get(mContext).getUserInfo().getId()+"&token="+IMLoginManager.get(mContext).getUserInfo().getToken();
|
|
||||||
}else{
|
|
||||||
url+="?uid="+ IMLoginManager.get(mContext).getUserInfo().getId()+"&token="+IMLoginManager.get(mContext).getUserInfo().getToken();
|
|
||||||
}
|
|
||||||
mWebView.loadUrl(url);
|
|
||||||
contentLayout.addView(mWebView);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setImage() {
|
|
||||||
int width = ScreenDimenUtil.getInstance().getScreenWdith();
|
|
||||||
int height = (int) (width * 1.4);
|
|
||||||
|
|
||||||
ImageView mImageView = new ImageView(mContext);
|
|
||||||
mImageView.setLayoutParams(new LinearLayout.LayoutParams(width, height));
|
|
||||||
mImageView.setOnClickListener(v -> {
|
mImageView.setOnClickListener(v -> {
|
||||||
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
|
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
@@ -134,12 +61,10 @@ public class OpenAdBottomDialogPopup extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
|
mClose.setOnClickListener(v -> dismiss());
|
||||||
ImgLoader.display(mContext, model.getImageUrl(), mImageView);
|
ImgLoader.display(mContext, model.getImageUrl(), mImageView);
|
||||||
contentLayout.addView(mImageView);
|
if (model.getShowTime() > 0) {
|
||||||
}
|
mClose.postDelayed(this::dismiss, model.getShowTime());
|
||||||
|
}
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onJavascriptInterfaceEvent(JavascriptInterfaceEvent event) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +1,24 @@
|
|||||||
package com.yunbao.common.dialog;
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.ViewTreeObserver;
|
|
||||||
import android.view.WindowInsets;
|
|
||||||
import android.webkit.WebResourceRequest;
|
|
||||||
import android.webkit.WebView;
|
|
||||||
import android.webkit.WebViewClient;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.lzf.easyfloat.enums.ShowPattern;
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.OpenAdModel;
|
import com.yunbao.common.bean.OpenAdModel;
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
|
||||||
import com.yunbao.common.utils.L;
|
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
|
||||||
|
|
||||||
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
||||||
private ImageView mImageView;
|
private ImageView mImageView;
|
||||||
private LinearLayout contentLayout;
|
|
||||||
private ImageView mClose;
|
private ImageView mClose;
|
||||||
private OpenAdModel model;
|
private OpenAdModel model;
|
||||||
private OnItemClickListener<OpenAdModel> mListener;
|
private OnItemClickListener<OpenAdModel> mListener;
|
||||||
@@ -59,8 +39,7 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildDialog(XPopup.Builder builder) {
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
builder.hasShadowBg(true);
|
builder.hasShadowBg(false);
|
||||||
builder.shadowBgColor(Color.parseColor("#80000000"));
|
|
||||||
builder.animationDuration(0);
|
builder.animationDuration(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,103 +61,12 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
Log.e("-----弹窗-----", "onCreate: 创建弹窗");
|
Log.e("-----弹窗-----", "onCreate: 创建弹窗" );
|
||||||
contentLayout = findViewById(R.id.content_layout);
|
mImageView = findViewById(R.id.img);
|
||||||
mClose = findViewById(R.id.close);
|
mClose = findViewById(R.id.close);
|
||||||
|
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
|
||||||
|
|
||||||
contentLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
|
||||||
boolean isShow = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onGlobalLayout() {
|
|
||||||
if (isShow)
|
|
||||||
return;
|
|
||||||
isShow = true;
|
|
||||||
int width = contentLayout.getWidth() - DpUtil.dp2px(20);
|
|
||||||
int height = (int) (width * 1.5);
|
|
||||||
if (model.getModel() == OpenAdModel.MODEL_SQUARE) {
|
|
||||||
height = (int) (width * 1.2);
|
|
||||||
}
|
|
||||||
Log.i("-----弹窗-----", "高度:" + height + " 宽度:" + width + " 屏幕宽度: " + ScreenDimenUtil.getInstance().getScreenWdith());
|
|
||||||
/*DebugDialog.getInstance(new DebugDialog.DebugDialogRunnable() {
|
|
||||||
@Override
|
|
||||||
public void run(DebugDialog dialog) {
|
|
||||||
dialog.setShowPattern(ShowPattern.ALL_TIME);
|
|
||||||
dialog.show();
|
|
||||||
int width = contentLayout.getWidth() - DpUtil.dp2px(10);
|
|
||||||
int height = (int) (width * 1.5);
|
|
||||||
if (model.getModel() == OpenAdModel.MODEL_SQUARE) {
|
|
||||||
height = (int) (width * 1.2);
|
|
||||||
}
|
|
||||||
Log.i("-----弹窗-----", "弹框debug高宽 高度:" + height + " 宽度:" + width);
|
|
||||||
dialog.setParams(model.getName() + "弹框高宽", "高度:" + height + " 宽度:" + width);
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
if (model.getPopupSort() == 1) {
|
|
||||||
setImage(model, width, height);
|
|
||||||
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
|
|
||||||
} else {
|
|
||||||
setWeb(model, width, height);
|
|
||||||
}
|
|
||||||
mClose.setOnClickListener(v -> dismiss());
|
|
||||||
if (model.getShowTime() > 0) {
|
|
||||||
mClose.postDelayed(OpenAdCenterDialogPopup.this::dismiss, model.getShowTime());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setWeb(OpenAdModel model, int width, int height) {
|
|
||||||
WebView mWebView = new WebView(mContext);
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, height);
|
|
||||||
params.gravity = Gravity.CENTER;
|
|
||||||
mWebView.setLayoutParams(params);
|
|
||||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext((Activity) mContext, mWebView).setPageClose(true).setLiveZhuangBana(false), "androidObject");
|
|
||||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
|
||||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
|
||||||
mWebView.getSettings().setDomStorageEnabled(true);
|
|
||||||
String appCachePath = mContext.getCacheDir().getAbsolutePath();
|
|
||||||
// mWebView.getSettings().setAppCachePath(appCachePath);
|
|
||||||
mWebView.getSettings().setAllowFileAccess(true);
|
|
||||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
|
||||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
|
||||||
mWebView.setHorizontalScrollBarEnabled(false);
|
|
||||||
mWebView.setVerticalScrollBarEnabled(false);
|
|
||||||
mWebView.setWebViewClient(new WebViewClient() {
|
|
||||||
@Override
|
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
||||||
L.e("H5-------->" + url);
|
|
||||||
view.loadUrl(url);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPageFinished(WebView view, String url) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
String url = model.getUrl();
|
|
||||||
if (url.contains("?")) {
|
|
||||||
url += "&uid=" + IMLoginManager.get(mContext).getUserInfo().getId() + "&token=" + IMLoginManager.get(mContext).getUserInfo().getToken();
|
|
||||||
} else {
|
|
||||||
url += "?uid=" + IMLoginManager.get(mContext).getUserInfo().getId() + "&token=" + IMLoginManager.get(mContext).getUserInfo().getToken();
|
|
||||||
}
|
|
||||||
Log.i("-----弹窗-----", "setWeb: " + url);
|
|
||||||
mWebView.loadUrl(url);
|
|
||||||
contentLayout.addView(mWebView);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setImage(OpenAdModel model, int width, int height) {
|
|
||||||
mImageView = new ImageView(mContext);
|
|
||||||
mImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, height);
|
|
||||||
params.gravity = Gravity.CENTER;
|
|
||||||
mImageView.setLayoutParams(params);
|
|
||||||
|
|
||||||
mImageView.setOnClickListener(v -> {
|
mImageView.setOnClickListener(v -> {
|
||||||
if ("home_page_banner_battle".equals(model.getOriginalUrl())) {
|
if("home_page_banner_battle".equals(model.getOriginalUrl())){
|
||||||
RouteUtil.forwardBattlePass();
|
RouteUtil.forwardBattlePass();
|
||||||
dismiss();
|
dismiss();
|
||||||
return;
|
return;
|
||||||
@@ -190,12 +78,19 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
|||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
|
mClose.setOnClickListener(v -> dismiss());
|
||||||
ImgLoader.display(mContext, model.getImageUrl(), mImageView);
|
ImgLoader.display(mContext, model.getImageUrl(), mImageView);
|
||||||
contentLayout.addView(mImageView);
|
int width = ScreenDimenUtil.getInstance().getScreenWdith() - DpUtil.dp2px(40);
|
||||||
}
|
int height = (int) (width * 1.4);
|
||||||
|
if (model.getModel() == OpenAdModel.MODEL_SQUARE) {
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
height = width;
|
||||||
public void onJavascriptInterfaceEvent(JavascriptInterfaceEvent event) {
|
}
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mImageView.getLayoutParams();
|
||||||
|
params.width = width;
|
||||||
|
params.height = height;
|
||||||
|
mImageView.setLayoutParams(params);
|
||||||
|
if (model.getShowTime() > 0) {
|
||||||
|
mClose.postDelayed(this::dismiss, model.getShowTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import com.yunbao.common.event.LiveSudGameHistoryEvent;
|
|||||||
import com.yunbao.common.event.RoomHolderTypeEvent;
|
import com.yunbao.common.event.RoomHolderTypeEvent;
|
||||||
import com.yunbao.common.event.SudGameListEvent;
|
import com.yunbao.common.event.SudGameListEvent;
|
||||||
import com.yunbao.common.event.SudGameListSillEvent;
|
import com.yunbao.common.event.SudGameListSillEvent;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
@@ -88,11 +87,6 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
|||||||
if (mType == 0 || mType == 4) {
|
if (mType == 0 || mType == 4) {
|
||||||
topSelect.setText(getContext().getString(R.string.interactive_game_room_all));
|
topSelect.setText(getContext().getString(R.string.interactive_game_room_all));
|
||||||
for (int i = 0; i < customSidebarChildModels.size(); i++) {
|
for (int i = 0; i < customSidebarChildModels.size(); i++) {
|
||||||
/* if (!IMLoginManager.get(getContext()).getUserInfo().anchorUserType()) {
|
|
||||||
if ("1490944230389182466".equals(customSidebarChildModels.get(i).getSrc())) {//友尽闯关
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
selectString.add(customSidebarChildModels.get(i).getTitle());
|
selectString.add(customSidebarChildModels.get(i).getTitle());
|
||||||
if (TextUtils.equals(String.valueOf(interactionID), customSidebarChildModels.get(i).getSrc())) {
|
if (TextUtils.equals(String.valueOf(interactionID), customSidebarChildModels.get(i).getSrc())) {
|
||||||
index = i;
|
index = i;
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ public class AllServerNotifyFFGGGDJANEvent extends BaseModel {
|
|||||||
private List<ButtonStyleDTO> buttonStyle;
|
private List<ButtonStyleDTO> buttonStyle;
|
||||||
@SerializedName("h5_type")
|
@SerializedName("h5_type")
|
||||||
private String h5Type;
|
private String h5Type;
|
||||||
@SerializedName("left_image")
|
|
||||||
private String leftImage;
|
|
||||||
|
|
||||||
public String getH5Type() {
|
public String getH5Type() {
|
||||||
return h5Type;
|
return h5Type;
|
||||||
@@ -49,14 +47,6 @@ public class AllServerNotifyFFGGGDJANEvent extends BaseModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLeftImage() {
|
|
||||||
return leftImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLeftImage(String leftImage) {
|
|
||||||
this.leftImage = leftImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMethod() {
|
public String getMethod() {
|
||||||
return method;
|
return method;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,36 +115,6 @@ public class SendBlindGiftEvent extends BaseModel {
|
|||||||
private String liveGiftNotify;
|
private String liveGiftNotify;
|
||||||
@SerializedName("userNiceName")
|
@SerializedName("userNiceName")
|
||||||
private String userNiceName;
|
private String userNiceName;
|
||||||
@SerializedName("special_gift")
|
|
||||||
private int specialGift;
|
|
||||||
@SerializedName("special_gift_name")
|
|
||||||
private String specialGiftName;
|
|
||||||
@SerializedName("special_gift_name_en")
|
|
||||||
private String specialGiftNameEn;
|
|
||||||
|
|
||||||
public int getSpecialGift() {
|
|
||||||
return specialGift;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecialGift(int specialGift) {
|
|
||||||
this.specialGift = specialGift;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecialGiftName() {
|
|
||||||
return specialGiftName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecialGiftName(String specialGiftName) {
|
|
||||||
this.specialGiftName = specialGiftName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecialGiftNameEn() {
|
|
||||||
return specialGiftNameEn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecialGiftNameEn(String specialGiftNameEn) {
|
|
||||||
this.specialGiftNameEn = specialGiftNameEn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNiceName() {
|
public String getUserNiceName() {
|
||||||
return userNiceName;
|
return userNiceName;
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.yunbao.common.event;
|
|
||||||
|
|
||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
|
||||||
|
|
||||||
public class SubGameEvent {
|
|
||||||
int type;
|
|
||||||
HttpCallbackModel model;
|
|
||||||
String dataJson;
|
|
||||||
|
|
||||||
public SubGameEvent(int type, HttpCallbackModel model, String dataJson) {
|
|
||||||
this.type = type;
|
|
||||||
this.model = model;
|
|
||||||
this.dataJson = dataJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(int type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HttpCallbackModel getModel() {
|
|
||||||
return model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModel(HttpCallbackModel model) {
|
|
||||||
this.model = model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataJson() {
|
|
||||||
return dataJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "SubGameEvent{" +
|
|
||||||
"type=" + type +
|
|
||||||
", model=" + model +
|
|
||||||
", dataJson='" + dataJson + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -53,15 +53,6 @@ public class SudGameSocketImEvent extends BaseModel {
|
|||||||
private String method;
|
private String method;
|
||||||
@SerializedName("equipment")
|
@SerializedName("equipment")
|
||||||
private String equipment;
|
private String equipment;
|
||||||
private String time;
|
|
||||||
|
|
||||||
public String getTime() {
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTime(String time) {
|
|
||||||
this.time = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAction() {
|
public String getAction() {
|
||||||
return action;
|
return action;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.bumptech.glide.request.RequestOptions;
|
|||||||
import com.bumptech.glide.request.target.CustomTarget;
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@@ -227,20 +226,14 @@ public class ImgLoader {
|
|||||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||||
.into(imageView);
|
.into(imageView);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayDrawable(Context context, String url, final DrawableCallback callback) {
|
public static void displayDrawable(Context context, String url, final DrawableCallback callback) {
|
||||||
displayDrawable(context, url, -1, -1, callback);
|
|
||||||
}
|
|
||||||
public static void displayDrawable(Context context, String url, int width, int height, final DrawableCallback callback) {
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(url) || !contextIsExist(context)) {
|
if (TextUtils.isEmpty(url) || !contextIsExist(context)) {
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
callback.onLoadFailed();
|
callback.onLoadFailed();
|
||||||
} else {
|
} else {
|
||||||
RequestBuilder<Drawable> builder = Glide.with(context).asDrawable().load(url);
|
Glide.with(context).asDrawable().load(url).thumbnail(thumbnail).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget<Drawable>() {
|
||||||
if (width != -1 && height != -1) {
|
|
||||||
builder = builder.override(width, height);
|
|
||||||
}
|
|
||||||
builder.thumbnail(thumbnail).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget<Drawable>() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import java.util.Locale;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class CommonHttpUtil {
|
public class CommonHttpUtil {
|
||||||
public static final String GET_UPLOAD_QI_NIU_TOKEN = "getUploadQiNiuToken";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化
|
* 初始化
|
||||||
@@ -450,16 +450,6 @@ 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("User.getUserBaseinfo", CommonHttpConsts.GET_USER_BASEINFO).params("touid", touid).execute(callback);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 上传文件 获取七牛云token的接口
|
|
||||||
*/
|
|
||||||
public static void getUploadQiNiuToken(HttpCallback callback, boolean isImg) {
|
|
||||||
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken2", "Pdluserhome.getQiNiuToken2")
|
|
||||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
|
||||||
.params("token", CommonAppConfig.getInstance().getToken())
|
|
||||||
.params("ext", isImg ? ".jpeg" : ".mp4")
|
|
||||||
.execute(callback);
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
// //埋点唯一性
|
// //埋点唯一性
|
||||||
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user