Slide 1

Slide 1 text

Xamarin Forms in Action Medchest Assistant

Slide 2

Slide 2 text

Project architecture. PCL

Slide 3

Slide 3 text

Xamarin Forms. Init Android project: global::Xamarin.Forms.Forms.Init (this, bundle); iOS project: global::Xamarin.Forms.Forms.Init ();

Slide 4

Slide 4 text

Xamarin Forms XAML

Slide 5

Slide 5 text

Xamarin Forms XAML

Slide 6

Slide 6 text

Xamarin Forms Bindings

Slide 7

Slide 7 text

Platfrom specific designers

Slide 8

Slide 8 text

No XAML Designer

Slide 9

Slide 9 text

Platform Specific. Common Interface namespace MedChestAssistant { public interface INotificationHelper { void notify(String message); } }

Slide 10

Slide 10 text

Platform Specific. Interface Implementation [assembly: Xamarin.Forms.Dependency (typeof (NotificationHelperImpl))] namespace MedChestAssistant.iOS { public class NotificationHelperImpl: INotificationHelper { #region INotificationHelper implementation public void notify (string message) { var notification = new UILocalNotification(); // set notification params … UIApplication.SharedApplication.ScheduleLocalNotification(notification); } #endregion public NotificationHelperImpl () { } } }

Slide 11

Slide 11 text

NuGet packages

Slide 12

Slide 12 text

Packages in project tree

Slide 13

Slide 13 text

Platform-specific initialisation Android: ZXing.Mobile.MobileBarcodeScanner.Initialize (Application); iOS: ZXing.Net.Mobile.Forms.iOS.Platform.Init();

Slide 14

Slide 14 text

iOS-specific notifications setup if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0)) { var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes ( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null ); app.RegisterUserNotificationSettings (notificationSettings); }

Slide 15

Slide 15 text

Thank you. Questions? [email protected]