• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
10 Must-Use Components for Your Mobile Apps, James Clancey
 

10 Must-Use Components for Your Mobile Apps, James Clancey

on

  • 1,409 views

 

Statistics

Views

Total Views
1,409
Views on SlideShare
1,409
Embed Views
0

Actions

Likes
0
Downloads
25
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    10 Must-Use Components for Your Mobile Apps, James Clancey 10 Must-Use Components for Your Mobile Apps, James Clancey Presentation Transcript

    • James ClanceySenior Mobile DeveloperXamarinclancey@xamarin.comMust-use AppComponents@jtclancey
    • Component Store with IDE Integration
    • Radial Progress• Stylish animated progress view
    • Radial Progress• Stylish animated progress view• Same API on iOS, Android
    • Radial Progress• Stylish animated progress view• Same API on iOS, Android• Perfect for background tasks
    • 0102030405060708091011121314Radial Progress Sample Usageusing RadialProgress;public override void ViewDidLoad(){base.ViewDidLoad();! !var progressView = new RadialProgressView {Center = new PointF (View.Center.X, View.Center.Y - 100)};View.AddSubview (progressView);// Update the progressprogressView.Value = 0.46f;}
    • Json.NET• LINQ-to-JSON for custom JSON parsing and output
    • Json.NET• LINQ-to-JSON for custom JSON parsing and output• Faster than .NETs built-in JSON serializers
    • Json.NET• LINQ-to-JSON for custom JSON parsing and output• Faster than .NETs built-in JSON serializers• Also converts JSON to and from XML
    • Json.net01020304050607080910111213141516public class Person{public string Name { get; set; }public DateTime Birthday { get; set; }}public Person ParsePerson (string jsonString){var person = JsonConvert.DeserializeObject<Person>(jsonString);return person;}
    • ZXing.Net.Mobile is a C#/.NET Barcode Scanning LibraryZXing.Net.Mobile
    • ZXing.Net.Mobile• Open Source• Simple API• Cross platformiOSAndroidWindows Phone• Custom Overlays
    • 01020304050607080910111213141516ZXing.Net.Mobilepublic void Scan (){! var scanner = new ZXing.Mobile.MobileBarcodeScanner ();! scanner.Scan ().ContinueWith (t => {! ! if (t.Result != null)! ! ! Console.WriteLine ("Scanned Barcode: " + t.Result.Text);! } );!}
    • Dropbox• API handles all the caching, retrying, and file changenotifications.
    • Dropbox• API handles all the caching, retrying, and file changenotifications.• Writes are local so changes are immediate. The Sync API syncsto Dropbox behind the scenes.
    • Dropbox• API handles all the caching, retrying, and file changenotifications.• Writes are local so changes are immediate. The Sync API syncsto Dropbox behind the scenes.• Your app works great even when offline and automatically syncswhen its back online.
    • 01020304050607080910111213141516Dropbox Syncvoid ListFiles (string path){! ! DBError error;! ! var contents = DBFilesystem.SharedFilesystem.ListFolder (path, out error);! ! foreach (DBFileInfo info in contents) {! ! ! Console.WriteLine (info.Path);! ! }}
    • • By Zetetic LLC• 256-bit AES encryption of SQLite database filesSQLCipher
    • 01020304050607080910111213141516SQLCipherpublic class Model{! [PrimaryKey,AutoIncrement]! public int Id { get; set; }! public string Content { get; set; }}using(var conn = new SQLiteConnection (FilePath, Password)){! var model = conn.Table<Model>().Where(x=> x.Id = 0)}
    • 01020304050607080910111213141516SQLCipherpublic void SqlCipherDemo (){! using (var connection = newMono.Data.Sqlcipher.SqliteConnection(connectionString)) {! ! connection.SetPassword ("secretPassword");! ! connection.Open ();! ! using (var command = connection.CreateCommand()) {! ! ! var query = "select * from t1";! ! ! command.CommandText = query;! ! ! var reader = command.ExecuteReader ();! ! ! while (reader.Read()) {! ! ! ! //Read Values! ! ! }! ! }! ! connection.Close ();! }}
    • Mobile Services by Windows Azure• By Microso"• Easily store data in the cloud• Managed C#• Cross PlatformiOSAndroidWindows• Async
    • 01020304050607080910111213141516Mobile Services by Windows Azurepublic class Item{! ! public int Id { get; set; }! ! public string Text { get; set; }}Item item = new Item { Text = "Awesome item" };! ! ! App.MobileService.GetTable<Item> ().InsertAsync (item)! ! ! ! .ContinueWith (t => {! ! ! /* success or failure */} );
    • by ShinobiBlazing fast charts!ShinobiCharts
    • Xamarin.Social• Cross PlatformiOSAndroid• Share Text or Images• Twitter• Facebook• Flickr• App.net• Pinterest
    • 01020304050607080910111213141516Xamarin.Social// 1. Create the servicevar facebook = new FacebookService {! ClientId = "<App ID from developers.facebook.com/apps>",! RedirectUrl = new System.Uri ("<Redirect URL fromdevelopers.facebook.com/apps>")};// 2. Create an item to sharevar item = new Item { Text = "Xamarin.Social is the bomb.com." };item.Links.Add (new Uri ("http://github.com/xamarin/xamarin.social"));// 3. Present the UI on iOSvar shareController = facebook.GetShareUI (item, result => {! // result lets you know if the user shared the item or canceled! DismissViewController (true, null);});PresentViewController (shareController, true, null);
    • Signature Pad• Very simple API• Save/Load Vectors• Export Image
    • 01020304050607080910111213141516Signature Padvar signature = new SignaturePadView (View.Frame);View.AddSubview (signature);//Get the signaturevar image = signature.GetImage ();ViewController (shareController, true, null);
    • Xamarin.Mobile• Cross platformiOSAndroidWindows• GeoLocation• Contacts• Media Picker
    • 01020304050607080910111213141516Xamarin.Mobilevar locator = new Geolocator { DesiredAccuracy = 50 };locator.GetPositionAsync (timeout: 10000).ContinueWith (t => {! Console.WriteLine ("Position Status: {0}", t.Result.Timestamp);! Console.WriteLine ("Position Latitude: {0}", t.Result.Latitude);! Console.WriteLine ("Position Longitude: {0}", t.Result.Longitude);}, TaskScheduler.FromCurrentSynchronizationContext ());
    • Q&A
    • DEMO
    • THANK YOUJames Clanceyclancey@xamarin.com@jtclancey