10%

Try : Insurtech, Application Development

Edtech(5)

Events(31)

Interviews(10)

Life@mantra(10)

Logistics(1)

Strategy(14)

Testing(7)

Android(42)

Backend(28)

Dev Ops(2)

Enterprise Solution(20)

Frontend(28)

iOS(39)

Javascript(13)

AI in Insurance(25)

Insurtech(57)

Product Innovation(34)

Solutions(13)

Augmented Reality(7)

Customer Journey(7)

Design(6)

User Experience(21)

Artificial Intelligence(94)

Bitcoin(7)

Blockchain(14)

Cognitive Computing(7)

Computer Vision(6)

Data Science(13)

FinTech(41)

Intelligent Automation(25)

Machine Learning(43)

Natural Language Processing(10)

The Clash of Clans: Kotlin Vs. Flutter

First things first – Kotlin is a programing language whereas Flutter is a framework. As frameworks provide solutions to particular problems, you’ll find several inbuilt functions in Flutter to complete an application. And, of course, programming languages know no limit for app development. 

Since May 2019, Google officially supports Kotlin for mobile app development on Android. But, Flutter is an open-source mobile application development framework created by Google itself!

Both Kotlin and Flutter have a ‘Google tag’ attached with them. Therefore, ‘which is better’ is a big question before developers. Reading further, you’ll get to know ‘when’ to use Kotlin or Flutter.

When to use Kotlin?

Kotlin is a cross-platform general-purpose programming language. Although it relies on Java Class Library, its syntax is more concise. Want to know the difference between Kotlin and Java? Here’s your answer.

The scope of app development in Kotlin is unlimited. For instance, Uber’s internal tooling processes (e.g. Annotation processors, Gradle plugins, etc.) are coded in Kotlin. Pinterest app moved from Java to Kotlin to provide users a better interface. 

Source: Pinterest@GooglePlay

Following are the situations where Kotlin supersedes any other programming language for mobile app development.

#1 Adding Features to an Existing App

Kotlin works well and is interoperable with Java and Java components. If you want to add features to an existing app, then instead of revamping the entire architecture or changing the platform, you can simply use Kotlin to solve the purpose.

#2 Simple Syntax for Sophisticated Codes

With intuitive syntax, it is easy to write and deploy new codes in Kotlin. For apps that require heavy coding, Kotlin is simple to maintain. 

#3 Inbuilt Debugging

Kotlin’s fail-fast compiler can search bugs automatically and prevents them from coming again. Thus, Kotlin is safer than Java and reports and resolves crashes instantly.

StackOverflow survey 2019 reveals-  Kotlin is the fourth most loved programing language!

When to use Flutter?

Flutter is a framework developed by google on Dart programming language. Its architecture includes the Dart platform, Flutter engine, Foundation library, and design-specific widgets. Flutter got the spotlight because apps developed in Flutter are compatible with both iOS and Android.

The Flutter framework is capable of building full-fledged applications in different domains like e-commerce, utility, social, and entertainment. For example, Alibaba’s mobile app is built in Flutter.

Image source: Alibaba@GooglePlay

#1 For Building Minimum Viable Product (MVP)

If you want to build an application in minimum possible time, you should go for Flutter. Be it to impress investors, or present prototypes, Flutter is just sufficient (and fast too) to give a clearer idea of the product.

#2 Quick Fixes

Flutter’s hot reload feature allows developers to execute code changes in real-time. If you know, the project will require frequent changes, Flutter can give you quick fixes. 

#3 Easy Set-up

Flutter is easy to set-up, even in low-end PCs. It enables developers to access native features like Geo-location and camera along with additional widget support.

It would be unjust if we don’t discuss the situations where Flutter doesn’t meet developers’ expectations.

At present Flutter is still in its early stages. There aren’t too many CI (Continuous Integration) Platforms (e.g. Jenkins and Travis) that support it. Flutter, although makes it easy to build apps for android and iOS, does not cover web-apps. Therefore, Flutter is a misfit for businesses that require both mobile and web applications.

Now that Kotlin vs. Flutter is a hot-topic, should ‘React JS’ feel left out?

React JS, which is backed by Facebook was once popular for developing mobile user interfaces. Many developers still prefer React Native, which enables native Android, iOS, and UWP development with React. However, the new-age developers are more inclined towards Kotlin and Flutter.

What Developers say on Kotlin Vs. Flutter

“Dart is just a wannabe amateur hobby me-too project compared to Kotlin.”

Mike Milpot, Software Architect, Inventor

“Apart from the fact that you can still call Android/iOS APIs, building Flutter UIs is a bit more exhaustive than it is on Android.”

Wilberforce Uwadiegwu, Mobile Software Engineer, NCK Tech

“You can of course, use the Flutter knowledge to develop iOS apps later, so it can be a more useful knowledge if you want to focus on mobile development, but learning java will give you a step if you want to work on Back-end web development.”

Maycon Miranda, Web Developer, Bio Extratus

“Currently flutter lacks library/guide when comparing to Kotlin/Java. Therefore sometimes you’ll need to transfer or wrap Android library to flutter by yourself. It’ll make the time of developing your application increased.”

Phạm Anh Minh, Samsung Vietnam Mobile R&D Center

Final Thoughts

Kotlin and Flutter are competitive and are going to be better with every release. Experts say, if you want to strengthen back-end app development skills, you should learn Java followed by Kotlin. Thereafter, with little effort, you’ll automatically get hold of flutter.

Cancel

Knowledge thats worth delivered in your inbox

