-
public class DataUtilsCreated by xuxiaowei
-
-
Method Summary
Modifier and Type Method Description static voidputObjToJson(JSONObject source, String key, Object value)static StringgetDeviceIdCache(Context context)获取一个当前的设备标识缓存,和之前老的逻辑保持一致 static StringgetDeviceId(Context context)获取一个当前的设备标识,和之前老的逻辑保持一致 static StringgetOpenId()获取登录用户的openId static StringgetPersistUuid(Context context)获取一个persist uuid ,暂时不知道有什么用,获取的值其实与installed uuid一样 static StringgetInstalledUuid(Context context)获取一个installed uuid static StringgetAndroidID(Context context)获取 Android ID static StringgetIMEI(Context context)获取IMEI static booleancheckHasPermission(Context context, String permission)检测权限 static StringgetCarrier(Context context)获取运营商信息 static JSONObjectaddCustomPropertyMark(JSONObject properties)static voidmergeJSONObject(JSONObject source, JSONObject dest)static JSONObjectmergeSuperJSONObject(JSONObject source, JSONObject dest)合并、去重公共属性 -
-
Method Detail
-
putObjToJson
static void putObjToJson(JSONObject source, String key, Object value)
-
getDeviceIdCache
static String getDeviceIdCache(Context context)
获取一个当前的设备标识缓存,和之前老的逻辑保持一致
-
getDeviceId
static String getDeviceId(Context context)
获取一个当前的设备标识,和之前老的逻辑保持一致
-
getPersistUuid
static String getPersistUuid(Context context)
获取一个persist uuid ,暂时不知道有什么用,获取的值其实与installed uuid一样
-
getInstalledUuid
static String getInstalledUuid(Context context)
获取一个installed uuid
-
getAndroidID
static String getAndroidID(Context context)
获取 Android ID
- Parameters:
context- Context
-
checkHasPermission
static boolean checkHasPermission(Context context, String permission)
检测权限
- Parameters:
context- Contextpermission- 权限名称
-
getCarrier
static String getCarrier(Context context)
获取运营商信息
- Parameters:
context- Context
-
addCustomPropertyMark
static JSONObject addCustomPropertyMark(JSONObject properties)
-
mergeJSONObject
static void mergeJSONObject(JSONObject source, JSONObject dest)
-
mergeSuperJSONObject
static JSONObject mergeSuperJSONObject(JSONObject source, JSONObject dest)
合并、去重公共属性
- Parameters:
source- 新加入或者优先级高的属性dest- 本地缓存或者优先级低的属性,如果有重复会删除该属性
-
-
-
-