Commit b83a4b8d by yichen

1、更改渠道问题

parent f1dfa9af
......@@ -75,7 +75,7 @@ android {
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "0",
API_CHANNEL_ID : "10",
UMENG_CHANNEL_VALUE: "mubao1"
]
}
......@@ -85,7 +85,7 @@ android {
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "0",
API_CHANNEL_ID : "10",
UMENG_CHANNEL_VALUE: "mubao2"
]
}
......@@ -95,7 +95,7 @@ android {
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "0",
API_CHANNEL_ID : "10",
UMENG_CHANNEL_VALUE: "mubao3"
]
}
......@@ -105,10 +105,61 @@ android {
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "0",
API_CHANNEL_ID : "10",
UMENG_CHANNEL_VALUE: "mubao4"
]
}
qj_exe1 {
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "15",
UMENG_CHANNEL_VALUE: "exe1"
]
}
qj_exe2 {
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "15",
UMENG_CHANNEL_VALUE: "exe2"
]
}
qj_exe3 {
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "15",
UMENG_CHANNEL_VALUE: "exe3"
]
}
qj_exe4{
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "15",
UMENG_CHANNEL_VALUE: "exe4"
]
}
qj_exe5{
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
manifestPlaceholders = [
myAppName : "${myAppName}",
myAppNamePY : "${myAppNamePY}",
API_CHANNEL_ID : "15",
UMENG_CHANNEL_VALUE: "exe5"
]
}
qj_1001 {
def myAppName = "球聚体育"
def myAppNamePY = "qiujutiyu"
......
......@@ -83,7 +83,7 @@ interface RetrofitService {/*@Field("is_new") int is_new*/
* 获取首页banner
*/
@POST(HostUrl.ADD_DOWNLOAD)
fun addDownNum(@Header("api-channel") umChannel: String = ProductFlavors.getString(ProductFlavors.UM_CHANNEL_ID)): Observable<BaseBean<Any>>
fun addDownNum(): Observable<BaseBean<Any>>
/**
* 获取有料banner
......@@ -153,8 +153,7 @@ interface RetrofitService {/*@Field("is_new") int is_new*/
*/
@POST(HostUrl.USER_REGISTER)
fun register(
@Body requestBody: RequestBody,
@Header("api-channel") umChannel: String = ProductFlavors.getString(ProductFlavors.UM_CHANNEL_ID)
@Body requestBody: RequestBody
): Observable<BaseBean<String>>
/**
......
......@@ -45,6 +45,12 @@ class SplashActivity : RefreshActivity<SplashActivityPresenter>(), SplashActivit
private fun requestPerMission() {
SPUtil.put(Constants.DEVICE_ID, DeviceUtils.getDeviceId(this@SplashActivity))
if (SPUtil[Constants.IS_FIRST_OPEN, true] == true) {
Log.e("mobclick","IS_FIRST_OPEN")
SPUtil.put(Constants.IS_FIRST_OPEN,false)
CommonUtils.umengFirstOpen()
presenter?.addDownNum()
}
goToRequest()
}
......@@ -62,12 +68,7 @@ class SplashActivity : RefreshActivity<SplashActivityPresenter>(), SplashActivit
if (BuildConfig.DEBUG) {
// showLogDialog()
}
if (SPUtil[Constants.IS_FIRST_OPEN, true] == true) {
Log.e("mobclick","IS_FIRST_OPEN")
SPUtil.put(Constants.IS_FIRST_OPEN,false)
CommonUtils.umengFirstOpen()
presenter?.addDownNum()
}
StatusBarUtil.setImmersiveTransparentStatusBar(this)
statusBarTranForView(main_background)
......
......@@ -60,6 +60,7 @@ public class ChatFragment extends CustomEaseChatFragment implements OnRecallMess
public void initView() {
super.initView();
initConnectListener();
liveUserName = getArguments().getString(Constants.LIVE_ROOM_USER_NAME);
roomNum = getArguments().getString(Constants.ROOM_NUM, "");
userHxId = getArguments().getString(Constants.USER_HX_ID, "");
......
......@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.hupu.tv.player.app.R;
import com.hupu.tv.player.app.bean.FakeMessageEntity;
import com.hupu.tv.player.app.bean.HistoryMessageEntity;
import com.hupu.tv.player.app.ui.adapter.MessageHistoryAdapter;
import com.hyphenate.chat.EMChatRoom;
......@@ -189,14 +190,33 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
RecyclerView recyclerView = findViewById(R.id.top_message);
messageHistoryAdapter = new MessageHistoryAdapter();
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()) {
@Override
public boolean canScrollVertically() {
return false;
}
@Override
public boolean canScrollHorizontally() {
return false;
}
});
recyclerView.setAdapter(messageHistoryAdapter);
srlRefresh.setEnabled(canUseRefresh);
layoutManager = new LinearLayoutManager(getContext());
rvList.setLayoutManager(layoutManager);
layoutManager = new LinearLayoutManager(getContext()) {
@Override
public boolean canScrollVertically() {
return false;
}
@Override
public boolean canScrollHorizontally() {
return false;
}
};
rvList.setLayoutManager(layoutManager);
baseAdapter = new ConcatAdapter();
......@@ -209,7 +229,7 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
initListener();
}
public void setHistoryListData(List<HistoryMessageEntity> list){
public void setHistoryListData(List<HistoryMessageEntity> list) {
messageHistoryAdapter.setNewData(list);
}
......@@ -390,30 +410,43 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
loadMorePreviousData();
}
});
rvList.addOnScrollListener(new RecyclerView.OnScrollListener() {
nestedScroll.setOnScrollChangeListener(new OnScrollChangeListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
//判断状态及是否还有更多数据
public void onScrollChange(View view, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
//滑动到底部
if(scrollY == nestedScroll.getChildAt(0).getMeasuredHeight()- nestedScroll.getMeasuredHeight()){
if (loadDataType == EaseChatMessageListLayout.LoadDataType.HISTORY
&& loadMoreStatus == EaseChatMessageListLayout.LoadMoreStatus.HAS_MORE
&& layoutManager.findLastVisibleItemPosition() != 0
&& layoutManager.findLastVisibleItemPosition() == layoutManager.getItemCount() - 1) {
&& loadMoreStatus == EaseChatMessageListLayout.LoadMoreStatus.HAS_MORE){
//加载更多
loadMoreHistoryData();
}
} else {
//if recyclerView not idle should hide keyboard
if (messageTouchListener != null) {
messageTouchListener.onViewDragging();
}
}
}
});
// nestedScroll.addOnScrollListener(new RecyclerView.OnScrollListener() {
// @Override
// public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
// super.onScrollStateChanged(recyclerView, newState);
// if (newState == RecyclerView.SCROLL_STATE_IDLE) {
// //判断状态及是否还有更多数据
// if (loadDataType == EaseChatMessageListLayout.LoadDataType.HISTORY
// && loadMoreStatus == EaseChatMessageListLayout.LoadMoreStatus.HAS_MORE
// && layoutManager.findLastVisibleItemPosition() != 0
// && layoutManager.findLastVisibleItemPosition() == layoutManager.getItemCount() - 1) {
// //加载更多
// loadMoreHistoryData();
// }
// } else {
// //if recyclerView not idle should hide keyboard
// if (messageTouchListener != null) {
// messageTouchListener.onViewDragging();
// }
// }
// }
// });
//用于监听RecyclerView高度的变化,从而刷新列表
rvList.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
nestedScroll.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
int height = rvList.getHeight();
......@@ -552,7 +585,7 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
@Override
public void loadMsgFail(int error, String message) {
Log.e("CustomIm","loadMsgFail");
Log.e("CustomIm", "loadMsgFail");
finishRefresh();
if (errorListener != null) {
errorListener.onChatError(error, message);
......@@ -562,19 +595,19 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
@Override
public void loadLocalMsgSuccess(List<EMMessage> data) {
//不漫游,漫游且本地
Log.e("CustomIm","loadLocalMsgSuccess");
Log.e("CustomIm", "loadLocalMsgSuccess");
refreshToLatest();
}
@Override
public void loadNoLocalMsg() {
//不漫游,无本地
Log.e("CustomIm","loadNoLocalMsg");
Log.e("CustomIm", "loadNoLocalMsg");
}
@Override
public void loadMoreLocalMsgSuccess(List<EMMessage> data) {
Log.e("CustomIm","loadMoreLocalMsgSuccess");
Log.e("CustomIm", "loadMoreLocalMsgSuccess");
finishRefresh();
presenter.refreshCurrentConversation();
post(() -> smoothSeekToPosition(data.size() - 1));
......@@ -582,13 +615,13 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
@Override
public void loadNoMoreLocalMsg() {
Log.e("CustomIm","loadNoMoreLocalMsg");
Log.e("CustomIm", "loadNoMoreLocalMsg");
finishRefresh();
}
@Override
public void loadMoreLocalHistoryMsgSuccess(List<EMMessage> data, EMConversation.EMSearchDirection direction) {
Log.e("CustomIm","loadMoreLocalHistoryMsgSuccess");
Log.e("CustomIm", "loadMoreLocalHistoryMsgSuccess");
if (direction == EMConversation.EMSearchDirection.UP) {
finishRefresh();
messageAdapter.addData(0, data);
......@@ -604,19 +637,19 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
@Override
public void loadNoMoreLocalHistoryMsg() {
Log.e("CustomIm","loadNoMoreLocalHistoryMsg");
Log.e("CustomIm", "loadNoMoreLocalHistoryMsg");
finishRefresh();
}
@Override
public void loadServerMsgSuccess(List<EMMessage> data) {
Log.e("CustomIm","loadServerMsgSuccess");
Log.e("CustomIm", "loadServerMsgSuccess");
presenter.refreshToLatest();
}
@Override
public void loadMoreServerMsgSuccess(List<EMMessage> data) {
Log.e("CustomIm","loadMoreServerMsgSuccess");
Log.e("CustomIm", "loadMoreServerMsgSuccess");
finishRefresh();
presenter.refreshCurrentConversation();
post(() -> smoothSeekToPosition(data.size() - 1));
......@@ -624,7 +657,7 @@ public class CustomEaseChatMessageListLayout extends RelativeLayout implements I
@Override
public void refreshCurrentConSuccess(List<EMMessage> data, boolean toLatest) {
Log.e("CustomIm","refreshCurrentConSuccess");
Log.e("CustomIm", "refreshCurrentConSuccess");
messageAdapter.setData(data);
if (toLatest) {
......
......@@ -158,3 +158,4 @@ eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
:set fileformat=unix
......@@ -14,7 +14,7 @@
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_01_20220619.apk"
"outputFile": "qjLive_v1.0.0_release_qj_01_20220623.apk"
}
]
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
"kind": "Directory"
},
"applicationId": "com.qiuju.app",
"variantName": "qj_yingyongbaoRelease",
"variantName": "qj_exe1Release",
"elements": [
{
"type": "SINGLE",
......@@ -14,7 +14,7 @@
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_yingyongbao_20220621.apk"
"outputFile": "qjLive_v1.0.0_release_qj_exe1_20220622.apk"
}
]
}
\ No newline at end of file
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qiuju.app",
"variantName": "qj_exe2Release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_exe2_20220622.apk"
}
]
}
\ No newline at end of file
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qiuju.app",
"variantName": "qj_exe3Release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_exe3_20220622.apk"
}
]
}
\ No newline at end of file
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qiuju.app",
"variantName": "qj_exe4Release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_exe4_20220622.apk"
}
]
}
\ No newline at end of file
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qiuju.app",
"variantName": "qj_exe5Release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_exe5_20220622.apk"
}
]
}
\ No newline at end of file
......@@ -14,7 +14,7 @@
"versionCode": 1,
"versionName": "1",
"enabled": true,
"outputFile": "qjLive_v1.0.0_release_qj_huawei_01_20220619.apk"
"outputFile": "qjLive_v1.0.0_release_qj_huawei_01_20220621.apk"
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment