Adding a MapView to an Android Fragment

If you’re building an Android app that requires a map, chances are you’ll need to display it in a Fragment at some point. Fortunately, adding a MapView to a Fragment is relatively easy to do with the Google Maps SDK for Android. In this post, we’ll walk you through the steps to add a MapView to a Fragment in your Android app. Create a new Fragment in Android Studio To get started, you’ll need to create a new Fragment in your Android Studio project....

May 10, 2023 · 2 min

Why Checking for Web Browsers on Android Devices Matters

When developing Android applications that open URLs, it is essential to check if a web browser that supports the ACTION_VIEW intent is available on the device. Failing to do so can result in an ActivityNotFoundException or a NullPointerException that may crash your application. This is especially true if the targeted device is under Mobile Device Management (MDM) control, as the MDM administrator may not have installed a browser on the device....

May 8, 2023 · 3 min

Why Declaring Only the Required Properties in Your Model is a Good Idea

As a developer working with REST APIs, you have likely encountered situations where you need to deserialize the response data from a web server. In Kotlin, the most common approach to deserialize response data is by defining a model class that mirrors the server’s response. While it may be tempting to declare all the properties that the server returns in your Kotlin model, it is not always the best approach. Yesterday, a customer reported to me that our app was crashing during login....

May 5, 2023 · 3 min