Pitfalls of building a brilliant app

Hand holding phone
Hand holding phone
Photo by Masakaze Kawakami on Unsplash.

1. Things Should Be Where They’re Supposed to Be (Strings, Colors)

There is tremendous growth in the Android ecosystem around the globe with a diverse community. People from different backgrounds, people with disabilities, people who wish to have fancy features like night mode, and more use Android apps in their day-to-day life.

Developing apps for such a diverse community is not an easy task. I’m not speaking about high-level architectures here. In contrast, it’s about simple things like strings, colors, dimens, etc. that will considerably affect modern Android development.

People usually feel comfortable using an application in their native language. The vital step is to maintain all the strings in a single file (usually strings.xml) …


Multiple view types in RecyclerViews using sealed classes

Phone placed vertically
Phone placed vertically
Photo by Stephen Frank on Unsplash.

One of the best ways to display huge lists in Android is through RecyclerView. As developers, you all might have used it. We have many advanced features like view holder patterns, rich animation, Diff-Utils callback to improve performance, etc. Apps like WhatsApp and Gmail use RecyclerView to show endless conversations.

One of the significant RecyclerView features that I use is view types. We can display multiple view types in the same RecyclerView. …


Initial step to create scope for your particular use case

Image for post
Image for post
Photo by Matam Jaswanth on Unsplash

As the Android team recommends, if your app contains three or fewer screens, you can go without DI. But with more than three screens, it’s always recommended to use DI.

Dagger is the best choice to implement DI in android applications without any doubt till now. But this is going to change as Android team has decided to create a new DI library on top of Dagger known as Hilt. You can read all about it here.

To be precise Hilt is an android flavor of Dagger. The problem is it’s still in the early stages. …


Boost the ad revenue in your Android apps with these SDKs

brightly lit neon signs along a Singapore street
brightly lit neon signs along a Singapore street
Photo by Nuno Antunes on Unsplash

Takeaway From This Article

You’ll learn how to implement reward ads from advertising companies like AdMob (from Google), and Facebook in your Android applications. This article also contains the best practices that I learned in five years of my experience with advertisements in mobile applications.

This article might be concentrating on how to display ads in Android applications, but the overview of how things work is similar across platforms. For instance, in mobile applications, advertising companies use device IDs to identify a specific user, whereas on the web they use cookies.

Introduction

Displaying ads to earn money in a mobile application isn’t a new monetization strategy. It’s one of the widely used approaches to earning money from any mobile application or website. …


Make the conversations more accessible via notification bubbles

Image for post
Image for post
Photo by Jonas Leupe on Unsplash

Introduction

One area where you see rapid enhancements every year on the Android ecosystem is Notifications. Google developers did exceptional work in this area; to be frank, it’s years ahead of the iPhone notification system.

Each year at Google I/O, either big or small, there has been something to talk about notifications. Back in 2019, Google introduced bubbles API for the first time to display notifications. It’s not a new feature for android users; Facebook implemented it years ago.

But for the first time, Android has a native implementation to make conversations more accessible to the users. They Built directly into the Notification system and float on top of other apps. …


How to properly set up and use your Java and Kotlin ViewModels

Someone using their phone in the dark
Someone using their phone in the dark
Photo by Christian Wiediger on Unsplash.

Why Should You Use ViewModels?

Before getting started with the best practices for using ViewModels, we should ask ourselves why we should use a ViewModel. The answer is simple: the separation of concerns (SoC). This makes the application maintainable, extensible, and testable.

This can also be achieved through presenters (MVP), but I prefer ViewModels (Clean Architecture or MVVM) because they will not be destroyed instantly when users switch between configurations (landscape and portrait). This solves many traditional problems, such as not executing expensive operations like loading data from servers on configuration change.

SoC is nothing but divide and rule. One of the best real-world examples for understanding SoC is having different departments at a software development company (HR, finance, quality assurance, engineering, etc.). In our case, we’re diving into the business logic and background tasks from UI-related code using ViewModels. …


A look back at the last 5+ years of Android development and how far it’s come

Image for post
Image for post
Photo by Johannes Plenio on Unsplash

Hi Everyone,

It’s Siva from Programming Geeks(Medium)

This week we come up with an article about The Evolution of Android Development. This blog post focus on how far android development has come on different aspects like UI, Security & Privacy, tooling, and more.

Introduction

I created my first ever Android application in 2015. Back then, Android development was entirely different compared to what it is now. There were no Jetpack libraries to learn about best practices when you were dealing with high-performance apps and large datasets and no fancy UI kits like ConstraintLayout or MotionLayout. To be frank, even Android Studio isn’t that smart back then.

Read the rest of the article here:
The Evolution of Android Development

Thank you for continuing to read our articles.


A look at Icon, Image, Remember, Spacer, Radio Button, Loaders, Switch and Checkbox, and Sliders

Colorful template
Colorful template
Photo by the author.

This is the second part of a series that will explore Jetpack Compose components. The main goal is to get to know the Jetpack Compose UI’s standard building blocks, starting from the basics and moving to more advanced components.

As we completed the introduction and integration of Jetpack Compose in part 1, we’ll dive directly into the components without any further delay.

Note: As Jetpack Compose is still not a production-ready framework at this point, the components presented here might be subject to change in further releases.

Icons

The first Jetpack Compose component that we’re going to explore in this article is Icon. The Icon component draws an asset using tint. If we specify else, apply AmbientContentColor by default. …


A look back at the last 5+ years of Android development and how far it’s come

Image for post
Image for post
Photo by Johannes Plenio on Unsplash

I created my first ever Android application in 2015. Back then, Android development was entirely different compared to what it is now. There were no Jetpack libraries to learn about best practices when you were dealing with high-performance apps and large datasets and no fancy UI kits like ConstraintLayout or MotionLayout. To be frank, even Android Studio isn’t that smart back then.

In my experience since the beginning of Android development, I’ve seen tremendous progress in six areas — Language, UI, Libraries, AndroidX, Privacy & Security, and Tools.

Language — Kotlin

In the beginning, I prefer to work with Java than Kotlin due to a lack of resources to learn. It wasn’t that difficult for me because I started learning Java in my college days. So it took three to four months of hard work to start my carrier as an Android developer. …


Learn about static, dynamic, and pinned shortcuts

Two phones on a desk
Two phones on a desk
Photo by The Average Tech Guy on Unsplash.

In the Android ecosystem, shortcuts are a way to quickly provide specific functionality or features to users. Each shortcut can refer to more than one intent. The type of shortcuts for an app typically depends on the core use cases of the application.

For example, if you take the Gmail application, “compose an email” makes sense as one of the static shortcuts. If you take the Chrome application, “navigate to the most visited website” can be considered an ideal dynamic shortcut.

Types of Shortcuts

Shortcuts in Android are mainly classified into three types: static, dynamic, and pinned shortcuts. Let’s learn about each type.

Static shortcuts

These types of shortcuts deliver consistent behavior to users throughout the lifetime of the application, and they’re not context-sensitive. …

About

Siva Ganesh Kantamani

Learn. Code. Write. Repeat. Visit me at https://about.me/sivaganesh_kantamani & Join my email list at https://tinyletter.com/Siva_Ganesh_Kantamani

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store