TAG: Xamarin

Navigation

Using Background Threads in Mono For Android Applications

When writing applications one thing to always keep in mind is that you should never block the UI thread. This makes for a poor user experience, and on Android you get the dreaded Application Not Responding dialog if there’s no response to user input within a few seconds. Mono For Android exposes many different ways to do asynchronous operations to help avoid this problem. In this article I’ll go over some of the different…

Using AdMob in a MonoDroid Application

While MonoDroid makes it possible to write Android applications using .NET, what happens if you want to make use of existing third party Java libraries in your app? In this post I’ll talk about what your options are, and provide an example of how to serve ads from AdMob in your MonoDroid application using the standard AdMob Java library. Talking To Java As it exists right now, in order to use Java libraries in your…

Introduction to MonoDroid: Slides, Code and Video

In the month of February I had the opportunity to speak to a lot of people about MonoDroid. Down in New Jersey I spoke to the NJDOTNET group, and then in New York I talked MonoDroid at the NYC Code Camp and the NYC ALT.NET group. The slides and sample code for everything has been available already in various places, so I wanted to put up a quick post to tie it all together in…

Using a Database in MonoDroid Applications

The stock database available in Android is SQLite, and chances are you’ll find yourself wanting to use it in your applications. But how do you go about doing so? In this post I’ll go over some options for accessing the database, exploring both the standard Android patterns and also an example of plugging in an ORM to simplify things. A SQLite database is pretty much exactly what the name implies: it’s a very…

Using Inversion of Control in MonoDroid Applications

Just because a mobile application needs to be (or should be, in most cases) small and lightweight doesn’t mean we should set aside best practices like Inversion of Control containers when building our apps. I don’t want this to be an introduction to dependency injection, so I’d highly recommend reading up on it a bit if you aren’t familiar with the pattern. With so many options out there for .NET containers, which…