Skip to main content

Posts

Google re-branded the support Android libraries to AndroidX

It is important to note, you cannot mix AppCompat and Jetpack in the same project. You must convert everything to use Jetpack if you want to upgrade. The support library artifacts are being deprecated and all future development is going into AndroidX , so there's no avoiding this migration. Alan Viverette sums this up nicely: “There won’t be a 29.0.0, so Android Q APIs will only be in AndroidX” The stable release of 28.0.0 will be the final feature release packaged as android.support . All subsequent feature releases will only be made available as androidx-packaged artifacts. Below tips will give you a clearer transition path. The current version of AppCompat (v28.x) is exactly the same as AndroidX (v1.x). In fact, the AppCompat libraries are machine generated by changing maven coordinates and package names of the AndroidX codebase. For example, android.support.v7.app.AppCompatActivity is now androidx.appcompat.app.AppCompatActivity For a complete listi
Recent posts

Android Pi migration(28 API support)

I am here to give some inputs on android PI migration. .  Apps must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance . From August 2019, new apps must target at least Android 9.0 (API level 28) . The objective here is to make sure that your existing app works as-is on Android 9. Because some platform changes might affect the way your app behaves, some adjustments might be necessary, but you do not need to use new APIs or change your targetSdkVersion. Android Service Problem On Oreo, startService() will throw IllegalStateException. This can be fixed by changing it to startForegroundService(). but it also stops the service immediately if you don’t bind to the Notification with Service.startForeground() within 5 seconds. For other background service we decided to use the WorkManager . Implementation: Since we have minSdkVersion 19, We migrated to workmanger for scheduled tasks and we still use JobIntentSer

Android apps ready for the 64-bit requirement!

64-bit CPUs bring in areas such as artificial intelligence, machine learning, and immersive mobile. Supporting 64-bit prepares the ecosystem for the innovation enabled by the advanced compute capabilities of 64-bit devices, and for future Android devices that only support 64-bit code. Starting August 1, 2019 , all new apps and app updates that include native code must have 64-bit versions as well as 32-bit versions when publishing to Google Play. How am I affected? Your app makes use of native code if it meets any of the following criteria: - Your app makes use of C or C++ code. - Your app links with third-party libraries that contain native code. - Your app is built by a third-party app builder that uses native libraries. Preparing for the 64-bit requirement 1. Inspect your APK or app bundle for native code. You can check for .so files using APK Analyzer. Identify whether they are built from your own code or are imported by an SDK or library that you are using. If y

MVC, MVP and MVVM Design Pattern in Android

MVC, MVP, and MVVM are three popular design patterns in software development. Let’s have a look on Model View Controller (MVC), Model View Presenter (MVP) and Model View View-model (MVVM) one by one. Lots of Android libraries that make their life easier. And enable proper architecture for Android apps at the same time. For instance: Android DataBinding – allows transfer of certain application logic into XML; Dagger 2 – that implements the ‘Dependency Injection’ technique; Android Annotations – library making Android components implementation as simple as possible, while not cutting down their features; RxAndroid – highly functional coding approach, one that if fully apprehended may optimize lots of tasks; Firebase – mobile and web application platform that helps to develop high-quality apps; Model View Controller (MVC) MVC design pattern divides an application into three major aspects: Model, View, and Controller. The tools offered by Android, with layouts, Activit

Android Jetpack Overview

Android Jetpack is a set of components, tools and guidance to make great Android apps. In addition, your app can run on various versions of the platform because Android Jetpack components are built to provide their functionality independent of any specific version, providing backwards  Jetpack is a set of libraries, tools and architectural guidance to help make it quick and easy to build great Android apps. It provides common infrastructure code so you can focus on what makes your app unique. Jetpack should help limit your reliance on boilerplate copypasta , with an eye towards rapid development and unit testing. It's even optimized for Kotlin, if you've started moving over into the new language. Google has also increased how quickly the Android Studio emulator launches , thanks to new snapshots which store the full state of the emulator while it isn't in use . All this combines together to let you develop apps faster . Android Jetpack comes with five new com

Kotlin and Android

Kotlin is now an official language on Android. It's expressive, concise, and powerful. Best of all, it's interoperable with our existing Android languages and runtime. To use Kotlin in Android Studio prior to version 3.0 you have to manually install the Kotlin plugin. To do so, start Android Studio and open Plugins from the Configure menu . In the opened dialog, search for Kotlin , select the corresponding plugin and press Install . Kotlin for Android Development: Kotlin is a great fit for developing Android applications, bringing all of the advantages of a modern language to the Android platform without introducing any new restrictions. Compatibility: Kotlin is fully compatible with JDK 6, ensuring that Kotlin applications can run on older Android devices with no issues. The Kotlin tooling is fully supported in Android Studio and compatible with the Android build system. Performance: A Kotlin application runs as fast as an equivalent Java one, thanks to ver

Understand Instant App in Android

Introduction  Instant apps is a new feature from Google on Android Platform.  Native Android apps, without the installation.  Access From Anywhere.  Works on the Latest Android Devices.  Slim down your application  Support deep linking and App links. Google recently released Instant Apps to developers as part of an effort to help kickoff the next big enhancement to the native app experience in Android. Instant Apps aim to help bring users into the best native app experience as quickly as possible by downloading only parts of an application when they need them . This makes it fast and easy to engage users with great mobile app experiences, even though they do not have the application installed on their devices . Access From Anywhere: Instant Apps are triggered by URL intents , meaning that they can be started from anywhere including, search results, social media shares, messages, beacons, NFC and other applications or even other Instant Apps — without needin