Welcome back to the What is Android app development series! If you read our first article, you now know of Android’s history and you’re aware of the basics of how the platform works. This edition of the What is Android app development delves into the following topics:
1. Why should you learn Android app development?
– Open Source
– Google Play Store
– Make some money!
2. An introduction to Kotlin
– What is Kotlin?
– What happens to Java?
– Kotlin addresses some of Java’s biggest flaws
– What does the future of Kotlin look like?
Why should you learn Android App Development?
With all the various operating systems out there, why choose to learn about the one OS with a green robot-bug as a logo and names like “Cupcake” as their updates? Reports from Statista state that Android holds the biggest share of the global smartphone market at a whopping 75%. That’s like owning most of the property in a game of Monopoly! Android also shows no signs of slowing down its growth as the play store is perpetually expanding. Here are a few reasons why you definitely should learn Android app development:
1. Open Source
Google’s decision to keep Android as an open-source OS has been its best decision. Anyone can design Android apps if they please. Unlike iOS, Android has no developmental restrictions, which makes it extremely flexible. Get as creative and as weird with your apps as you want, the sky’s the limit! Don’t believe me? Here are some of the weirdest apps I’ve come across:
1. Carrr Matey: Everyone forgets where they have parked their car from time to time, it’s natural. This app helps you locate your lost car, which is incredibly helpful. However, the twist is that this app will tell you where your car is parked in a pirate voice. Yes, you read that right, a pirate voice. I honestly think this pirate is probably funnier than Jack Sparrow.
2. Places I’ve Pooped: So this is pretty self-explanatory. Use it to mark your territory both digitally and quite literally.
3. Pimple Popper: If you’re one of those weird people who get some sort of pleasure from popping pimples then this one’s for you. This app is as weird as the person who designed it.
4. Nothing: No, you didn’t misread that. Staying true to its name, this app quite literally does nothing. Upon opening the app, you see a grey screen with the word “nothing” written in the centre. No buttons, no menus, and no interactivity. It’s nothing.
Another major advantage to being open-source is that there’s no license fee! You can acquire the Android platform for free and develop a prototype.
2. Google Play Store
The perpetually evolving and improving Google Play Store is fantastic. A few years ago the Play Store was saturated with millions of apps, which made it incredibly difficult for app developers to market their products efficiently.
By March 2018 Play Store maxed out at 3.6 million apps. However, right now the total number stands at 2.9 million. Between March 2018 and September 2018, Play Store dumped almost a million apps. Why did Google take such a step?
This is because they made some major upgrades to their policy, which benefited both the users and the developers. The upgrade in policy entailed more stringent rules on adult content on children’s apps, spam apps, misrepresentation, and cryptocurrency mining amongst other changes. This was good for developers as a less saturated app store means more opportunity to create quality apps that don’t get drowned out by mediocre ones.
3. Make some money!
There are a couple of options for Android developers to make some money. One of the options is to get a job as an Android developer. Android and software app developers are constantly hiring and the job market is perpetually growing alongside the industry. A quick Indeed search for an Android Developer shows over 4,000 jobs in India and that’s just one of the many job portals. The average salary of an Android developer is ₹451K per year. Internshala’s internship portal also currently has 86 Android app developer internship opportunities across India.
The second option is to monetize your apps. You can implement multiple monetization models for your app to ensure multiple streams of revenue. Here are the monetization options:
1. Subscriptions: Use Google Play Billing service to offer users ongoing access to services for a recurring fee. Often used for features such as free-trials, flexible billing, upgrades, and downgrades. Examples include OTT streaming services, dating apps, games, editing apps, etc.
2. Advertising: You can’t go wrong with ads. Get paid for displaying Google AdMob ads.
3. E-Commerce: Use Google Play to sell physical goods and services.
4. In-app purchases: Sometimes customers dislike apps and will opt to pay to not see them. Developers can capitalize on this dislike of ads and charge fees to remove them. That’s just one of the potential uses of in-app purchases.
5. Paid apps: Set a price for your app.
Now that you know why you should learn Android app development, you must be thinking ‘where do I start?’. A good place to start would Kotlin.
An Introduction to Kotlin
2017 was the last time we saw Hugh Jackman portraying the badass known as Wolverine in the movie Logan. Logan wasn’t the most exciting news that year though. Google announced that Kotlin will be the second official language of Android app development. Kotlin’s success has skyrocketed since then. In mid-2019, Google announced that Kotlin is the preferred language for Android app development. Kotlin’s popularity is due to its level of pragmatism, intuitive, and concise nature.
Let’s take a deep dive into what Kotlin is.
What is Kotlin?
The motto of the Kotlin project was productivity. Kotlin’s end goal was to enhance the coding experience in both a practical and effective way. A primary focus of Kotlin is to facilitate mixed-language projects. Using Kotlin with Java reduced excessive boilerplate code, which is a huge sigh of relief for Android developers. Boilerplate code is when many sections of code have to be included in many places with little or no alteration. It’s particularly relevant to Java as Java is considered extremely verbose. In short, the programmer has to write a lot of code for minimal jobs. It’s like paying 500 bucks for a biryani with only 3 pieces of chicken, and nobody likes that.
2019 was a pivotal year for Kotlin as many enterprise leaders either have or were planning to make the shift to Kotlin. Mobile apps like Pinterest, Twitter, Netflix, Uber, Airbnb, and Evernote are all switching to Kotlin for Android applications.
What happens to Java?
The question on Android app developers minds is “what’s going to happen to Java?” After all, since its inception, Java has been the primary programming language for the Android studio. Does the growth of Kotlin suggest the end of Java?
Developers have mixed reviews and are uncertain too.
Java is a well-known programming language that boasts a range of open-source tools and libraries that aid developers. However, no language is flawless. Java can make developers want to rip their own hair out or scream into a pillow because it can make their job extremely tedious. Kotlin will provide solutions to recurring programming issues and help elevate the Java ecosystem.
Since its rise in popularity in the past couple of years, some developers think Kotlin will excommunicate Java and be the only language for Android developers. However, others see Kotlin and Java coexisting without stepping on each other’s toes.
Kotlin is by no means a perfect language, it comes with its own imperfections. However, its imperfections are overlooked because of its strengths. It’s like how we still love Tom Cruise despite his weird behaviour. Kotlin is clean and less verbose in terms of writing callbacks, data classes, and getters/setters. Kotlin is designed to improve existing Java models.
Kotlin addresses some of Java’s biggest flaws
One of Kotlin’s primary features is interoperability. Since its inception, the Kotlin project’s purpose was to use existing knowledge and expertise to provide every available library to Kotlin programmers. Android app developers can write modules in Kotlin that work beautifully within the existing Java code. Thanks to the emission of Bytecode, a Kotlin compiler allows the two languages to work together within the same project. Java and Kotlin working in unison are like Serena and Venus Williams teaming up for doubles.
Conciseness is one of Kotlin’s unique selling points. Anyone who has ever worked with Java knows that brevity is not one of Java’s best qualities. However, readability is arguably more important than conciseness. The short and sweet nature of Kotlin code makes a developer’s job a little simpler as it decreases the chances of error within codes. Kotlin combats Java’s Boilerplate code issue, which is difficult to read and results in more bugs. More bugs mean developers waste time trying to identify and debug code.
Check out the following image of a simple Java calculator code:
Now have a look at the same calculator code in Kotlin:
You can clearly see that the Kotlin version is a lot leaner than the Java code, yet they carry out the same function. Brevity is crucial when it comes to higher levels of productivity. Working on large and intricate projects becomes easier when each line of code holds more power. The syntax is concise, substantial, and readable.
No Raw Type Code!
Before the use of generics, raw types were often used. Raw types are helpful when it comes to backwards compatibility with older versions of Java. However, the use of raw types can lead to a host of errors during execution. Kotlin does not allow raw types, which produces more type-safe code.
The NullPointerException is infamously known. It’s responsible for many Android Development mistakes. Android relies on null to represent the absence of a value. However, null can wreck an app harder than Wreck-It Ralph. Kotlin combats this problem through an inbuilt inherent null safety. Inbuilt null safety helps developers as they don’t have to write extra code to work around the issue.
What does the future of Kotlin look like?
Developers don’t need to completely overhaul their code and switch to Kotlin immediately. However, Kotlin’s growth is undeniable. it’s only a matter of time before all developers encounter the language. Have no fear though, if you’re familiar with Java it won’t be overly difficult to familiarize yourself with Kotlin too.
The implementation of Kotlin also has some advantages from a business perspective:
1. Fewer app crashes: An app crash can be infuriating. People have literally broken their phones due to app crashes. Kotlin boasts fewer crashes and system failures. Kotlin requires fewer lines of codes and fewer maintenance needs. The enhanced readability also makes it easier to spot bugs and there are not many spots for sneaky bugs to hide.
2. Shorter project timelines: Kotlin’s concise nature assists developers to write code more efficiently and increases productivity levels. This helps in reducing an app’s time to market. The quicker the release, the more money saved.
Overall, Kotlin is a young and growing program with a bright future in the realm of Android App design. It’s currently unclear if Kotlin will completely replace Java or if they will work together. It is advised that anyone who is interested in learning about Android app development should pay attention to Kotlin.
If you have read this far, keep your eyes peeled for the next edition of What is Android app development, which is all about career prospects.
This article just covered the very basics of Kotlin. If you want to continue learning about this exciting language, then you can check out Internshala’s Android app development training and begin your own app development journey!