public static AnySDKAnalytics getInstance() { if( null == _instance ) { _instance = new AnySDKAnalytics(); } return _instance; }
public float callFloatFuncWithParam(string functionName, AnySDKParam param) { List <AnySDKParam> list = new List <AnySDKParam>(); list.Add(param); return(AnySDKAnalytics.AnySDKAnalytics_nativeCallFloatFuncWithParam(functionName, list.ToArray(), list.Count)); }
public void callFuncWithParam(string functionName, AnySDKParam param) { List <AnySDKParam> list = new List <AnySDKParam>(); list.Add(param); AnySDKAnalytics.AnySDKAnalytics_nativeCallFuncWithParam(functionName, list.ToArray(), list.Count); }
private static AnySDKAnalytics instance() { if (null == _instance) { _instance = new AnySDKAnalytics(); } return(_instance); }
public static AnySDKAnalytics getInstance() { if (null == _instance) { _instance = new AnySDKAnalytics(); } return(_instance); }
public static AnySDKAnalytics getInstance() { if (AnySDKAnalytics._instance == null) { AnySDKAnalytics._instance = new AnySDKAnalytics(); } return(AnySDKAnalytics._instance); }
public string getSDKVersion() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Capacity = 1024; AnySDKAnalytics.AnySDKAnalytics_nativeGetSDKVersion(stringBuilder); return(stringBuilder.ToString()); }
public bool callBoolFuncWithParam(string functionName, List <AnySDKParam> param = null) { if (param == null) { return(AnySDKAnalytics.AnySDKAnalytics_nativeCallBoolFuncWithParam(functionName, null, 0)); } return(AnySDKAnalytics.AnySDKAnalytics_nativeCallBoolFuncWithParam(functionName, param.ToArray(), param.Count)); }
/** * 实现在应用程序中埋点来统计用户的点击行为 */ void logEvent() { Dictionary <string, string> dic = new Dictionary <string, string>(); dic["100"] = "Page1 open"; dic["角色名称"] = "yonghu"; dic["登陆时间"] = "2014"; AnySDKAnalytics.getInstance().logEvent("10", dic); }
void failTask() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Task_Id"] = "123456"; paramMap["Fail_Reason"] = "test"; AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("failTask", param); }
private void startLevel() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Level_Id"] = "123456"; dictionary["Seq_Num"] = "1"; AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("startLevel", param); }
void startLevel() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Level_Id"] = "123456"; paramMap["Seq_Num"] = "1"; AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("startLevel", param); }
void onChargeFail() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Order_Id"] = "123456"; paramMap["Fail_Reason"] = "test"; AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("onChargeFail", param); }
private void failTask() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Task_Id"] = "123456"; dictionary["Fail_Reason"] = "test"; AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("failTask", param); }
private void startTask() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Task_Id"] = "123456"; dictionary["Task_Type"] = Convert.ToString(0); AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("startTask", param); }
void startTask() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Task_Id"] = "123456"; paramMap["Task_Type"] = Convert.ToString((int)TaskType.GUIDE_LINE); AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("startTask", param); }
void OnGUI() { GUI.color = Color.white; GUI.skin.button.fontSize = 30; if (GUI.Button(new Rect(5, 5, Screen.width - 10, 70), "startSession")) { AnySDKAnalytics.getInstance().setDebugMode(true); startSession(); } if (GUI.Button(new Rect(5, 80, Screen.width - 10, 70), "stopSession")) { stopSession(); } if (GUI.Button(new Rect(5, 155, Screen.width - 10, 70), "setSessionContinueMillis")) { setSessionContinueMillis(); } if (GUI.Button(new Rect(5, 230, Screen.width - 10, 70), "logError")) { logError(); } if (GUI.Button(new Rect(5, 305, Screen.width - 10, 70), "logEvent")) { logEvent(); } if (GUI.Button(new Rect(5, 380, Screen.width - 10, 70), "logTimedEventBegin")) { logTimedEventBegin(); } if (GUI.Button(new Rect(5, 455, Screen.width - 10, 70), "logTimedEventEnd")) { logTimedEventEnd(); } if (GUI.Button(new Rect(5, 530, Screen.width - 10, 70), "setCaptureUncaughtException")) { setCaptureUncaughtException( ); } if (GUI.Button(new Rect(5, 605, Screen.width - 10, 70), "return")) { Destroy(GetComponent("TestAnalyticsPlugin")); this.gameObject.AddComponent("Test"); } }
public string callStringFuncWithParam(string functionName, AnySDKParam param) { List <AnySDKParam> list = new List <AnySDKParam>(); list.Add(param); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Capacity = 1024; AnySDKAnalytics.AnySDKAnalytics_nativeCallStringFuncWithParam(functionName, list.ToArray(), list.Count, stringBuilder); return(stringBuilder.ToString()); }
public void callFuncWithParam(string functionName, List <AnySDKParam> param = null) { if (param == null) { AnySDKAnalytics.AnySDKAnalytics_nativeCallFuncWithParam(functionName, null, 0); } else { AnySDKAnalytics.AnySDKAnalytics_nativeCallFuncWithParam(functionName, param.ToArray(), param.Count); } }
private void onUse() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Item_Id"] = "123456"; dictionary["Item_Type"] = "test"; dictionary["Item_Count"] = Convert.ToString(2); dictionary["Use_Reason"] = "1"; AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("onUse", param); }
void onReward() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Item_Id"] = "123456"; paramMap["Item_Type"] = "test"; paramMap["Item_Count"] = Convert.ToString(2); paramMap["Use_Reason"] = "1"; AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("onReward", param); }
void onPurchase() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Item_Id"] = "123456"; paramMap["Item_Type"] = "test"; paramMap["Item_Count"] = Convert.ToString(2); paramMap["Virtual_Currency"] = "1"; paramMap["Currency_Type"] = AnySDK.getInstance().getChannelId(); AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("onPurchase", param); }
public void logEvent(string eventId, Dictionary <string, string> paramMap = null) { string message; if (paramMap == null) { message = null; } else { message = AnySDKUtil.dictionaryToString(paramMap); } AnySDKAnalytics.AnySDKAnalytics_nativeLogEvent(eventId, message); }
void onChargeOnlySuccess() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Order_Id"] = "123456"; paramMap["Product_Name"] = "test"; paramMap["Currency_Amount"] = Convert.ToString(2.0); paramMap["Currency_Type"] = "1"; paramMap["Payment_Type"] = "1"; paramMap["Virtual_Currency_Amount"] = Convert.ToString(100); AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("onChargeOnlySuccess", param); }
private void onChargeRequest() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Order_Id"] = "123456"; dictionary["Product_Name"] = "test"; dictionary["Currency_Amount"] = Convert.ToString(2.0); dictionary["Currency_Type"] = "1"; dictionary["Payment_Type"] = "1"; dictionary["Virtual_Currency_Amount"] = Convert.ToString(100); AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("onChargeRequest", param); }
public string callStringFuncWithParam(string functionName, List <AnySDKParam> param = null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Capacity = 1024; if (param == null) { AnySDKAnalytics.AnySDKAnalytics_nativeCallStringFuncWithParam(functionName, null, 0, stringBuilder); } else { AnySDKAnalytics.AnySDKAnalytics_nativeCallStringFuncWithParam(functionName, param.ToArray(), param.Count, stringBuilder); } return(stringBuilder.ToString()); }
void setAccount() { Dictionary <string, string> paramMap = new Dictionary <string, string>(); paramMap["Account_Id"] = "123"; paramMap["Account_Name"] = "test"; paramMap["Account_Type"] = Convert.ToString((int)AccountType.ANONYMOUS); paramMap["Account_Level"] = "1"; paramMap["Account_Age"] = "1"; paramMap["Account_Operate"] = Convert.ToString((int)AccountOperate.LOGIN); paramMap["Account_Gender"] = Convert.ToString((int)AccountGender.MALE); paramMap["Server_Id"] = "1"; AnySDKParam param = new AnySDKParam(paramMap); AnySDKAnalytics.getInstance().callFuncWithParam("setAccount", param); }
private void setAccount() { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Account_Id"] = "123"; dictionary["Account_Name"] = "test"; dictionary["Account_Type"] = Convert.ToString(0); dictionary["Account_Level"] = "1"; dictionary["Account_Age"] = "1"; dictionary["Account_Operate"] = Convert.ToString(0); dictionary["Account_Gender"] = Convert.ToString(0); dictionary["Server_Id"] = "1"; AnySDKParam param = new AnySDKParam(dictionary); AnySDKAnalytics.getInstance().callFuncWithParam("setAccount", param); }
private void OnGUI() { GUI.color = Color.white; GUI.skin.button.fontSize = 30; if (GUI.Button(new Rect(5f, 5f, (float)(Screen.width - 10), 70f), "startSession")) { AnySDKAnalytics.getInstance().setDebugMode(true); this.startSession(); } if (GUI.Button(new Rect(5f, 80f, (float)(Screen.width - 10), 70f), "stopSession")) { this.stopSession(); } if (GUI.Button(new Rect(5f, 155f, (float)(Screen.width - 10), 70f), "setSessionContinueMillis")) { this.setSessionContinueMillis(); } if (GUI.Button(new Rect(5f, 230f, (float)(Screen.width - 10), 70f), "logError")) { this.logError(); } if (GUI.Button(new Rect(5f, 305f, (float)(Screen.width - 10), 70f), "logEvent")) { this.logEvent(); } if (GUI.Button(new Rect(5f, 380f, (float)(Screen.width - 10), 70f), "logTimedEventBegin")) { this.logTimedEventBegin(); } if (GUI.Button(new Rect(5f, 455f, (float)(Screen.width - 10), 70f), "logTimedEventEnd")) { this.logTimedEventEnd(); } if (GUI.Button(new Rect(5f, 530f, (float)(Screen.width - 10), 70f), "setCaptureUncaughtException")) { this.setCaptureUncaughtException(); } if (GUI.Button(new Rect(5f, 605f, (float)(Screen.width - 10), 70f), "return")) { UnityEngine.Object.Destroy(base.GetComponent("TestAnalyticsPlugin")); base.gameObject.AddComponent("Test"); } }
public void setDebugMode(bool bDebug) { AnySDKAnalytics.AnySDKAnalytics_nativeSetDebugMode(bDebug); }
public bool isFunctionSupported(string functionName) { return(AnySDKAnalytics.AnySDKAnalytics_nativeIsFunctionSupported(functionName)); }