iOS接入热云
This commit is contained in:
parent
d181e9619e
commit
f31a89bfc5
|
|
@ -28,11 +28,11 @@ public class InterVideoButton : JPButton
|
|||
switch (iVNumber)
|
||||
{
|
||||
case IVNumber.Inter1:
|
||||
JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID, "test1");
|
||||
// JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID, "test1");
|
||||
break;
|
||||
case IVNumber.Inter2:
|
||||
#if TWOINTER
|
||||
JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID2,"test2");
|
||||
// JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID2,"test2");
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ public class JoypacStaticBuildPostProcessor
|
|||
proj.AddFrameworkToProject(target, "AdSupport.framework", false);
|
||||
|
||||
|
||||
proj.AddFrameworkToProject(target, "CoreMotion.framework", false);
|
||||
proj.AddFrameworkToProject(target, "iAd.framework", false);
|
||||
proj.AddFrameworkToProject(target, "AdServices.framework", true);
|
||||
proj.AddFrameworkToProject(target, "AVFoundation.framework", false);
|
||||
proj.AddFrameworkToProject(target, "CFNetwork.framework", false);
|
||||
proj.AddFrameworkToProject(target, "WebKit.framework", false);
|
||||
|
||||
|
||||
|
||||
// Foundation.framework
|
||||
//UIKit.framework
|
||||
|
|
@ -123,6 +131,9 @@ public class JoypacStaticBuildPostProcessor
|
|||
proj.AddFileToBuild(target, fileGuidSqlite);
|
||||
proj.AddFrameworkToProject(target, "AppTrackingTransparency.framework", true);//这里要check一下
|
||||
|
||||
proj.AddFileToBuild(target, fileGuidSqlite);
|
||||
fileGuidSqlite = proj.AddFile("usr/lib/libresolv.9.tbd", "Libraries/libresolv.9.tbd", PBXSourceTree.Sdk);
|
||||
|
||||
|
||||
//--------------------------------------在JoyPacSDK中加入 -------------------------------------------------------------------------
|
||||
//#if UNITY_2019_3_OR_NEWER//这个路径要改一下,不用bundle,用对应的文件夹,但是需要check是否存在,不存在就报个错。
|
||||
|
|
@ -215,7 +226,11 @@ public class JoypacStaticBuildPostProcessor
|
|||
|
||||
plist.root.SetString("BytePlusAppId", "353656");
|
||||
plist.root.SetBoolean("isChina", true);
|
||||
|
||||
plist.root.SetString("reyunAppKey", "0ab788eb8072e0c4a6117ea3faf20c9c");
|
||||
plist.root.SetString("projectAppID", "10007");
|
||||
|
||||
|
||||
plist.root.SetString("KlevinApplicationIdentifier", "");
|
||||
|
||||
File.WriteAllText(plistPath, plist.WriteToString());
|
||||
|
|
|
|||
|
|
@ -119,7 +119,14 @@ public class JoypacAdClient : MonoBehaviour
|
|||
[DllImport("__Internal")]
|
||||
private static extern void profileSet(string profileParams);
|
||||
|
||||
// 热云数据埋点上传
|
||||
[DllImport("__Internal")]
|
||||
private static extern void reyunEvent(string eventId, string eventParams);
|
||||
|
||||
public void ReyunEvent(string eventId, string eventParams)
|
||||
{
|
||||
reyunEvent(eventId, eventParams);
|
||||
}
|
||||
//Finder相关
|
||||
public void UploadEvent(string eventId, string eventParams)
|
||||
{
|
||||
|
|
@ -430,6 +437,12 @@ public class JoypacAdClient : MonoBehaviour
|
|||
|
||||
Debug.Log("finder 插屏展示准备");
|
||||
|
||||
|
||||
|
||||
JoypacAnalyticsManager.Instance.aPPAdsShowCome = PlayerPrefs.GetString(StaticStringsEvent.aPPAdsShowCome, StaticStringsEvent.Interstitial);
|
||||
JoypacAnalyticsManager.Instance.aPPAdsShowAdType = PlayerPrefs.GetString(StaticStringsEvent.aPPAdsShowAdType, StaticStringsEvent.Interstitial);
|
||||
|
||||
|
||||
JoypacAnalyticsManager.Instance.APPAdsShow(jsonTemp);
|
||||
Debug.Log("finder 插屏展示结束");
|
||||
|
||||
|
|
@ -530,6 +543,9 @@ public class JoypacAdClient : MonoBehaviour
|
|||
Dictionary<string, object> jsonTemp = new Dictionary<string, object>();
|
||||
jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json);
|
||||
|
||||
JoypacAnalyticsManager.Instance.aPPAdsShowCome = PlayerPrefs.GetString(StaticStringsEvent.aPPAdsShowCome, StaticStringsEvent.Reward);
|
||||
JoypacAnalyticsManager.Instance.aPPAdsShowAdType = PlayerPrefs.GetString(StaticStringsEvent.aPPAdsShowAdType, StaticStringsEvent.Reward);
|
||||
|
||||
|
||||
JoypacAnalyticsManager.Instance.APPAdsShow(jsonTemp);
|
||||
Debug.Log("finder 激励视频展示结束");
|
||||
|
|
|
|||
|
|
@ -122,5 +122,10 @@
|
|||
public const string Recipe2Reward = "Recipe2Reward";
|
||||
|
||||
|
||||
public const string aPPAdsShowCome = "aPPAdsShowCome";
|
||||
|
||||
public const string aPPAdsShowAdType = "aPPAdsShowAdType";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -89,6 +89,9 @@ public class JoypacAnalyticsManager : MonoBehaviour
|
|||
aPPAdsShowCome = AdsShowCome;
|
||||
aPPAdsShowAdType = AdsShowAdType;
|
||||
|
||||
PlayerPrefs.SetString(StaticStringsEvent.aPPAdsShowCome, AdsShowCome);
|
||||
PlayerPrefs.SetString(StaticStringsEvent.aPPAdsShowAdType, AdsShowAdType);
|
||||
|
||||
// AppFunShow(name,extras);
|
||||
AppFunClick(name, from);
|
||||
}
|
||||
|
|
@ -113,9 +116,9 @@ public class JoypacAnalyticsManager : MonoBehaviour
|
|||
|
||||
public void setEvent(string eventName, Dictionary<string, object> values)
|
||||
{
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
Debug.Log("setEvent========coming");
|
||||
//ryattrs
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
values.Add("ryattrs", JsonConvert.SerializeObject(values));
|
||||
JoyPacCurrentcyAdSingle currAdSingleTemp = new JoyPacCurrentcyAdSingle();
|
||||
|
||||
|
|
@ -143,6 +146,11 @@ public class JoypacAnalyticsManager : MonoBehaviour
|
|||
currAdSingleTemp.reyunKeyEvent(eventName, JsonConvert.SerializeObject(values));
|
||||
#endif
|
||||
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
|
||||
JoypacAdClient.Instance.ReyunEvent(eventName, JsonConvert.SerializeObject(values));
|
||||
#endif
|
||||
|
||||
}
|
||||
public void Volcano(VolcanoReYunJson json)
|
||||
{
|
||||
|
|
@ -246,6 +254,10 @@ public class JoypacAnalyticsManager : MonoBehaviour
|
|||
currAdSingleTemp.reyun_report_ad_show(aPPAdsShowCome, aPPAdsShowAdType, adSource["AdSourceId"].ToString(), adSource["From"].ToString(), adSource["price_int"].ToString(), adSource["price_string"].ToString(), adSource["currency"].ToString());
|
||||
// ReYun(temp);
|
||||
#endif
|
||||
|
||||
#if JOYPAC_ReYun && UNITY_IOS&&!UNITY_EDITOR
|
||||
ReYun(temp);
|
||||
#endif
|
||||
}
|
||||
public void APPAdsClick(Dictionary<string, object> adSource)
|
||||
{
|
||||
|
|
@ -272,6 +284,10 @@ public class JoypacAnalyticsManager : MonoBehaviour
|
|||
currAdSingleTemp.reyun_report_ad_click(aPPAdsShowCome, aPPAdsShowAdType, adSource["AdSourceId"].ToString(), adSource["From"].ToString());
|
||||
// ReYun(temp);
|
||||
#endif
|
||||
|
||||
#if JOYPAC_ReYun && UNITY_IOS && !UNITY_EDITOR
|
||||
ReYun(temp);
|
||||
#endif
|
||||
}
|
||||
public void AppAdsReward(Dictionary<string, object> adSource)
|
||||
{
|
||||
|
|
|
|||
388
popcorn/Assets/Joypac/Scripts/Thirdparty/ReYunSDK/Traking.cs
vendored
Executable file → Normal file
388
popcorn/Assets/Joypac/Scripts/Thirdparty/ReYunSDK/Traking.cs
vendored
Executable file → Normal file
|
|
@ -1,240 +1,240 @@
|
|||
using UnityEngine;
|
||||
//using UnityEngine;
|
||||
|
||||
//using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
////using UnityEngine.UI;
|
||||
//using System.Collections;
|
||||
//using System.Runtime.InteropServices;
|
||||
//using System.Collections.Generic;
|
||||
|
||||
public class Tracking: MonoBehaviour
|
||||
{
|
||||
private static Tracking _instance = null;
|
||||
//public class Tracking: MonoBehaviour
|
||||
//{
|
||||
// private static Tracking _instance = null;
|
||||
|
||||
public static Tracking Instance {
|
||||
get {
|
||||
if (!_instance) {
|
||||
_instance = GameObject.FindObjectOfType (typeof(Tracking)) as Tracking;
|
||||
if (!_instance) {
|
||||
GameObject am = new GameObject ("Tracking");
|
||||
_instance = am.AddComponent (typeof(Tracking)) as Tracking;
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
// public static Tracking Instance {
|
||||
// get {
|
||||
// if (!_instance) {
|
||||
// _instance = GameObject.FindObjectOfType (typeof(Tracking)) as Tracking;
|
||||
// if (!_instance) {
|
||||
// GameObject am = new GameObject ("Tracking");
|
||||
// _instance = am.AddComponent (typeof(Tracking)) as Tracking;
|
||||
// }
|
||||
// }
|
||||
// return _instance;
|
||||
// }
|
||||
// }
|
||||
|
||||
void Awake ()
|
||||
{
|
||||
DontDestroyOnLoad (this);
|
||||
}
|
||||
#if UNITY_IOS
|
||||
// void Awake ()
|
||||
// {
|
||||
// DontDestroyOnLoad (this);
|
||||
// }
|
||||
// #if UNITY_IOS
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalInitWithAppKeyAndChannel_Tracking (string appKey, string channelId);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalInitWithAppKeyAndChannel_Tracking (string appKey, string channelId);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetRegisterWithAccountID_Tracking (string account);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetRegisterWithAccountID_Tracking (string account);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetLoginWithAccountID_Tracking (string account);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetLoginWithAccountID_Tracking (string account);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetRyzfStart_Tracking (string ryTID, string ryzfType, string hbType, float hbAmount);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetRyzfStart_Tracking (string ryTID, string ryzfType, string hbType, float hbAmount);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetRyzf_Tracking (string ryTID, string ryzfType, string hbType, float hbAmount);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetRyzf_Tracking (string ryTID, string ryzfType, string hbType, float hbAmount);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetDD_Tracking (string ryTID, string hbType, float hbAmount);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetDD_Tracking (string ryTID, string hbType, float hbAmount);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetEvent_Tracking (string EventName);
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetEvent_Tracking (string EventName);
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern string _internalGetDeviceId_Tracking ();
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern string _internalGetDeviceId_Tracking ();
|
||||
|
||||
[DllImport ("__Internal")]
|
||||
private static extern void _internalSetPrintLog_Tracking (bool print);
|
||||
#endif
|
||||
// [DllImport ("__Internal")]
|
||||
// private static extern void _internalSetPrintLog_Tracking (bool print);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
public static AndroidJavaObject getApplicationContext ()
|
||||
{
|
||||
// #if UNITY_ANDROID
|
||||
// public static AndroidJavaObject getApplicationContext ()
|
||||
// {
|
||||
|
||||
using (AndroidJavaClass jc = new AndroidJavaClass ("com.unity3d.player.UnityPlayer")) {
|
||||
using (AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject> ("currentActivity")) {
|
||||
return jo.Call<AndroidJavaObject> ("getApplicationContext");
|
||||
}
|
||||
}
|
||||
// using (AndroidJavaClass jc = new AndroidJavaClass ("com.unity3d.player.UnityPlayer")) {
|
||||
// using (AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject> ("currentActivity")) {
|
||||
// return jo.Call<AndroidJavaObject> ("getApplicationContext");
|
||||
// }
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
// return null;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
/// <summary>
|
||||
/// 初始化方法
|
||||
/// </summary>
|
||||
/// <param name="appId">appKey</param>
|
||||
/// <param name="channelId">标识推广渠道的字符</param>
|
||||
public void init (string appKey, string channelId)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalInitWithAppKeyAndChannel_Tracking (appKey, channelId);
|
||||
#endif
|
||||
// /// <summary>
|
||||
// /// 初始化方法
|
||||
// /// </summary>
|
||||
// /// <param name="appId">appKey</param>
|
||||
// /// <param name="channelId">标识推广渠道的字符</param>
|
||||
// public void init (string appKey, string channelId)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalInitWithAppKeyAndChannel_Tracking (appKey, channelId);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("initWithKeyAndChannelId", getApplicationContext (), appKey, channelId);
|
||||
}
|
||||
#endif
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("initWithKeyAndChannelId", getApplicationContext (), appKey, channelId);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 玩家服务器注册
|
||||
/// </summary>
|
||||
/// <param name="account">账号ID</param>
|
||||
///
|
||||
public void register (string account)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetRegisterWithAccountID_Tracking (account);
|
||||
#endif
|
||||
// /// <summary>
|
||||
// /// 玩家服务器注册
|
||||
// /// </summary>
|
||||
// /// <param name="account">账号ID</param>
|
||||
// ///
|
||||
// public void register (string account)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetRegisterWithAccountID_Tracking (account);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("setRegisterWithAccountID", account);
|
||||
}
|
||||
#endif
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("setRegisterWithAccountID", account);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 玩家的账号登陆服务器
|
||||
/// </summary>
|
||||
/// <param name="account">账号</param>
|
||||
// /// <summary>
|
||||
// /// 玩家的账号登陆服务器
|
||||
// /// </summary>
|
||||
// /// <param name="account">账号</param>
|
||||
|
||||
public void login (string account)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetLoginWithAccountID_Tracking (account);
|
||||
#endif
|
||||
// public void login (string account)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetLoginWithAccountID_Tracking (account);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("setLoginSuccessBusiness", account);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("setLoginSuccessBusiness", account);
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 玩家开始充值数据
|
||||
/// </summary>
|
||||
/// <param name="transactionId">交易的流水号</param>
|
||||
/// <param name="paymentType">支付类型</param>
|
||||
/// <param name="currencyType">货币类型</param>
|
||||
/// <param name="currencyAmount">支付的真实货币的金额</param>
|
||||
// /// <summary>
|
||||
// /// 玩家开始充值数据
|
||||
// /// </summary>
|
||||
// /// <param name="transactionId">交易的流水号</param>
|
||||
// /// <param name="paymentType">支付类型</param>
|
||||
// /// <param name="currencyType">货币类型</param>
|
||||
// /// <param name="currencyAmount">支付的真实货币的金额</param>
|
||||
|
||||
public void setryzfStart (string ryTID, string ryzfType, string hbType, float hbAmount)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetRyzfStart_Tracking (ryTID, ryzfType, hbType, hbAmount);
|
||||
#endif
|
||||
#if UNITY_ANDROID
|
||||
// public void setryzfStart (string ryTID, string ryzfType, string hbType, float hbAmount)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetRyzfStart_Tracking (ryTID, ryzfType, hbType, hbAmount);
|
||||
// #endif
|
||||
// #if UNITY_ANDROID
|
||||
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("setPaymentStart", ryTID, ryzfType, hbType, hbAmount);
|
||||
}
|
||||
#endif
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("setPaymentStart", ryTID, ryzfType, hbType, hbAmount);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 玩家的充值数据
|
||||
/// </summary>
|
||||
/// <param name="transactionId">交易的流水号</param>
|
||||
/// <param name="paymentType">支付类型</param>
|
||||
/// <param name="currencyType">货币类型</param>
|
||||
/// <param name="currencyAmount">支付的真实货币的金额</param>
|
||||
// /// <summary>
|
||||
// /// 玩家的充值数据
|
||||
// /// </summary>
|
||||
// /// <param name="transactionId">交易的流水号</param>
|
||||
// /// <param name="paymentType">支付类型</param>
|
||||
// /// <param name="currencyType">货币类型</param>
|
||||
// /// <param name="currencyAmount">支付的真实货币的金额</param>
|
||||
|
||||
public void setryzf (string ryTID, string ryzfType, string hbType, float hbAmount)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetRyzf_Tracking (ryTID, ryzfType, hbType, hbAmount);
|
||||
#endif
|
||||
// public void setryzf (string ryTID, string ryzfType, string hbType, float hbAmount)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetRyzf_Tracking (ryTID, ryzfType, hbType, hbAmount);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
// #if UNITY_ANDROID
|
||||
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("setPayment", ryTID, ryzfType, hbType, hbAmount);
|
||||
}
|
||||
#endif
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("setPayment", ryTID, ryzfType, hbType, hbAmount);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
public void setDD (string ryTID, string hbType, float hbAmount)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetDD_Tracking (ryTID,hbType,hbAmount);
|
||||
#endif
|
||||
// public void setDD (string ryTID, string hbType, float hbAmount)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetDD_Tracking (ryTID,hbType,hbAmount);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
TrackingIO.CallStatic ("setOrder", ryTID, hbType, hbAmount);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// TrackingIO.CallStatic ("setOrder", ryTID, hbType, hbAmount);
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 统计玩家的自定义事件
|
||||
/// </summary>
|
||||
/// <param name="eventName">事件名</param>
|
||||
// /// <summary>
|
||||
// /// 统计玩家的自定义事件
|
||||
// /// </summary>
|
||||
// /// <param name="eventName">事件名</param>
|
||||
|
||||
public void setEvent (string eventName)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetEvent_Tracking (eventName);
|
||||
#endif
|
||||
// public void setEvent (string eventName)
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// _internalSetEvent_Tracking (eventName);
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass reyun = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
reyun.CallStatic ("setEvent", eventName, null);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass reyun = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// reyun.CallStatic ("setEvent", eventName, null);
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户的设备ID信息
|
||||
/// </summary>
|
||||
public string getDeviceId ()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
return _internalGetDeviceId_Tracking ();
|
||||
#endif
|
||||
// /// <summary>
|
||||
// /// 获取用户的设备ID信息
|
||||
// /// </summary>
|
||||
// public string getDeviceId ()
|
||||
// {
|
||||
// #if UNITY_IOS
|
||||
// return _internalGetDeviceId_Tracking ();
|
||||
// #endif
|
||||
|
||||
#if UNITY_ANDROID
|
||||
string str = "unknown";
|
||||
// #if UNITY_ANDROID
|
||||
// string str = "unknown";
|
||||
|
||||
using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
str = TrackingIO.CallStatic<string> ("getDeviceId");
|
||||
}
|
||||
return str;
|
||||
#endif
|
||||
return "unknown";
|
||||
}
|
||||
// using (AndroidJavaClass TrackingIO = new AndroidJavaClass ("com.reyun.tracking.sdk.Tracking")) {
|
||||
// str = TrackingIO.CallStatic<string> ("getDeviceId");
|
||||
// }
|
||||
// return str;
|
||||
// #endif
|
||||
// return "unknown";
|
||||
// }
|
||||
|
||||
/// 开启日志打印
|
||||
public void setPrintLog (bool print)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
_internalSetPrintLog_Tracking (print);
|
||||
#endif
|
||||
#if UNITY_ANDROID
|
||||
using (AndroidJavaClass reyunConst = new AndroidJavaClass ("com.reyun.tracking.common.ReYunConst")) {
|
||||
reyunConst.SetStatic <bool> ("DebugMode", print);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// /// 开启日志打印
|
||||
// public void setPrintLog (bool print)
|
||||
// {
|
||||
//#if UNITY_IOS
|
||||
// _internalSetPrintLog_Tracking (print);
|
||||
//#endif
|
||||
// #if UNITY_ANDROID
|
||||
// using (AndroidJavaClass reyunConst = new AndroidJavaClass ("com.reyun.tracking.common.ReYunConst")) {
|
||||
// reyunConst.SetStatic <bool> ("DebugMode", print);
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
//}
|
||||
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ PlayerSettings:
|
|||
webGLWasmStreaming: 0
|
||||
scriptingDefineSymbols:
|
||||
1: TextMeshPro
|
||||
4: TextMeshPro;Notifications;IssuePerson;JOYPAC_Volcano_OS
|
||||
4: TextMeshPro;Notifications;IssuePerson;JOYPAC_Volcano_OS;JOYPAC_ReYun
|
||||
7: ANDROID_CN;TextMeshPro;JOYPAC_ReYun;JOYPAC_Volcano
|
||||
13: TextMeshPro
|
||||
14: TextMeshPro
|
||||
|
|
|
|||
Loading…
Reference in New Issue