Ejemplo n.º 1
0
    void testMtaAPI()
    {
        // 设置appkey,如果在androidManifest.xml配置,可不需要调用此接口
        // MtaService.SetAppKey("Aqc1222");
        //MtaService.CommitEvents(-1);
        //MtaService.StartNewSession();
        //MtaService.StopSession();

        MtaService.SetAutoExceptionCaught(true);
        MtaService.SetCustomUserId("user1");
        MtaService.SetEnableSmartReporting(false);
        MtaService.SetMaxBatchReportCount(10);

        MtaService.SetMaxParallelTimmingEvents(1000);
        MtaService.SetMaxSessionStatReportCount(10);
        MtaService.SetMaxSendRetryCount(10);
        MtaService.SetMaxStoreEventCount(10000);
        MtaService.SetSendPeriodMinutes(100);
        MtaService.SetSessionTimoutMillis(60 * 1000);

#if UNITY_ANDROID
        MtaService.SetMaxDaySessionNumbers(10);

        Debug.Log("getAppKey=" + MtaService.GetAppKey());
        Debug.Log("getInstallChannel=" + MtaService.GetInstallChannel());
        Debug.Log("getCustomUserId=" + MtaService.GetCustomUserId());
#endif
    }