void Start() { #if TEST_MODE YleSDKManager.Init((success) => { Debug.Log("Yle SDK initialized: " + success.ToString()); }); #endif }
private void UpdateProgramsListView(int offset, int limit, string key) { programsViewController.EnableLoadingAnimation(); YleSDKManager.GetProgramsList( (delegate(IList<ProgramData> programs) { Debug.Log("Retrieved \'" + (programs != null ? programs.Count : 0).ToString() + " items."); programsModel.AddPrograms(programs); programsViewController.DisableLoadingAnimation(); updatingData = false; }), offset, limit, key); }
void Start() { YleSDKManager.Init( (success) => { Debug.Log("Yle Demo: Yle SDK initialized: " + success.ToString()); if (success) { DisableLoadingAnimation(); } else { // QQQ - display some error message } } ); }
// Update is called once per frame void Update() { #if TEST_MODE if (getProgramsList) { getProgramsList = false; YleSDKManager.GetProgramsList((list) => { if (list == null || list.Count <= 0) { Debug.Log("Nothing found!"); return; } string output = string.Empty; for (int i = 0; i < list.Count; i++) { output += "ID=" + list[i].ID + ", Title=" + list[i].Title + ", TypeMedia=" + list[i].TypeMedia + "\n"; } Debug.Log(output); }, 0, 10, categoryKey, type, mediaObjectType); } #endif }