Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
8f075270
Commit
8f075270
authored
Jun 02, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加三方调用失败上传接口
parent
eac2b2b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
27 deletions
+77
-27
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+3
-0
ShumeiManager.java
.../main/java/com/mints/goodmoney/manager/ShumeiManager.java
+16
-0
TrackManager.java
...c/main/java/com/mints/goodmoney/manager/TrackManager.java
+6
-0
TrackPresenter.java
...va/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
+19
-0
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+8
-0
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+25
-27
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
8f075270
...
@@ -273,4 +273,7 @@ object Constant {
...
@@ -273,4 +273,7 @@ object Constant {
const
val
GRO_MORE_ADTYPE0
=
"0"
const
val
GRO_MORE_ADTYPE0
=
"0"
const
val
GRO_MORE_ADTYPE1
=
"1"
const
val
GRO_MORE_ADTYPE1
=
"1"
const
val
GRO_MORE_ADTYPE2
=
"2"
const
val
GRO_MORE_ADTYPE2
=
"2"
// 异常上报类型
const
val
SHUMEI_EXCEPTION
=
"SHUMEI"
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ShumeiManager.java
View file @
8f075270
...
@@ -6,6 +6,9 @@ import android.text.TextUtils;
...
@@ -6,6 +6,9 @@ import android.text.TextUtils;
import
com.ishumei.smantifraud.SmAntiFraud
;
import
com.ishumei.smantifraud.SmAntiFraud
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
java.util.HashMap
;
/**
/**
* 描述:数美反欺诈
* 描述:数美反欺诈
...
@@ -69,6 +72,12 @@ public class ShumeiManager {
...
@@ -69,6 +72,12 @@ public class ShumeiManager {
SmAntiFraud
.
create
(
context
,
option
);
SmAntiFraud
.
create
(
context
,
option
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"type"
,
Constant
.
SHUMEI_EXCEPTION
);
vo
.
put
(
"msg"
,
e
.
getMessage
());
vo
.
put
(
"stack"
,
e
.
toString
());
vo
.
put
(
"event"
,
"init"
);
TrackManager
.
getInstance
().
cmtExceptionInfo
(
vo
);
}
}
}
}
...
@@ -82,6 +91,13 @@ public class ShumeiManager {
...
@@ -82,6 +91,13 @@ public class ShumeiManager {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
id
=
""
;
id
=
""
;
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"type"
,
Constant
.
SHUMEI_EXCEPTION
);
vo
.
put
(
"msg"
,
e
.
getMessage
());
vo
.
put
(
"stack"
,
e
.
toString
());
vo
.
put
(
"event"
,
"getDeviceId"
);
TrackManager
.
getInstance
().
cmtExceptionInfo
(
vo
);
}
}
if
(
TextUtils
.
isEmpty
(
id
))
{
if
(
TextUtils
.
isEmpty
(
id
))
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TrackManager.java
View file @
8f075270
...
@@ -149,4 +149,10 @@ public class TrackManager {
...
@@ -149,4 +149,10 @@ public class TrackManager {
trackPresenter
.
cmtGroMoreInfo
(
vo
);
trackPresenter
.
cmtGroMoreInfo
(
vo
);
}
}
}
}
public
void
cmtExceptionInfo
(
HashMap
<
String
,
Object
>
vo
)
{
if
(
trackPresenter
!=
null
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
trackPresenter
.
cmtExceptionInfo
(
vo
);
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
View file @
8f075270
...
@@ -419,4 +419,23 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -419,4 +419,23 @@ public class TrackPresenter extends BaseTrackPresenter {
}
}
});
});
}
}
public
void
cmtExceptionInfo
(
HashMap
<
String
,
Object
>
vo
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
reportError
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
}
});
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
8f075270
...
@@ -663,6 +663,14 @@ public interface LoanService {
...
@@ -663,6 +663,14 @@ public interface LoanService {
@POST
(
"api/reportAdIncome"
)
@POST
(
"api/reportAdIncome"
)
Observable
<
BaseResponse
<
Object
>>
reportAdIncome
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
reportAdIncome
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 三方调用失败上传
*
* @return
*/
@POST
(
"api/reportError"
)
Observable
<
BaseResponse
<
Object
>>
reportError
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
8f075270
...
@@ -6,6 +6,7 @@ import android.content.Intent;
...
@@ -6,6 +6,7 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.mvp.presenters.VersionUpdatePresenter
;
import
com.mints.goodmoney.mvp.presenters.VersionUpdatePresenter
;
import
com.mints.goodmoney.ui.activitys.SplashADActivity
;
import
com.mints.goodmoney.ui.activitys.SplashADActivity
;
...
@@ -33,7 +34,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -33,7 +34,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
private
VersionUpdatePresenter
vup
;
private
VersionUpdatePresenter
vup
;
private
WeakReference
<
Activity
>
reference
;
private
WeakReference
<
Activity
>
reference
;
private
Intent
ylhIntent
;
private
Intent
ylhIntent
;
private
Intent
ks
Intent
;
private
Intent
gro
Intent
;
private
Intent
csjIntent
;
private
Intent
csjIntent
;
public
static
ForegroundOrBackground
init
(
Application
application
)
{
public
static
ForegroundOrBackground
init
(
Application
application
)
{
...
@@ -107,33 +108,30 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -107,33 +108,30 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
// 60秒后打开应用 显示开屏广告
// 60秒后打开应用 显示开屏广告
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
60000
)
{
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
60000
)
{
// if (isYlhSplash) {
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
// isYlhSplash = false;
if
(
groIntent
==
null
)
{
//
groIntent
=
new
Intent
(
activity
,
SplashGroMoreActivity
.
class
);
// if (ylhIntent == null) {
}
// // 优量汇广告
activity
.
startActivity
(
groIntent
);
// ylhIntent = new Intent(activity, SplashADActivity.class);
}
else
{
// }
if
(
isYlhSplash
)
{
// activity.startActivity(ylhIntent);
isYlhSplash
=
false
;
// } else {
// isYlhSplash = true;
if
(
ylhIntent
==
null
)
{
//
// 优量汇广告
// if (csjIntent == null) {
ylhIntent
=
new
Intent
(
activity
,
SplashADActivity
.
class
);
// // 快手广告
}
// csjIntent = new Intent(activity, SplashCsjADActivity.class);
activity
.
startActivity
(
ylhIntent
);
// }
}
else
{
// activity.startActivity(csjIntent);
isYlhSplash
=
true
;
//
//// if (ksIntent == null) {
if
(
csjIntent
==
null
)
{
//// // 快手广告
// 快手广告
//// ksIntent = new Intent(activity, SplashKsADActivity.class);
csjIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
//// }
}
//// activity.startActivity(ksIntent);
activity
.
startActivity
(
csjIntent
);
// }
}
if
(
ksIntent
==
null
)
{
ksIntent
=
new
Intent
(
activity
,
SplashGroMoreActivity
.
class
);
}
}
activity
.
startActivity
(
ksIntent
);
}
}
}
}
count
++;
count
++;
...
...
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