コード例 #1
0
        public void SetUp()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();
            Kii.HttpClientFactory = factory;

            client = (MockHttpClient)factory.Client;
        }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
 /// <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;
 }
コード例 #4
0
 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);
 }
コード例 #5
0
ファイル: Main.cs プロジェクト: KiiPlatform/KiiCloudUnitySDK
 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());
 }
コード例 #6
0
    void Awake()
    {
        Debug.Log("Initialize");

        Kii.Initialize(APP_ID, APP_KEY, Kii.Site.JP);
    }