Top 10 Kotlin extensions used in Android App Development by Google Developers.
In this article, we will make some cool Android Extensions in Kotlin Programming Language.
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…
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…
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.
We often include dependencies for a specific purpose like some dependencies for networking, some for performing background tasks, etc. So my idea here is why shouldn't we group them according to that?
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…
Today, we will be going to build an Android Camera App that will detect the objects which will come in the camera preview. In this project, we will be using a custom ML model or you can also use your own, if you have any.
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 ?
👇🏼
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 :
These configuration are for compose version : 0.1.0-dev13
android {
... buildFeatures {
compose true
} compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } composeOptions…
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.
Jetpack Compose simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. …
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?
What you will not get in this blog?
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.
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 :)
Build.gradle (app level)
android {
... …
According to the Google android developers site: “ Notifications provide short, timely information about events in your app while it’s not in use”
After creating your android project,
Starting in Android 8.0 (API level 26), all notifications must be assigned to a channel. For each channel, you can set the visual and auditory behaviour that is applied to all notifications in that channel. …
Android Developer