Image for post
Image for post
Photo by Ashim D’Silva: https://unsplash.com/photos/3Ijt7UkSBYE

We all heard of the architecture components library. However, if our app is built with an MVP architecture or MVVM architecture, there are specific barriers to using it.

How can we cross these barriers?

Please note that architecture, in general, is abstract, and apart from some ground rules, it can be applied in different ways. Therefore, read this article as a means of new ideas or approaches rather than a single way to do things.

History

In the beginning, there was no architecture. Making applications were the name of the game back then.

However, as time passed, there came an understanding that the code base needs to be maintainable. As an application grows, so does its complexity. Using god activities made everything very coupled and hard to maintain. Sometimes even the smallest feature could break the entire system. …


Image for post
Image for post
Photo by Masaaki Komori on Unsplash

Android has many SDKs for various usages, from remote API handling to animations. Adding an SDK to your application, such as Retrofit 2.0, is a no-brainer and is even a recommendation. What about less familiar SDKs? What power can an unfamiliar SDK have over your application? Can an SDK add permissions to your application without you knowing about it?

Having a successful application suddenly displaying permission not related at all to the app, can be disastrous and result in users abandoning it.

Can any SDK insert permission stealthily into our application?

Manifest Permissions

I am using location permission in this article, but any other permission is relatable to this article. …


Image for post
Image for post
Photo by Denise Johnson on Unsplash

For every Android developer comes a day where the Android built-in views are not enough. One day your designer or project-manager or client or even you need a unique feature. That single feature embodies a particular view that does not exist naturally in the Android world.

The first and correct instinct is to search for a library that does the trick. …


Image for post
Image for post
source: https://unsplash.com/photos/UIUgYu9bENU

On October 4th, 2017 Google has released the new line of Pixel devices. The headphone jack is dead in the eyes of Google (WHY?!), Google assistant is everywhere, and soon even your fridge will talk to you.

However, something was missing.

Apple released its stunning iPhone X but I was impressed by something else — the Apple watch series 3. Apple introduced a watch with cellular capabilities.

Image for post
Image for post

Wait a minute; Google has already done that, right? If a tree falls in a forest and no one is around to hear it, does it make a sound?

Google stated that it would be working with big manufacturers to release more watches running Android Wear. However, where are they? If they are making ones, they sure aren’t marketing them. …


Image for post
Image for post
Credits belong to: https://www.instagram.com/cinamon357

You need to add a new API call. Because the server error and API error handling code is usually similar to all the API calls, you just copy paste another call and change its parsing code. We have all done it at one point or another in our Android career.
We have all been bothered by the long never ending list of similarly looking API calls

If you’re looking for a faster to write, cleaner and less bug prone code — tag along.

I will be using Retrofit 2.0. Even if you are not familiar with Retrofit or don’t want to be, I recommend reading on as this article is more of a blueprint.


Image for post
Image for post
Just as one will pay attention when entering a road after seeing the sign, so should you when using a new language. Credits belong to https://www.instagram.com/cinamon357.

History

The Java language was built to write once run anywhere. Instead of compiling directly to machine code it compiles to bytecode, and afterward, the JVM translates the language to machine code. This approach allows the hardware to become an abstract layer, freeing the developer from keeping it in mind when developing programs.

When the Android operating system was open for development back in 2009, the programming language to build Android applications was Java.

Fast forward to 2011, JetBrains unveils the Kotlin programming language. Even though it took JetBrains to release the 1.0 stable version of Kotlin 5 years, it caught the Android development world’s attention with its approach to solve the verbosity and problems of the Java programming language. …


Image for post
Image for post
We can spot a few different ViewHolders in this real life RecyclerView grid. Credits belong to: https://www.instagram.com/cinamon357

At one point or another, we have all written an application that displays data in a list form. Whether you were around when ListView was the way to show information in a list or started developing when RecyclerView became the standard for that, you are familiar with RecyclerView and the ViewHolder design pattern.

At this point, you belong to roughly one of two groups when it comes to writing an implementation of an Adapter and ViewHolders.

ViewHolder view class members access from the adapter

Through public access of your ViewHolder view class members, the adapter puts the relevant data inside them during the onBindViewHolder method.

class Adapter {  ... …


Image for post
Image for post
http://www.clipartbest.com/clipart-RcGG5agpi

Generics is one of the best tools you could have in your tool belt. Whether you used generics before or were too afraid to, I welcome you to this generic overview (pun intended).

Methods

We will assume that Arrays.toString() does not exist and we need an integer array printing method:

If a double array printing method is required, a simple copy paste action (mastery of software developers) followed by variable type name changes will result in:

Similarly, if a new printing method for string arrays is needed, we could copy-paste and change the variable name types. However, a close look at both methods reveals similarities. …

About

T.Surkis

An Android developer by day, a technology enthusiast by night. Find me @ www.tsurkis.com/

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