Android

    • In-depth exploration of Dagger 2

      This tutorial is and in-depth exploration of Dagger 2 using Java and Android.
    • Designing for multiple screen densities on Android

      In this article, I am going to do a deep dive into Android screen density and provide some guidance on how to design for such a huge diversity of screen densities. Having a firm grasp of this is critical in being able to create wireframes and designs in Sketch that can be implemented on actual devices (phones, tablets, laptops, TVs, wearables).
    • Introduction to Android Architecture Components

      The difficulties of dealing with things like configuration changes when rotating a screen, and sharing app state data between fragments and activities are a thing of the past. Architecture Components puts the magic back into Android development! 🎩✨
    • Android Downloadable Fonts

      As of Android API level 27, there are too many ways to load custom fonts in Android apps. This article will show you how to use downloadable fonts (from Google Fonts) using the latest support library. 🖋
    • Getting started with MediaPlayer on Android

      This article is an introduction on how to use Android MediaPlayer in your apps to playback audio. 🎵
    • Deep dive into Android Services

      This article is a deep dive into Android Services. Learn all about started services, bound services, and bound and started services. With source code examples and a sample app.
    • Flexbox layouts and lists with React Native

      This tutorial is a deep dive of Flexbox layout and FlatList. It will show you how to take a wireframe and compose React Native components out of it. The code for this tutorial is on GitHub.
    • Navigation and Styling with React Native

      This tutorial is a deep dive of React Navigation, which is the way to do in app navigation. It also goes into the best practices for styling your app and how to collaborate with designers for styling. The code for this tutorial is in GitHub.
    • Getting started with React Native

      This tutorial will show you how to get started quickly with React Native for mobile app development on Android and iOS. It focuses on Flexbox layouts, Navigation, and cross platform considerations. The code for this tutorials is in GitHub.
    • Android, Redux, Firebase Auth & Database, and Material Design

      Redux and React are things that are normally associated with web development. Redux is a beautiful design pattern that can help with any application, even native ones! I used Firebase in order to do cross platform data synchronization across web and mobile clients. I also used Firebase auth and Material Design to craft a real-world app. The code for this tutorial is in GitHub.
    • Android Location Providers (gps, network, passive)

      The best way to handle GPS is to use the “network” or “passive” provider first, and then fallback on “gps”, and depending on the task, switch between providers. This covers all cases, and provides a lowest common denominator service (in the worst case) and great service (in the best case).
    • Android Event Dispatch Thread or Main Thread

      Android applications run in a native Linux process, in the underlying Linux OS. This process houses activities (screens), widgets, and services (non visual long running application parts). When working with Android apps, it is important to remember to keep long running code running in threads that are not tied to the main thread or event dispatch thread, in order to get an “application not responding” error. A common mistake that is made is long running tasks are performed in this EDT/main thread, and this leads to lots of application failures.
    • Using JSON for mobile object exchange

      I've been working with various object encoding schemes to get information transferred over the network between services and mobile apps running on Android and BlackBerry. On Android, I figured I would try using Java object serialization, and that works some of the time, and not for anything complex. I wish the object serialization and deserialization mechanism in GWT would be ported over to all these mobile environments, but I digress. This tutorial outlines the use of JSON for this purpose.
    • Android Animation Framework Tutorial

      This tutorial is an introduction to the built in animation frameworks that are part of the Android UI library. Without writing any animation/drawing code, you can do 2 types of animations - layout transitions that affect ViewGroups, and sequences inside a View. You can also do frame by frame animation, but this tutorial will not cover that. The basics covered here affect layout transitions, and animation of a View itself, using tweening animation, which includes each of the following effects (or any combination) - Alpha, Rotate, Scale, and Translate.
    • Android ListView and custom adapter Tutorial

      This tutorial will show you how to use ListView to display selectable lists of non trivial data, using complex cell renderers. The ListView is a selectable list. You can attach a variety of data models to it and load different display layouts (cell renderers). You can create your own model and cell renderer. This model-view combo is called an Adapter. In this tutorial, I will show you how to extend create your own Adapter from scratch, and create your own cell renderers from scratch as well.
    • Android LinearLayout Tutorial

      This tutorial shows you how to use the LinearLayout container (using Java code, not XML markup), which is the simplest layout mechanism available on Android. If you're familiar with Swing's BoxLayout then you will have a good idea of what this container has to offer. Linear layouts are really simple… you can add components horizontally or vertically to a ‘bag’ or ‘box’.
    • Android UI Themes Tutorial

      This tutorial will show you how to use Android's theme-ing capabilities. You can set background color, image, etc. on widgets, dialogs, and activities.
    • Android TableLayout Tutorial

      This tutorial will show you how to use the TableLayout container, which is like an HTML table. The UI layout code is done in Java, not XML. A class (LayoutUtils) is provided to make it easier to attach layout params to View objects.
    • Android Option and Context menu Tutorial

      This tutorial will show you how to create options menu (hooks into the MENU button) and context menu (press and hold a component).
    • Android XML View inflation Tutorial

      This tutorial will show you how to instantiate or inflate a View from XML; this is useful for components that don't provide a Java API to tweak with certain style attributes. The Button class is used as an example; you can only get certain styles to show up via XML that aren't available via the Java API.
    • Android Activity and sub-Activity Tutorial

      This tutorial will show you how to create a sub-Activity from a calling-Activity, and process the results produced by the sub-Activity, if you want to do so. Also, the various ways of launching a sub-Activity are covered, along with the Android Activity history stack. A subclass of Activity is also provided that makes it trivial to launch sub-Activities and respond to results from them.
    • Android - How to build a service-enabled Android app - Part 3/3 Multithreading

      I've written 3 tutorials to show you how to create a service enabled Android application that performs all of it's network I/O in a background thread (not the UI thread). These tutorials are split into three parts. This tutorial shows you how to use background threads to perform long running network IO operations, so that the main UI thread is not locked up.
    • Android - How to build a service-enabled Android app - Part 1/3 UI

      I've written 3 tutorials to show you how to create a service enabled Android application that performs all of it's network I/O in a background thread (not the UI thread). This tutorial shows you how to build a simple UI without using XML, by writing Java code to layout the UI.
    • Android - How to build a service-enabled Android App - Part 2/3 Networking

      I've written 3 tutorials to show you how to create a service enabled Android application that performs all of it's network I/O in a background thread (not the UI thread). These tutorials are split into three parts. This one shows you how to use Apache HTTP Client to connect to services over HTTP or HTTPS and exchange serialized Java objects with services.