Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
bff94e60
Commit
bff94e60
authored
Jul 20, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新人匹配逻辑,非0.01用户首次进来进入视频播放页面
parent
1b93e86e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
13 deletions
+98
-13
Constant.kt
.../app/src/main/java/com/xinfu/helivideo/common/Constant.kt
+1
-0
TrackPresenter.java
...va/com/xinfu/helivideo/mvp/presenters/TrackPresenter.java
+33
-0
LoanService.java
...pp/src/main/java/com/xinfu/helivideo/net/LoanService.java
+7
-0
SplashActivity.kt
...n/java/com/xinfu/helivideo/ui/activitys/SplashActivity.kt
+28
-6
SplashAdActivity.kt
...java/com/xinfu/helivideo/ui/activitys/SplashAdActivity.kt
+29
-7
No files found.
video/app/src/main/java/com/xinfu/helivideo/common/Constant.kt
View file @
bff94e60
...
...
@@ -15,6 +15,7 @@ object Constant {
const
val
FIRST_SPLASH
=
"first_splash"
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VIP_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VEDIO
=
"is_first_vedio"
const
val
TAG_NAME
=
"SUN"
const
val
MINTS_APP_NAME
=
"河狸短视频"
const
val
MINTS_PKG_NAME
=
"com.xinfu.helivideo"
...
...
video/app/src/main/java/com/xinfu/helivideo/mvp/presenters/TrackPresenter.java
View file @
bff94e60
...
...
@@ -4,6 +4,11 @@ import android.content.Context;
import
android.util.Log
;
import
com.google.gson.JsonObject
;
import
com.xinfu.helivideo.common.Constant
;
import
com.xinfu.helivideo.manager.LocalVedioManager
;
import
com.xinfu.helivideo.mvp.model.IndexList
;
import
com.xinfu.helivideo.mvp.model.VedioBean
;
import
com.xinfu.helivideo.utils.AppPreferencesManager
;
import
com.xinfu.library.net.neterror.BaseSubscriber
;
import
com.xinfu.library.net.neterror.Throwable
;
import
com.xinfu.helivideo.MintsApplication
;
...
...
@@ -106,6 +111,7 @@ public class TrackPresenter extends BaseTrackPresenter {
switch
(
baseResponse
.
getStatus
())
{
case
200
:
{
getMyInfo
();
getSoltVedio
();
}
}
}
...
...
@@ -217,4 +223,31 @@ public class TrackPresenter extends BaseTrackPresenter {
}
});
}
public
void
getSoltVedio
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getSoltVedio
(),
new
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
IndexList
>
baseResponse
)
{
switch
(
baseResponse
.
getStatus
())
{
case
200
:
{
IndexList
data
=
baseResponse
.
getData
();
if
(
data
!=
null
&&
data
.
getVedioMsg
()
!=
null
)
{
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
true
);
LocalVedioManager
.
INSTANCE
.
commitVedio
(
data
.
getVedioMsg
());
}
}
}
}
});
}
}
video/app/src/main/java/com/xinfu/helivideo/net/LoanService.java
View file @
bff94e60
...
...
@@ -12,6 +12,7 @@ import com.xinfu.helivideo.mvp.model.HotStyleTypesList;
import
com.xinfu.helivideo.mvp.model.IndexList
;
import
com.xinfu.helivideo.mvp.model.OrderRecordBean
;
import
com.xinfu.helivideo.mvp.model.UserBean
;
import
com.xinfu.helivideo.mvp.model.VedioBean
;
import
com.xinfu.helivideo.mvp.model.Version
;
import
com.xinfu.helivideo.mvp.model.VipBean
;
import
com.xinfu.helivideo.mvp.model.WxPayParamBean
;
...
...
@@ -268,6 +269,12 @@ public interface LoanService {
@POST
(
"api/vvedio/init"
)
Observable
<
BaseResponse
<
Object
>>
commitCsjShotInfo
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 推荐
*/
@POST
(
"api/vedio/firstVedio"
)
Observable
<
BaseResponse
<
IndexList
>>
getSoltVedio
();
/**
* 默认http工厂
*/
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/activitys/SplashActivity.kt
View file @
bff94e60
...
...
@@ -10,6 +10,7 @@ import com.xinfu.helivideo.ad.splash.SplashManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.common.Constant.PRIVACY_URL
import
com.xinfu.helivideo.common.Constant.REGISTER_URL
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.TrackManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.ui.activitys.base.BaseActivity
...
...
@@ -144,14 +145,35 @@ class SplashActivity : BaseActivity() {
private
fun
goToMainActivity
()
{
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// if ((UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) || !vipEnter) {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
false
)
if
(
firstVedio
)
{
// 匹配用户 进来后直接播放剧
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
false
)
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
LocalVedioManager
.
startVedioDetailActivityForType
(
this
,
cacheVedio
)
}
else
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/activitys/SplashAdActivity.kt
View file @
bff94e60
...
...
@@ -8,6 +8,7 @@ import com.xinfu.helivideo.R
import
com.xinfu.helivideo.ad.AdStatusListener
import
com.xinfu.helivideo.ad.splash.SplashManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.ui.activitys.base.BaseActivity
import
com.xinfu.helivideo.ui.widgets.countdowntimer.CountDownTimerSupport
...
...
@@ -95,16 +96,37 @@ class SplashAdActivity : BaseActivity() {
* 跳转到主页面
*/
private
fun
goToMainActivity
()
{
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// val vipEnter = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VIP_BTN, false)
// if ((UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) || !vipEnter) {
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
false
)
if
(
firstVedio
)
{
// 匹配用户 进来后直接播放剧
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VEDIO
,
false
)
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
LocalVedioManager
.
startVedioDetailActivityForType
(
this
,
cacheVedio
)
}
else
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// AppPreferencesManager.get().put(Constant.IS_FIRST_VIP_BTN, true)
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
readyGoThenKill
(
VipActivity
::
class
.
java
,
bundle
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment