渠道包设置App下载ID
This commit is contained in:
parent
a27214a9bb
commit
7da5f54e21
@ -54,6 +54,7 @@ public class BaseMyApplication extends Application {
|
||||
private void getConfigCityCode() {
|
||||
UserLgUtils.setCityCode(this.getResources().getString(R.string.CITY_CODE));
|
||||
UserLgUtils.setCityId(this.getResources().getString(R.string.CITY_ID));
|
||||
UserLgUtils.setAppVersionPathCode(this.getResources().getString(R.string.VERSION_PATH_CODE));
|
||||
}
|
||||
|
||||
private void initShare() {
|
||||
|
@ -42,8 +42,8 @@ public class PathConfig {
|
||||
public static final String USER_TYPE_P = "e483f019-d971-49ac-b5fa-3314220da703";
|
||||
public static final String USER_TYPE_N = "bc405346-8714-4ded-89ac-9cc4d755f66a";
|
||||
public static final String USER_TYPE_X = "25affe67-134c-4a32-ba41-64b0cfedc782";
|
||||
// public static final String APP_VERSION_ID = "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4";
|
||||
public static final String APP_VERSION_ID = "10e53e1e-2c21-4b5d-b81f-b514abece994";//测试
|
||||
// public static final String APP_VERSION_ID = "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4";
|
||||
// public static final String APP_VERSION_ID = "10e53e1e-2c21-4b5d-b81f-b514abece994";//测试
|
||||
|
||||
public static final String NEWS_ID = "f497904b-7727-4832-891c-604c36ae4167";//文化动态ID
|
||||
public static final String NEWS_SHOW_ID = "f1d5d313-f728-4dda-9843-1116d97e17b0";//展览展示ID
|
||||
|
@ -73,7 +73,7 @@ public class BaseUrlApi {
|
||||
// public static final String BASE_NEWS_DETAIL = "http://192.168.0.120:80/";//新闻
|
||||
// public static final String BASE_IMG_URL = BASE_IP + "route/file/download/true/";
|
||||
// GET /app/appversion/downloadapp/{appVersionId}
|
||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + PathConfig.APP_VERSION_ID;
|
||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/";
|
||||
|
||||
public static final String BASE_ACTIVITY_IMG_URL = BASE_ACTIVIY_IP + "route/file/download/true/";
|
||||
public static final String BASE_VOLUNTEER_IMG_URL = BASE_VOLUNTEER_IP + "route/file/download/true/";
|
||||
|
@ -240,4 +240,12 @@ public class UserLgUtils {
|
||||
public static String getCityId() {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getString("cityId");
|
||||
}
|
||||
|
||||
public static void setAppVersionPathCode(String code) {
|
||||
SPUtils.getInstance(SP_USER_INFO).put("versionPathCode", code);
|
||||
}
|
||||
|
||||
public static String getAppVersionPathCode() {
|
||||
return SPUtils.getInstance(SP_USER_INFO).getString("versionPathCode");
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ project.ext {
|
||||
resValue("string", "APP_CHANNEL", "cultural")
|
||||
resValue("string", "CITY_CODE", "540200000000")
|
||||
resValue("string", "CITY_ID", "640675")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "cultural",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "640676",
|
||||
@ -25,6 +26,7 @@ project.ext {
|
||||
resValue("string", "APP_CHANNEL", "sangzhuzi")
|
||||
resValue("string", "CITY_CODE", "540202000000")
|
||||
resValue("string", "CITY_ID", "640676")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "sangzhuzi",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "640676",
|
||||
@ -38,6 +40,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "nanmulin"
|
||||
resValue("string", "CITY_CODE", "540221000000")
|
||||
resValue("string", "CITY_ID", "640865")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "nanmulin",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "640865",
|
||||
@ -51,6 +54,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "jiangzi"
|
||||
resValue("string", "CITY_CODE", "540222000000")
|
||||
resValue("string", "CITY_ID", "641029")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "jiangzi",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641029",
|
||||
@ -64,6 +68,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "dingri"
|
||||
resValue("string", "CITY_CODE", "540223000000")
|
||||
resValue("string", "CITY_ID", "641204")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "dingri",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641204",
|
||||
@ -77,6 +82,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "sajia"
|
||||
resValue("string", "CITY_CODE", "540224000000")
|
||||
resValue("string", "CITY_ID", "641393")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "sajia",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641393",
|
||||
@ -90,6 +96,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "lazi"
|
||||
resValue("string", "CITY_CODE", "540225000000")
|
||||
resValue("string", "CITY_ID", "641512")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "lazi",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641512",
|
||||
@ -103,6 +110,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "angren"
|
||||
resValue("string", "CITY_CODE", "540226000000")
|
||||
resValue("string", "CITY_ID", "641622")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "angren",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641622",
|
||||
@ -116,6 +124,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "xietongmen"
|
||||
resValue("string", "CITY_CODE", "540227000000")
|
||||
resValue("string", "CITY_ID", "641825")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "xietongmen",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641825",
|
||||
@ -129,6 +138,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "bailang"
|
||||
resValue("string", "CITY_CODE", "540228000000")
|
||||
resValue("string", "CITY_ID", "641940")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "bailang",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "641940",
|
||||
@ -142,6 +152,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "renbu"
|
||||
resValue("string", "CITY_CODE", "540229000000")
|
||||
resValue("string", "CITY_ID", "642063")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "renbu",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642063",
|
||||
@ -155,6 +166,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "kangma"
|
||||
resValue("string", "CITY_CODE", "540230000000")
|
||||
resValue("string", "CITY_ID", "642146")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "kangma",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642146",
|
||||
@ -168,6 +180,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "dingjie"
|
||||
resValue("string", "CITY_CODE", "540231000000")
|
||||
resValue("string", "CITY_ID", "642203")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "dingjie",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642203",
|
||||
@ -181,6 +194,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "zhongba"
|
||||
resValue("string", "CITY_CODE", "540232000000")
|
||||
resValue("string", "CITY_ID", "642284")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "zhongba",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642284",
|
||||
@ -194,6 +208,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "yadong"
|
||||
resValue("string", "CITY_CODE", "540233000000")
|
||||
resValue("string", "CITY_ID", "642356")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "yadong",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642356",
|
||||
@ -207,6 +222,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "jilong"
|
||||
resValue("string", "CITY_CODE", "540234000000")
|
||||
resValue("string", "CITY_ID", "642389")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "jilong",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642389",
|
||||
@ -220,6 +236,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "nielamu"
|
||||
resValue("string", "CITY_CODE", "540235000000")
|
||||
resValue("string", "CITY_ID", "642437")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "nielamu",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642437",
|
||||
@ -233,6 +250,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "saga"
|
||||
resValue("string", "CITY_CODE", "540236000000")
|
||||
resValue("string", "CITY_ID", "642489")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "saga",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642489",
|
||||
@ -246,6 +264,7 @@ project.ext {
|
||||
resValue "string", "APP_CHANNEL", "gangba"
|
||||
resValue("string", "CITY_CODE", "540237000000")
|
||||
resValue("string", "CITY_ID", "642536")
|
||||
resValue("string", "VERSION_PATH_CODE", "f5935aa1-4405-4cbe-85bc-d7c1a8ddc9c4")
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "gangba",
|
||||
APP_LOGO : "@drawable/app_logo",
|
||||
CITY_ID : "642536",
|
||||
|
@ -220,7 +220,7 @@ public class LoginActivity extends BaseActivity {
|
||||
String verifyCode = mEtVerifyCode.getText().toString().trim();
|
||||
LoginUser info = new LoginUser();
|
||||
info.setAppVersion(AppUtils.getAppVersionCode());
|
||||
info.setAppId(PathConfig.APP_VERSION_ID);
|
||||
info.setAppId(UserLgUtils.getAppVersionPathCode());
|
||||
info.setUsername(phone);
|
||||
info.setDeviceNo("deviceId");
|
||||
info.setVerificationCode(verifyCode);
|
||||
|
@ -307,7 +307,7 @@ public class MainActivity extends BaseActivity {
|
||||
private void checkAppVersion() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doCheckAppVersion(PathConfig.APP_VERSION_ID)
|
||||
.doCheckAppVersion(UserLgUtils.getAppVersionPathCode())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<VersionBean>() {
|
||||
@ -354,7 +354,7 @@ public class MainActivity extends BaseActivity {
|
||||
private void startDownloadApk() {
|
||||
ToastUtils.showShort("开始下载,请在通知栏查看下载进度");
|
||||
Intent intent = new Intent(mActivity, DownloadService.class);
|
||||
intent.putExtra(Constants.APK_DOWNLOAD_URL, BaseUrlApi.APP_DOWNLOAD_URL);
|
||||
intent.putExtra(Constants.APK_DOWNLOAD_URL, BaseUrlApi.APP_DOWNLOAD_URL+UserLgUtils.getAppVersionPathCode());
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
|
@ -97,16 +97,33 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_video_category"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="目录"
|
||||
android:textColor="@color/white"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_video_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
@ -132,9 +149,10 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/bn_img"
|
||||
@ -145,13 +163,19 @@
|
||||
android:id="@+id/iv_banner_left"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/ic_img_arrow_left" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_banner_right"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_img_arrow_right" />
|
||||
|
||||
</RelativeLayout>
|
||||
<!--====================音频===========================-->
|
||||
<LinearLayout
|
||||
@ -159,7 +183,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -167,22 +192,48 @@
|
||||
android:background="@color/black"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tengshisoft.moduleijkplayer.player.VideoView
|
||||
android:id="@+id/vv_audio"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp" />
|
||||
android:layout_height="240dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_audio_category"
|
||||
|
||||
<com.tengshisoft.moduleijkplayer.player.VideoView
|
||||
android:id="@+id/vv_audio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="目录"
|
||||
android:textColor="@color/white"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_audio_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="match_parent"
|
||||
@ -204,6 +255,7 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!--====================文章===========================-->
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.NestedScrollWebView
|
||||
android:id="@+id/nwv_content"
|
||||
android:layout_width="match_parent"
|
||||
@ -213,6 +265,8 @@
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -107,7 +107,7 @@ public class SettingActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doCheckAppVersion(PathConfig.APP_VERSION_ID)
|
||||
.doCheckAppVersion(UserLgUtils.getAppVersionPathCode())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<VersionBean>() {
|
||||
@ -158,7 +158,7 @@ public class SettingActivity extends BaseActivity {
|
||||
private void startDownloadApk() {
|
||||
ToastUtils.showShort("开始下载,请在通知栏查看下载进度");
|
||||
Intent intent = new Intent(mActivity, DownloadService.class);
|
||||
intent.putExtra(Constants.APK_DOWNLOAD_URL, BaseUrlApi.APP_DOWNLOAD_URL);
|
||||
intent.putExtra(Constants.APK_DOWNLOAD_URL, BaseUrlApi.APP_DOWNLOAD_URL + UserLgUtils.getAppVersionPathCode());
|
||||
startService(intent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user