Fastlane for Android: A Full Featured Example

In this post we’ll see a real world scenario where Fastlane can help us automate releasing an Android app to internal testers and publishing on Google Play as well. If you are new to Fastlane, I suggest you to read my previous posts on Fastlane for Android: Setup and Basics Flavors and Tests Publishing on Play Store Build an APK and upload to Slack Let’s see a Fastlane script for automating Android APK building and uploading to a Slack channel for internal testing purposes....

January 12, 2024 · 7 min

Fastlane for Android: Publishing on Play Store

This guide dives into leveraging Fastlane for updating and managing Google Play store listings and screenshots, tailored for developers familiar with Android app development but new to Fastlane. If you are new to Fastlane, I suggest you to read my first post on Fastlane for Android. Setting Up Your Google Developers Service Account Access the Google Play Console: Navigate to the Google Play Console and locate the “Account Details” section. Note the Developer Account ID listed there for future reference....

January 9, 2024 · 3 min

Fastlane for Android: Flavors and Tests

Following our initial dive into Fastlane for Android, we now focus on leveraging Fastlane for building specific flavors of your Android app and executing unit tests. Fastlane configuration for Flavors Fastlane excels in managing multiple product flavors. To configure Fastlane for different flavors, you’ll edit your Fastfile to define lanes for each flavor: lane :build_flavor1 do gradle(task: "assembleFlavor1Release") end lane :build_flavor2 do gradle(task: "assembleFlavor2Release") end These configurations enable Fastlane to target specific build tasks associated with your app’s flavors, streamlining the build process for each....

January 7, 2024 · 1 min

Fastlane for Android: Setup and Basics

Why Fastlane? Manual deployment processes are not only tedious but prone to human error. Fastlane automates these processes, ensuring consistency and reliability in app builds and deployments. From automating screenshots and managing beta distributions to simplifying app store deployments, Fastlane offers a comprehensive suite of tools that enhance productivity and development workflow. Moreover, Fastlane configuration is stored on a plain text file that should be added to version control, so you can share the release process and keep track of changes....

January 3, 2024 · 3 min

Clean Architecture: una introduzione

Cos’è la Clean Architecture? Il termine Clean Architecture deriva dall’omonimo libro di Robert C. Martin. Questo libro è uno di quelli che ti consiglio assolutamente di leggere se sei uno sviluppatore o se vuoi diventarlo, non deve assolutamente mancare nella biblioteca di un dev che si rispetti! Nel libro viene illustrato in modo estensivo e molto chiaro il concetto di Clean Architecture, ma se dovessi sintetizzare in una frase sola, direi che possiamo pensare alla Clean Architecture come un insieme di linee guida per progettare l’architettura di un software....

October 28, 2020 · 7 min

Speed up your builds… without upgrading your hardware

I wish every build could look like this :) Often the only way to (really) speed up slow builds is to add more RAM, replace the old HDD with an SSD or buy a complete new PC (or Laptop). All those solutions requires investing (a lot of) money. What if we can just keep current hardware and delegate the build to another, more powerful, machine? I usually develop for Android, and everyone knows that Android builds are slow....

April 27, 2018 · 3 min

Migrate to Android Studio 2.3

New features Android Studio 2.3 has finally been released in the Stable Channel. There are many improvements compared to version 2.2, including: Instant run: now there are two different icons, one for restart the app and another one for apply changes without restart. Build cache: it’s used to have faster clean builds by caching exploded AARs and pre-dexed external libraries. App Links Assistant (Tools → App Link Assistant): it allows you to create new intent filters for your URLs, declare your app’s website association through a Digital Asset Links file, and test your Android App Links support....

March 8, 2017 · 2 min

Android Auto Fit TextView

Android framework provides no support for creating a TextView that can fit its content to its size. There are some libraries out there that try to solve this problem, like: AutoFitTextView android-autofittextview But no one of them seems to work in every situation. Looking into stackoverflow I’ve come to this post which seems to hold the best working answer that I’ve tried. Except when I’ve tried to use it when textAllCaps=“true”....

September 9, 2016 · 1 min

Workshop su Google, Android e IoT

Oggi si è tenuto al FabLab di Padova un Workshop sull’Internet of Things, durante il quale ho avuto il piacere di anticipare l’intervento di Intel con un intervento dal titolo #Google, #Android, #IoT. Durante questo intervento ho fornito agli attendenti una panoramica sui servizi che Google mette a disposizione per l’universo dell’Internet of Things e mostrato come è possibile far comunicare una app Android con una scheda Arduino, sia a corto raggio tramite Bluetooth che da remoto appoggiandosi su un server Firebase....

June 18, 2016 · 1 min

A test rule for setting device locale

When you run your Android tests (like espresso tests), you may want to be able to force the locale of your device to some specific value at runtime (during test execution). This could be really helpful if you want to test some features of your app against multiple locales. You can do this by using Junit4 rules. The rule implementation looks like this: public class ForceLocaleRule implements TestRule { private final Locale mTestLocale; private Locale mDeviceLocale; public ForceLocaleRule(Locale testLocale) { mTestLocale = testLocale; } @Override public Statement apply(Statement base, Description description) { return new Statement() { public void evaluate() throws Throwable { try { if (mTestLocale !...

May 9, 2016 · 2 min