Commit b83a4b8d by yichen

1、更改渠道问题

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