public void SetUp() { Kii.Initialize("appId", "appKey", Kii.Site.US); MockHttpClientFactory factory = new MockHttpClientFactory(); Kii.HttpClientFactory = factory; client = (MockHttpClient)factory.Client; }
/// <summary> /// Switchs the app. /// </summary> /// <param name="appId">AppID.</param> /// <param name="appKey">AppID.</param> /// <param name="serverUrl">Server URL.</param> /// <remarks> /// This method is for internal use only. Do not use it from your application. /// </remarks> public void SwitchApp(string appId, string appKey, string serverUrl) { Kii.Initialize(appId, appKey, serverUrl, new KiiUnityClientFactoryImpl(), new KiiAsyncUnityClientFactoryImpl()); KiiAnalytics.Initialize(appId, appKey, serverUrl, this.GetDeviceID(), new KiiUnityClientFactoryImpl(), new KiiAsyncUnityClientFactoryImpl()); this.AppID = appId; this.AppKey = appKey; this.ServerUrl = serverUrl; }
/// <summary> /// Switchs the app. /// </summary> /// <param name="appId">AppID.</param> /// <param name="appKey">AppKey.</param> /// <param name="site">Site.</param> /// <remarks> /// This method is for internal use only. Do not use it from your application. /// </remarks> public void SwitchApp(string appId, string appKey, Kii.Site site) { Kii.Initialize(appId, appKey, site, new KiiUnityClientFactoryImpl(), new KiiAsyncUnityClientFactoryImpl()); KiiAnalytics.Initialize(appId, appKey, ToAnalyticsSite(site), this.GetDeviceID(), new KiiUnityClientFactoryImpl(), new KiiAsyncUnityClientFactoryImpl()); this.AppID = appId; this.AppKey = appKey; this.Site = site; this.ServerUrl = null; }
void Awake() { if (!createNotification) { // this is the first instance -make it persist DontDestroyOnLoad(GameObject.Find("notification")); createNotification = true; } else { // this must be aduplicate from a scene reload - DESTROY! Destroy(GameObject.Find("notification")); Destroy(GameObject.Find("KiiPush")); } // Kii Cloud SDK Initialize. Kii.Initialize(_AppID, _AppKey, Kii.Site.JP); }
void Start() { Kii.Initialize("{APP ID}", "{APP KEY}", "http://api-jp.kii.com/api"); KiiAnalytics.Initialize("{APP ID}", "{APP KEY}", "http://api-jp.kii.com/api", GetDeviceID()); }
void Awake() { Debug.Log("Initialize"); Kii.Initialize(APP_ID, APP_KEY, Kii.Site.JP); }