Contents tagged with Android

  • 2012 Begins

    It has become tradition for the past few years that my first blog post of the new year is to thank Microsoft for being recognized as an MVP.  This year is no different.  Once again, I’m honored to be recognized by Microsoft for my contributions to the community.  After visiting Redmond for the past 4 years, I’m going to be skipping the Summit this year.  I’ve got a client project that I really want to focus on and don’t want to push it out another week.

  • Taking Android Emulator Screenshots WITHOUT Eclipse.

    I’m working on an Android app and before publishing it to the Android Market, I needed some screenshots.  I assumed the emulator supported screenshots, but when I did a search for “android emulator screenshot”, most of the hits talked about how to do it from Eclipse.  I’m using IntelliJ IDEA Community Edition.  However, based on the descriptions, I understood what was going on.

  • Android: Encapsulating Shared Preferences

    The Android OS gives you a convenient way to save and load simple data (i.e. string, float, int, boolean and long) in the form of SharedPreferences.  The data is stored in a dictionary format that utilizes a key/value pair.  The “name” of the preferences is also supplied by your code.  In a lot of the samples you’ll find online, the name of the shared preferences and all of the keys are stored as constants at the top of the Activity class (or worse, the key names are copy/pasted throughout the code!).  I don’t like polluting my Activity classes with stuff like that so I’ve been encapsulating my preferences in their own class.

  • .hgignore file for IntelliJ IDEA Development

    Every time I start a new project in Visual Studio, I almost always put it under Mercurial source control – even a small demo project.  If the project becomes serious enough, I’ll create a private repository in Bitbucket and maintain it there.  After I initialize my Mercurial repository, the first thing I do is grab Nino’s .hgignore file for Visual Studio.  It’s a great time-saver.