-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wp
committed
Jul 16, 2020
1 parent
7df4a14
commit 42af0f5
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ans-sdk/analysys_core/src/main/java/com/analysys/ObserverListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.analysys; | ||
|
||
/** | ||
* Create by Kevin on 2019-08-28 | ||
* Describe: | ||
*/ | ||
public interface ObserverListener { | ||
/** | ||
* @param key 用户属性的key值,是上传的时候key值,比如用户ID是xwho | ||
* @param value 用户属性值 | ||
*/ | ||
void onUserProfile(final String key, final String value); | ||
|
||
/** | ||
* @param event 完整的用户上传的json数据 | ||
*/ | ||
void onEventMessage(final String event); | ||
} |
51 changes: 51 additions & 0 deletions
51
ans-sdk/analysys_core/src/main/java/com/analysys/easytouch/EasytouchProcess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.analysys.easytouch; | ||
|
||
import com.analysys.ObserverListener; | ||
import com.analysys.utils.AnalysysUtil; | ||
import com.analysys.utils.CommonUtils; | ||
|
||
/** | ||
* Create by Kevin on 2020/6/3 | ||
* Describe: | ||
*/ | ||
public class EasytouchProcess { | ||
|
||
private final static String OBSERVER_XWHO = "xwho"; | ||
|
||
private static EasytouchProcess sInstance; | ||
|
||
private ObserverListener listener; | ||
|
||
private EasytouchProcess() { | ||
} | ||
|
||
public static EasytouchProcess getInstance() { | ||
if (sInstance == null) { | ||
synchronized (EasytouchProcess.class) { | ||
if (sInstance == null) { | ||
sInstance = new EasytouchProcess(); | ||
} | ||
} | ||
} | ||
return sInstance; | ||
} | ||
|
||
public void setObserverListener(ObserverListener listener) { | ||
this.listener = listener; | ||
if (this.listener != null) { | ||
this.listener.onUserProfile(OBSERVER_XWHO, CommonUtils.getUserId(AnalysysUtil.getContext())); | ||
} | ||
} | ||
|
||
public void setXwho(final String xwho) { | ||
if (this.listener != null) { | ||
this.listener.onUserProfile(OBSERVER_XWHO, xwho); | ||
} | ||
} | ||
|
||
public void setEventMessage(final String message) { | ||
if (this.listener != null) { | ||
this.listener.onEventMessage(message); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ext { | ||
|
||
version = '4.4.11' | ||
version = '4.4.12' | ||
|
||
|
||
|
||
|