James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


Twitter


James Montemagno

Plugins

Moving Plugins for Xamarin to .NET Standard

I could never imagine the amazing response to Plugins for Xamarin, those amazing little libraries that abstract away all that platform specific code into a lovely cross-platform API for iOS, Android, and Windows. They sure have grown, with hundreds of plugins be generated by the community and with tons of installs. My plugins alone have now hit 3 Million installations! With all this momentum it is a great time to look to the future, simplify plugins, and take the leap to .NET Standard. What is .…

James MontemagnoJames Montemagno

Unit Testing Plugins for Xamarin

So you love unit testing…. said no one ever, but you are forced to write unit tests and you want to use Plugins for Xamarin which are all singletons and need platform specific implementations or they will throw an exception in your tests…. what to do?!?!? Plugins are all interface based, which means all we have to do is use standard practices to not directly call the singleton, and setup our code to return the instance we want. In unit tests we can return a Mock (or Moq) of the interface, and in…

James MontemagnoJames Montemagno

Opening App Store for Ratings on iOS and Android

Sometimes you want to ask your users to rate your application. There are several components out there that will open a dialog box and prompt for ratings, but sometimes you don’t want to stop the flow of your app and throw it in their face. What I do in my application is simply add a section on my settings page asking if they would like to rate the app. When pressed I launch the app store directly to the review page: This is pretty simple to do for iOS and Android by launching a specific UR…

James MontemagnoJames Montemagno

Cross Platform Photos with Media Plugin

After months of work, contributions, code reviews, testing, new operating system releases, and tons of awesome new features the brand new Media Plugin for Xamarin and Windows is ready for mass consumption. Not matter how your developing your applications with Xamarin or Xamarin.Forms you can easily have your users take or pick photos and videos from shared code! Here is the easiest example of taking a photo and displaying it in a Xamarin.Forms image. takePhoto.Clicked += async (sender, args) =&g…

James MontemagnoJames Montemagno

Build Apps Faster with Plugins for Xamarin!

One of my favorite parts of mobile development with Xamarin is that I am not only creating fully native mobile application on iOS and Android, but that I also have 100% API access on those platforms. That means if I want to do something I can do something. However, after four years of mobile development I found myself doing the same things over and over again to access native APIs from shared code. If I wanted to adjust a setting, vibrate the device, or check connectivity I would abstract out an…

James MontemagnoJames Montemagno