I decided to test out Jetpack Compose by making a simple Twitter UI clone after I came across this tweet by Mariano Zorrilla:
He used Flutter (which is an amazing tool btw for building cross platform apps) — with just one day of work, 1500 lines of code. That’s beyond impressive (specially the fact that Flutter can be hosted on CodePen as well).
So with similar constraints, I wanted to try out Jetpack Compose. I followed the CodePen example (as closely as I could) and this is the result:
Android Jetpack’s Navigation component is the modern solution for navigating between screens in Android apps. It supports both activities and fragments (including dialogs). What is more, it allows to pass data to destinations.
Unfortunately there is a snag. If you read documentation carefully you’ll find the Proguard considerations section. So every time you use non-primitive argument types you have to remember to either annotate its classes with
@Keep annotation or add corresponding
-keepnames rules to Proguard/R8 configuration (of course if you don't obfuscate your code then this problem is irrelevant but most apps are obfuscated).
However, it’s not a perfect solution…
Android started out with
android.hardware.Camera. This was a simple set of APIs which enabled developers to quickly implement a camera feature in their app. But having been added back in Android SDK 1, they started to get outdated. The market changed and users began to demand a lot more from their phone camera.
Android introduced the Camera2 APIs. These gave manufacturers and developers the ability to add more complex camera features. Although a comprehensive API, many developers found it too complicated to implement for a simple use case.
Recognising the complexity of Camera2, Google has now released a Jetpack library…
The Android UI toolkit API has remained the same for nearly a decade now and while new libraries like recyclerView, constraintLayout, motionLayout, and many others were launched, the toolkit was never changed fundamentally.
Jetpack Compose is a radical shift in the way developers think about and write UI code on Android.
Jetpack Compose is an unbundled toolkit designed to simplify UI development. It combines a reactive programming model with the conciseness and ease of use of the Kotlin programming language.
With compose, UI components are fully declarative and allow developers to create layouts by simply describing what the UI should…
So you choose MVVM (Model-View-ViewModel) for your app’s architecture, Brawo, a good choice! In MVVM we separate view from view model from the model. Generally speaking, separation is a good thing that’s why we have the principle of “Separation of concerns” that is a fundamental principle to write good software.
Separation of concerns, or SoC, is a principle of software design that code be separated into layers and components that each have distinct functionality with as little overlap as possible.
Let’s define View and View-Model responsibilities in MVVM architecture, as this definition will guild us to design our code.
What is up Mobile and Android Devs, hope you all have been doing good! This will be a blog series on developing Android apps with the usage of Jetpack features along with coding tutorials and explanations. Aspiring and rookie Android Developers are going to get more benefit from this blog series. In the last part of the series, we will be developing a Music streaming and player app using Android Jetpack features. So stay tuned and start developing! :)
Mobile Application Development has been playing a real integral part when it comes to fulfilling the needs of the people all…
For those of you who do not know what is Android Jetpack then
Android Jetpack is a collection of Android software components to make it easier for you to develop great Android apps.
They help you to
Here is the video from Android Developers Channel:
Now talking about ViewModel
ViewModel allows your data to survive configuration changes such as screen rotations,Multiscreen so you will not lose your data.
Let’s focus on a particular app that fetches…
Checking for connectivity on Android is reasonably straightforward. You get hold of an aptly named
ConnectivityManager and request some
NetworkInfo object you can also get other interesting information about the active network.
Trying to listen for connectivity changes is slightly more tricky and has changed over recent years.
Previously to achieve this, you would register a
BroadcastReceiver with an action of
ConnectivityManager.CONNECTIVITY_ACTION in your manifest. This would then trigger, as you might expect, when connectivity changes, giving you the callback you need.
This approach might be one of the Android development team’s top regrets. Since…
Every year, Google’s famous conference brings programmers fresh look on Android development. The idea of one of the talks seemed appealing to me — how to write code in a modern way. Modern (theoretically) means better, faster, easier. Will new components from Google change the way we look at Android Framework?
This year, the talk involved new tools for code profiling and memory tracking, short overview on Kotlin and KTX library, some advice on layouts, Jetpack components, lifecycle, best coding practises and many, many more. In this article, I’ll focus on Google’s programming advices and new approach to architecture.
Hi everyone ⊂( ◜◒◝ )⊃,
so lots of articles basically show APIs from a bird’s-eye view, but for such purposes, I would rather explore documentation first. That’s why today I want to show you a short explanation what lies under the hood of new Architecture Component that has been announced just recently at Google I/O 2018 and I am talking about WorkManager from JetPack.
So, before any use to make it work you have to prepare your environment, namely include the right dependency and you are good to go:
implementation "android.arch.work:work-runtime:1.0.0-alpha01"// if you want some benefits from Kotlin then…
The (retired) Pub(lication) for Android & Tech, focused on Development