10 Must-Use Components for Your Mobile Apps, James Clancey
-
Upload
xamarin -
Category
Technology
-
view
1.398 -
download
2
Transcript of 10 Must-Use Components for Your Mobile Apps, James Clancey
![Page 2: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/2.jpg)
Component Store with IDE Integration
![Page 3: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/3.jpg)
Radial Progress• Stylish animated progress view
![Page 4: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/4.jpg)
Radial Progress• Stylish animated progress view• Same API on iOS, Android
![Page 5: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/5.jpg)
Radial Progress• Stylish animated progress view• Same API on iOS, Android• Perfect for background tasks
![Page 6: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/6.jpg)
0102030405060708091011121314
Radial Progress Sample Usage
using 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 progress progressView.Value = 0.46f;}
![Page 7: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/7.jpg)
Json.NET
• LINQ-to-JSON for custom JSON parsing and output
![Page 8: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/8.jpg)
Json.NET
• LINQ-to-JSON for custom JSON parsing and output• Faster than .NET's built-in JSON serializers
![Page 9: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/9.jpg)
Json.NET
• LINQ-to-JSON for custom JSON parsing and output• Faster than .NET's built-in JSON serializers• Also converts JSON to and from XML
![Page 10: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/10.jpg)
Json.net01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
public 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;}
![Page 11: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/11.jpg)
ZXing.Net.Mobile is a C#/.NET Barcode Scanning LibraryZXing.Net.Mobile
![Page 12: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/12.jpg)
ZXing.Net.Mobile
• Open Source• Simple API• Cross platform
iOSAndroidWindows Phone
• Custom Overlays
![Page 13: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/13.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
ZXing.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);! } );!}
![Page 14: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/14.jpg)
Dropbox
• API handles all the caching, retrying, and file change notifications.
![Page 15: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/15.jpg)
Dropbox
• API handles all the caching, retrying, and file change notifications.
• Writes are local so changes are immediate. The Sync API syncs to Dropbox behind the scenes.
![Page 16: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/16.jpg)
Dropbox
• API handles all the caching, retrying, and file change notifications.
• Writes are local so changes are immediate. The Sync API syncs to Dropbox behind the scenes.
• Your app works great even when offline and automatically syncs when it's back online.
![Page 17: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/17.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Dropbox Syncvoid ListFiles (string path)
{! ! DBError error;
! ! var contents = DBFilesystem.SharedFilesystem.ListFolder (path, out error);! ! foreach (DBFileInfo info in contents) {! ! ! Console.WriteLine (info.Path);! ! } }
![Page 18: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/18.jpg)
• By Zetetic LLC• 256-bit AES encryption of SQLite database files
SQLCipher
![Page 19: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/19.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
SQLCipherpublic 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)}
![Page 20: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/20.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
SQLCipherpublic void SqlCipherDemo ()
{! using (var connection = new Mono.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 ();! }}
![Page 21: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/21.jpg)
Mobile Services by Windows Azure
• By Microso"• Easily store data in the cloud• Managed C#• Cross Platform
iOSAndroidWindows
• Async
![Page 22: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/22.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Mobile 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 */} );
![Page 23: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/23.jpg)
by ShinobiBlazing fast charts!
ShinobiCharts
![Page 24: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/24.jpg)
Xamarin.Social
• Cross PlatformiOSAndroid
• Share Text or Images• Twitter• Facebook• Flickr• App.net• Pinterest
![Page 25: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/25.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Xamarin.Social// 1. Create the service
var facebook = new FacebookService {! ClientId = "<App ID from developers.facebook.com/apps>",! RedirectUrl = new System.Uri ("<Redirect URL from developers.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);
![Page 26: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/26.jpg)
Signature Pad
• Very simple API• Save/Load Vectors• Export Image
![Page 27: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/27.jpg)
01020304050607080910111213141516
Signature Padvar signature = new SignaturePadView (View.Frame);
View.AddSubview (signature);
//Get the signaturevar image = signature.GetImage ();ViewController (shareController, true, null);
![Page 28: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/28.jpg)
Xamarin.Mobile
• Cross platformiOSAndroidWindows
• GeoLocation• Contacts• Media Picker
![Page 29: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/29.jpg)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Xamarin.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 ());
![Page 30: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/30.jpg)
Q&A
![Page 31: 10 Must-Use Components for Your Mobile Apps, James Clancey](https://reader034.fdocuments.in/reader034/viewer/2022052618/554f5a6fb4c905c8088b45d2/html5/thumbnails/31.jpg)
DEMO