8 Best Ways to Reduce Android App Size

5 minutes, 29 seconds read

With the increase in mobile storage spaces that have gone up to 256 GB, app size is also growing. App size is sure to grow as developers are adding new features, trying to meet customer needs, and also trying to support their apps on various screen sizes. Around 74% of the world uses Android, and 70% of users consider app size before installing them. Moreover, as humans are getting accustomed to instant gratification, they ponder on ways to download apps as they take up storage spaces. Despite the cloud support for photos, videos, and files, android users face issues, such as mobile hanging due to app size. As customer expectations are increasing, android app developers are considering other ways to reduce app size while still incorporating significant additional features and keeping in mind the customer experience.

Below are the 8 best ways to reduce android app size:

1. Use Android App Bundle to Reduce App Size

When generating the release version of your app, you can choose between APK and Android App Bundle.  The second option will make Google play to generate the APK with only those features a specific user need. 

Use Android App Bundle

App Bundle Vs APK

Android App Bundle

  • It is a publishing format that includes compiled code and resources of your app, and delays APK generation and signing to Google Play.
  • With Android App Bundles, the compressed download size restriction is 150 MB. The app bundle cannot be used with APK expansion files.
Android App Bundle
Important: In the second half of 2021, new apps will be required to publish with the Android App Bundle on Google Play. New apps larger than 150 MB must use either Play Feature Delivery or Play Asset Delivery.

How to build android app bundles?

To build app bundles, follow these steps:

  1. Download Android Studio 3.2 or higher—it’s the easiest way to add feature modules and build app bundles.
  2. Add support for Play Feature Delivery by including a base module, organizing code and resources for configuration APKs, and, optionally, adding feature modules.
  3. Build an Android App Bundle using Android Studio. You can also deploy your app to a connected device from an app bundle by modifying your run/debug configuration and selecting the option to deploy APK from app bundle. Keep in mind, using this option results in longer build times when compared to building and deploying only an APK.
  4. If you’re not using the IDE, you can instead build an app bundle from the command line.
  5. Test your Android App Bundle by using it to generate APKs that you deploy to a device.
  6. Enroll into app Play App Signing. Otherwise, you can’t upload your app bundle to the Play Console.
  7. Publish your app bundle to Google Play.

Please note: Android Package Kit – As per developer console, by the mid of 2021, developers won’t be able to upload apk on play store)

  • Android operating system uses APK which is the package file format for distribution and installation of mobile apps, games and middleware. APK is similar to other software packages such as APPX in Microsoft Windows or a Debian package in Debian -based operating systems.
  • Google Play requires that the compressed APK downloaded by the users should not exceed 100 MB.
  • The expansion files for your app are hosted by Google Play which serves them to the device at no cost to you. The expansion files are saved to the device’s shared storage location (the SD card or USB-mountable partition).

2. Use Proguard

Proguard is probably one of the most useful tools to reduce your APK size. It reduces the source code files to a minimum and can reduce the APK file size upto 90%.

  • Use it in all variants whenever using “Proguard”
  • Helps to avoid conflict at the of generate apk or bundle if will use in all the variants.
  • We cannot let ProGuard rename or remove any fields on these data classes, as they have to match the serialized format. It’s a safe bet to add a @Keep annotation on the whole class or a wildcard rule on all your models.

3. Use Android Size Analyzer Plugin

This Android Studio plugin will provide you recommendations to reduce the size of your application.

With the APK Analyzer, you can accomplish the following:

  • View the absolute and relative size of files in the APK, such as the DEX and Android resource files.
  • Understand the composition of DEX files.
  • Quickly view the final versions of files in the APK, such as the AndroidManifest.xml file.
  • Perform a side-by-side comparison of two APKs.

There are three ways to access the APK Analyzer when a project is open:

  • Drag an APK into the Editor window of Android Studio.
  • Switch to the Project perspective in the Project window and then double-click the APK in the default build/output/apks/ directory.
  • Select Build > Analyze APK in the menu bar and then select your APK.

More details at: Jetbrains

4. Optimize Your App’s Resources

Whether used or not, every resource takes up memory. It is therefore necessary to have only those resources that you need, and to use those in a memory efficient way. In other words, you should consider the resolution of the image before finalizing on it.

5. Optimize Libraries

As large libraries consume huge amounts of space, it is advisable to remove parts of it in case you do not need them and if it is permitted by the license of the library. Proguard can aid you in this process but it is not always able to remove large internal dependencies.

6. Use Vector Graphics Wherever Possible

They are sharp and do not consume much space as they rely on mathematical calculations and not on pixels that need to be saved. However, they cannot be used for photography.

7. Compress Your Images

By using tools such as pngcrush, you can reduce the file size of PNG images. It is advisable to do this images as they still look the same. 

8. Only Support Specific Densities

If only a small portion of users use a specific density, it might be better to let Android scale your other densities for them as it would reduce your APK size.


As mobile storage space is growing, people are installing a large number of apps to meet a wide range of needs. But as app size is increasing, people are continuing to struggle with storage issues. With provisions such as Proguard, one can compress the APK file size and optimize libraries easily. Compressing images and using vector graphs are also useful in reducing app size.

About the author: Anand Singh is Tech Lead at Mantra Labs. He is integral to the company’s Android-based projects and enterprise application development.

Further Reading:

Cancel

Knowledge thats worth delivered in your inbox

Loading More Posts ...
Go Top
bot

May i help you?

bot shadow

Our Website is
Best Experienced on
Chrome & Safari

safari icon