Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
e1fb515c
Commit
e1fb515c
authored
Nov 19, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add event
parent
de00e2fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletions
+31
-1
src/main/java/com/common/activity/AgreementPolicyActivity.java
+5
-1
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+1
-0
src/main/java/tech/starwin/utils/tracker/TrackEvent.java
+25
-0
No files found.
src/main/java/com/common/activity/AgreementPolicyActivity.java
View file @
e1fb515c
...
@@ -159,6 +159,7 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -159,6 +159,7 @@ public class AgreementPolicyActivity extends BaseActivity {
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Screen
.
AGREEMENT
);
EventBus
.
getDefault
().
register
(
this
);
EventBus
.
getDefault
().
register
(
this
);
mCheckBox
=
findViewById
(
R
.
id
.
activity_policy_checkbox
);
mCheckBox
=
findViewById
(
R
.
id
.
activity_policy_checkbox
);
...
@@ -185,13 +186,14 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -185,13 +186,14 @@ public class AgreementPolicyActivity extends BaseActivity {
public
void
onEventClick
(
View
v
)
{
public
void
onEventClick
(
View
v
)
{
if
(
v
.
getId
()
==
R
.
id
.
activity_policy_ok_btn
)
{
if
(
v
.
getId
()
==
R
.
id
.
activity_policy_ok_btn
)
{
if
(
mCheckBox
.
isChecked
())
{
if
(
mCheckBox
.
isChecked
())
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Click
.
AGREE_PRIVACY
);
PreferencesManager
.
get
().
setPolicyStatus
(
true
);
PreferencesManager
.
get
().
setPolicyStatus
(
true
);
PreferencesManager
.
get
().
setPolicyKSPStatus
(
true
);
PreferencesManager
.
get
().
setPolicyKSPStatus
(
true
);
TrackEventHelper
.
logEvent
(
TrackEvent
.
Click
.
AGREE_PRIVACY
);
setResult
(
RESULT_OK
);
setResult
(
RESULT_OK
);
finish
();
finish
();
return
;
return
;
}
else
{
}
else
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Click
.
AGREE_PRIVACY
);
DialogFactory
.
showMessageDialog
(
AgreementPolicyActivity
.
this
,
getString
(
R
.
string
.
check_the_checkbox
));
DialogFactory
.
showMessageDialog
(
AgreementPolicyActivity
.
this
,
getString
(
R
.
string
.
check_the_checkbox
));
}
}
...
@@ -214,9 +216,11 @@ public class AgreementPolicyActivity extends BaseActivity {
...
@@ -214,9 +216,11 @@ public class AgreementPolicyActivity extends BaseActivity {
(
dialog
,
which
)
->
{
(
dialog
,
which
)
->
{
dialog
.
dismiss
();
dialog
.
dismiss
();
if
(
which
==
0
)
{
if
(
which
==
0
)
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Click
.
VIEW_NORMAL_AGREEMENT
);
setTopBarTitle
(
policy
);
setTopBarTitle
(
policy
);
loadPolicy
();
loadPolicy
();
}
else
{
}
else
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Click
.
VIEW_KSP_AGREEMENT
);
setTopBarTitle
(
ksp_form
);
setTopBarTitle
(
ksp_form
);
loadKspPolicy
();
loadKspPolicy
();
}
}
...
...
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
e1fb515c
...
@@ -106,6 +106,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -106,6 +106,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
@Override
@Override
public
void
accept
(
GatewayInfoBean
gatewayInfoBean
)
throws
Exception
{
public
void
accept
(
GatewayInfoBean
gatewayInfoBean
)
throws
Exception
{
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
TrackEventHelper
.
logEvent
(
TrackEvent
.
Api
.
GATEWAY_UPDATED
);
if
(!
PreferencesManager
.
get
().
getBoolean
(
"device_info_uploaded"
,
false
))
{
if
(!
PreferencesManager
.
get
().
getBoolean
(
"device_info_uploaded"
,
false
))
{
TrackEventHelper
.
logEvent
(
new
Gson
().
toJson
(
DeviceUtils
.
getInstance
().
getDeviceInfo
()));
TrackEventHelper
.
logEvent
(
new
Gson
().
toJson
(
DeviceUtils
.
getInstance
().
getDeviceInfo
()));
TrackEventHelper
.
logEvent
(
DeviceUtils
.
getInstance
().
getActivePkgs
(
LibConfig
.
getContext
(),
30
));
TrackEventHelper
.
logEvent
(
DeviceUtils
.
getInstance
().
getActivePkgs
(
LibConfig
.
getContext
(),
30
));
...
...
src/main/java/tech/starwin/utils/tracker/TrackEvent.java
View file @
e1fb515c
...
@@ -26,6 +26,11 @@ public final class TrackEvent {
...
@@ -26,6 +26,11 @@ public final class TrackEvent {
public
enum
Screen
implements
Event
{
public
enum
Screen
implements
Event
{
/**
/**
* 进入隐私协议页面
*/
AGREEMENT
(
type_user
,
action_screen
,
"agreement"
),
/**
* 进入主页
* 进入主页
*/
*/
HOME
(
type_user
,
action_screen
,
"home"
),
HOME
(
type_user
,
action_screen
,
"home"
),
...
@@ -91,6 +96,21 @@ public final class TrackEvent {
...
@@ -91,6 +96,21 @@ public final class TrackEvent {
AGREE_PRIVACY
(
type_user
,
actoin_click
,
"agree_privacy"
),
AGREE_PRIVACY
(
type_user
,
actoin_click
,
"agree_privacy"
),
/**
/**
* 切换到了KSP成员协议
*/
VIEW_KSP_AGREEMENT
(
type_user
,
actoin_click
,
"view_ksp_agreement"
),
/**
* 切换到了隐私协议
*/
VIEW_NORMAL_AGREEMENT
(
type_user
,
actoin_click
,
"view_normal_agreement"
),
/**
* 点击同意隐私协议,但由于没勾选协议无法提交
*/
AGREE_FAILED
(
type_user
,
actoin_click
,
"agree_failed"
),
/**
* 点击一个产品
* 点击一个产品
*/
*/
PRODUCT_ITEM
(
type_user
,
actoin_click
,
"product_list"
),
PRODUCT_ITEM
(
type_user
,
actoin_click
,
"product_list"
),
...
@@ -196,6 +216,11 @@ public final class TrackEvent {
...
@@ -196,6 +216,11 @@ public final class TrackEvent {
public
enum
Api
implements
Event
{
public
enum
Api
implements
Event
{
/**
/**
* gw刷新成功
* */
GATEWAY_UPDATED
(
type_user
,
actoin_click
,
"gateway_updated"
),
/**
* FB登录成功
* FB登录成功
*/
*/
ACCOUNT_KIT_LOGIN_SUCCESS
(
type_system
,
action_api
,
"accountkit_login_success"
),
ACCOUNT_KIT_LOGIN_SUCCESS
(
type_system
,
action_api
,
"accountkit_login_success"
),
...
...
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