Skip to main content


Showing posts from July, 2016

Chicken Sadie and the BindingActivity pattern

Writing code for the sake it is the best way to hone your skills.

Xamarin neatly wraps the Android APIs and environment in C# classes, which have always made a little more sense to me - and it can be used to build native apps in Android (or Windows or iOS) quickly and easily.

Here is a project I put together for a friend who must not forget to close the chicken coop at night!

This project is available on github, at: instantiator/chicken-sadie

The app itself is reasonably simple, and could be used as a good howto for various features:

Converting between C# DateTime and a native Android date, see: SunService.DateTimeToNativeDateReceiving and parsing Intents, see: SunService.OnStartCommandCreating notifications, and playing sounds from resources, see: SunService.OnStartCommandStoring small amounts of user data in Preferences, see: SunService.ConfirmNextAlarmTimeSunService.RecordNextAlarmTime, and SunService.ClearNextAlarmTime.Retrieving data from a web service, see: SunService.RetrieveN…