// // 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) { MobihelpConfig config = new MobihelpConfig("YourDomain.freshdesk.com", "appKey", "AppSecret"); Mobihelp mobileHelp = new Mobihelp(); mobileHelp.InitWithConfig(config); window = new UIWindow(UIScreen.MainScreen.Bounds); var controller = new UIViewController(); var supportButton = new UIButton(UIButtonType.RoundedRect); supportButton.Frame = new CGRect(10,20,200, 30); supportButton.SetTitle("ClickToShowSupport", UIControlState.Normal); supportButton.TouchDown += (sender, args) => { Mobihelp.SharedInstance().PresentSupport(controller); }; controller.View.AddSubview(supportButton); controller.View.BackgroundColor = UIColor.White; window.RootViewController = controller; // make the window visible window.MakeKeyAndVisible(); return true; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); var config = new MobihelpConfig( "http://your-domain.freshdesk.com", "m1-1-8f852b32ab9ee75d834f1f9c576e260f", "fbddf783378ddfe8fbaf9a9aceb6c1760cc0f704"); Mobihelp.Init(this, config); Mobihelp.ShowSupport(this); }