ANDROID

Top 10 Kotlin extensions used in Android App Development by Google Developers.

Overview

Official definition

Kotlin provides the ability to extend a class with new functionality without having to inherit from the class or use design patterns such as Decorator. This is done via special declarations called extensions.

Don’t think about Decorator too much. It is a design pattern that allows a user to add new functionality to an existing object without altering its structure.

In this article, we will divide the extensions into 3 parts to…


Android

A simple guide to understand various components of MVVM Architecture in Android

I had directly jumped from MVC to MVVM, so it was quite difficult for me to understand the usage of different components in this architecture. You can also find many useful resources that can tell you how to start with the architecture but they all were quite bound to the code.

So in this article, we will be talking about various components of MVVM architecture. I will not be talking much into code but will provide you a clear image of the components which are used in it. If you are familiar with the MVVM architecture then you can skip…


ANDROID

Manage your Gradle dependencies in a smart way!!

Cover Image

With every increasing dependency, it becomes hard for us to manage the Gradle file. In this blog, we will try to manage our dependencies by moving them to another file and grouping similar dependencies.

How am I planning to do this?

For example:

I am using these dependencies for cameraX.

implementation "androidx.camera:camera-camera2:1.0.0-rc01"
implementation "androidx.camera:camera-lifecycle:1.0.0-rc01"
implementation "androidx.camera:camera-view:1.0.0-alpha20"

Wouldn’t it be nice if instead of these dependencies, I only have to write this:

implementation cameraX

Isn’t it…


CAMERA

With a single page of code, turn your normal camera app into a machine learning app.

Cover photo

Project Overview

Note: The detection of the objects will depend on the camera quality and the trained ML model.

Don't’ know about cameraX? The new camera library by Android.

Don’t worry!! You can check that out in the blog below.

What we are going to build ?

👇🏼


JETPACK COMPOSE

Better design in less time

This is the second part of a series : Jetpack Compose

If you have missed the first part, you can read it here :

In this part, we are moving from a basic design to some complex UI.

Prerequisite :

  1. Basic knowledge about Jetpack Compose.
  2. Must have read Part I of this series.

Dependencies

These configuration are for compose version : 0.1.0-dev13

  • Download Android Studio in which compose is available. Right now, it is available in Canary version.
android {
...
buildFeatures {
compose true
}
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } composeOptions…

Jetpack Compose

Better design with less lines of code.

Hello everyone, there’s been a lot going on in the android community, a lot of changes are coming up and one of them is Jetpack Compose.

This blog is the first part of the Jetpack Compose series. After completing this, you can also check out how to make a more complex UI with multiple lists of data in the second part of this series.

Those who know what Jetpack Compose is can skip this part.

Introduction

Jetpack Compose simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. …


Authentication

Most secured way to authenticate.

Cover image

A few days back I had to make an Android POC on FIDO Protocol and when I started browsing about it, I had not got much of any help from the official documentation and due to which it took more time than I had excepted.

So, I am writing this blog to simply things which caught me back when I was developing this.

What you will get in this blog?

  • A basic idea how FIDO Authentication works.
  • Much explanation about why things are not working.
  • And, some surprise in the end 🤩

What you will not get in this blog?


Camera

Simplest way to click and analyse photos in Android

I know, you too are also sick of the various complicated methods of handling camera in Android. But before jumping direct to it. I want you to know some of the features of CameraX so that you can choose them according to your requirement.

Features :
1. Lifecycle-aware.
2. Consistency across devices.
3. Includes effects like Portrait, HDR, Night, and Beauty.
4. You can access frames for use in your algorithms, such as to pass into MLKit.

Right now, CameraX is in beta and provides only 3 use cases i.e preview, Image analysis and Image capture.

Some important notes :

  • Instead of an application…


Spring Animations

ANIMATION

A complete guide for physics based animations.

Spring animation Gif

Designing animations, you need to analyze their influence on usability and desirability of the app — and if you cannot see a real positive impact, reconsider the approach.

Good UI animation is always a cherry on top.

With this thought, let’s start coding.

Oh wait. If you don’t much reading there a video of this lesson at the end of this blog. You can have a look at that :)

Prerequisite :

  • You should have an idea about Data Binding and View Model.

Build.gradle (app level)

  • Enable the data binding.
android {
... …

According to the Google android developers site: “ Notifications provide short, timely information about events in your app while it’s not in use”

What you will learn in this lesson?

  1. Automatically creating a notification after a certain period.
  2. Providing a button and a large image to that notification.
  3. Snoozing that notification for some time.

After creating your android project,

Step 1: Create a Notification Channel

Himanshu Choudhary

Android Developer @BluSmart

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