// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window = new UIWindow (UIScreen.MainScreen.Bounds); var Manager = new KPManager("APIKEY","SECRET"); KPManager.SharedManager = Manager; KPManager.SharedManager.DidStartSession += DidStartSession; //Manager.Delegate = new myDelegate(); KPManager.SharedManager.StartSession(); viewController = new MainViewController (); window.RootViewController = viewController; window.MakeKeyAndVisible (); return true; }
public void DidUpdateLocation(KPManager manager) { // TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute }
public void DidUpdateLeaderboard(KPManager manager, NSDictionary resource) { // TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute }
public void DidStartSession(KPManager manager, NSDictionary resource) { Console.WriteLine("Session started"); if(resource == null) { var alert = new UIAlertView("Kiip","Session created: No Promo",null,"OK"); alert.Show(); return; } NSMutableDictionary reward = new NSMutableDictionary(resource); reward.SetValueForKey(NSNumber.FromInt32((int)KPViewPosition.FullScreen),new NSString("position")); KPManager.SharedManager.PresentReward(reward); (new UIAlertView("Kiip","Session created: Promo",null,"Ok")).Show();; }
public void DidReceiveError(KPManager manager, NSError error) { Console.WriteLine("DidEndSession"); // TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute }
public void DidGetActivePromos(KPManager manager, NSArray promos) { Console.WriteLine("DidEndSession"); // TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute }