Throwback Android Developer Google Group

    Out of the blue, I remember that I was in a Google Group community of Filipino Android developers back in 2011-ish. After some quick Googling, I found the group. This was in 2011? Wow. I am surprised the link is still alive, knowing Google’s history of shutting down things. Yeah, the post feels kinda lonely. There weren’t that many Android developers in my area back then. At this point in time I am not even entirely sure if I could make a living out of this profession.

    Read More

    Underwhelming Google I/O 2023

    After watching half of the Google I/O Keynote, I had to close the video because it was starting to bore me. There was no excitement for me, AI/ML is a topic I am not interested in. I took notes of the keynote while watching, and I just wanted to publish it here for keepsake purposes. Google IO 2023 Notes Keynote So many AI/ML keynotes and features. Not interested. Bard? Does not interest me.

    Read More

    Jetpack Compose Journey Part 1

    This will be my first time delving into Jetpack Compose for a rewrite of our existing app. I believe I have no time to study or do a full Google code lab for this one, due to the constraints of the timeline and deadline. So I will have to go head first and rely on my > 11 years of experience. Setup So with every new Android project, I created one.

    Read More

    Google I/O 2023

    It’s that time of the year. I’m surprised that Google announced the event this early.

    My first contribution to Google/Android

    I just had my first GitHub contribution to Android/Google merged into their codebase. I have never thought of taking my free time to contribute to open source in my over > 11 YOE. 1 lawgimenez/agp-v7.4.1 It’s not much of a contribution though, it’s just an update to the latest Android Gradle plugin. But nevertheless, I contributed and I’m proud of myself.

    Leftover Android Studios

    Thanks to this Reddit post, I just found out that you could remove unused Android Studio cache or leftover versions. I saved around ~4GB of storage.

    Updating old Android codebase

    An old client of mine contacted me to fix some bugs and the tricky part was that I have to update an Android codebase that hasn’t been updated in 3 years. I have updated from v3.6.4 to v4.2.2. And from v4.2.2 to v7.3.1. This is how old the codebase is.

    Android Studio Render Problem

    If you encounter a Render Problem issue on your Android Studio, like the one below. The solution I came up with is to use the Material Styles as your app theme. 1 2 <style name="AppTheme" parent="@style/Theme.Material3.Light"> </style>

    BuildException Error

    Updated last night to the latest Android Studio Dolphin build but encountered this annoying build error from the JetBrains IDE. Invalidating cache and restarting seems to not work. Jetbrains seems to be clueless too. This bug has already taken much of my time. This is annoying. Edit: September 17 at 9:14PM It seems that the error went away after declining the “standalone script” option in Android Studio.

    Mixpanel Code Refactor

    Our app uses Mixpanel for analytical and strategic purposes. This post is about my refactoring journey. Mixpanel introduced another parameter in their getInstance() method called trackAutomaticEvents which is of a boolean data type. Now, this is the part that I didn’t anticipate because located throughout our codebase is this single line. 1 MixpanelAPI.getInstance(this, Constants.MIXPANEL_TOKEN).track("Log In") But right now it is broken since the proper way to implement on the new version is this.

    Read More

    My First Professional Android Project

    I found my first “professional” Android project while backing up data from my old laptop. I called it a “birthday reminder” and this project was the one I demoed to the company I sent my application to. Now, I am unsure if I got the gig because the Android team lead was amazed by the project I demoed or because I am the only applicant. Yes, I was the only applicant for the job interview.

    Read More

    Compiling Android on the Command Line

    First of all, I am on Manjaro Xfce environment for this example. We need to install Gradle. I tried to install Gradle using ArchLinux’s pacman but it was very outdated. So based on Gradle’s installation guide one option is to use a package manager like Sdkman. Let’s go ahead and install SDKMAN!. 1 2 curl -s "" | bash source "$HOME/.sdkman/bin/" After running SDKMAN!, close the current terminal and open a new one.

    Read More

    Legacy Projects Part 1

    Development Date: Last Quarter 2012 This was one of my app ideas back in 2012 where users can save important notes. I developed this using Eclipse IDE with Android SDK. And the screenshots are from Google’s Nexus 7, still their best device.

    Flutter Development Reaction Part 1

    I spent majority of my mobile development career on native app development, mainly Kotlin and Swift. And this is my perspective on using Flutter for the first time. I have only seen small code snippets and that’s it. This is my first time logging into Flutter’s official site. I Googled Flutter. And first thing came up is Flutter - Build apps for any screen. And I have to double check, why .

    Read More

    Migrate Android build configuration from Groovy to Kotlin

    Here are the steps I did when I migrated our Android build to Kotlin. Long story short, the reasons for migration is the syntax highlighting and built-in support with Android Studio. I searched for all single quotes and replaced them with double quotes. Migrate to function invocations in Kotlin syntax. As you noticed the parenthesis. Rename file settings.gradle to settings.gradle.kts Inside settings.gradle.kts, refactor code from include ':app' rootProject.

    Read More

    Postmortem: ProGuard is annoying

    This morning I received several crash reports from last night's release. I wasn't able to replicate this crash on my debug environment. So this should be a production-only crash. The first thing that came to my mind while I read the crash report is that this is a Proguard issue. The crash was happening in this class import android.content.SharedPreferences import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider class OnlineJobsViewModelFactory(val sharedPreferences: SharedPreferences) : ViewModelProvider.Factory { override fun <T : ViewModel> create(modelClass: Class<T>): T { return modelClass.

    Read More

    Thank you Android!

    I just finished reading Androids by Chet Haase, about the development journey of the Android platform towards the 1.0 release. First of all, this book is important to me. Besides that I am currently an Android developer myself but because I started my passion in professional programming as an Android developer back in 2011. Technically I started as a PHP programmer but I hated it back then. Look, I am not in Silicon Valley or the USA, I am in a small city in the Philippines where doctors and engineers are more prestigious than programmers.

    Read More

    Realm Kotlin Tutorial

    First things first, make sure you followed the official Realm tutorial on how to install it on your Android project. Here's how I implemented it on my Android project using Kotlin. After installation, initialize the Realm instance on your Application class or your launcher Activity. import import io.realm.Realm class MyApplication : Application() { override fun onCreate() { super.onCreate() Realm.init(this) } } Create your Realm object by extending the RealmObject class.

    Read More

    Call Multiple APIs using Coroutines

    Every time my app starts, I need to call 2-3 URL endpoints to get the latest data from the API. Every app encounters this scenario one way or another. I need to know when each API call finishes so that I can prompt the user a Snackbar or dialog to indicate that I already got the latest data. And more importantly, I made sure that calling the function 2-3 times won't block the main thread.

    Read More

    Bluetooth printer scanning using Kotlin

    One of the requirements of my current project is to be able to establish Bluetooth connection and send texts to print. See the video below for the result. Let's create an empty Android project and let's call it BluetoothPrintingSample. Then, create a layout folder inside res folder. Let's create a simple layout called activity_print.xml. <RelativeLayout xmlns:android="" xmlns:tools="" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingStart="44dp" android:paddingEnd="44dp" android:background="@color/design_default_color_secondary" > <EditText android:id="@+id/editTextPrintMessage" android:layout_width="match_parent" android:layout_height="200dp" android:singleLine="false" android:background="@android:color/white" android:textColor="

    Read More

    Pass list of objects in Intent using Kotlin

    Every Android developer is familiar with passing data between Activities using Bundle. The old Java way was to implement Parcelable class and then you override all the required methods. See example below. You can read more of the details here. public class MyParcelable implements Parcelable { private int mData; public int describeContents() { return 0; } public void writeToParcel(Parcel out, int flags) { out.writeInt(mData); } public static final Parcelable.Creator<MyParcelable> CREATOR = new Parcelable.

    Read More

    Bintray Shutting Down

    Next month, JFrog will shut down JCenter and Bintray and my experience with their service will go along with them. Before Gradle, and all this new Android artifacts/dependencies repositories, Bintray was the most popular back in 2015. During that year, I was able to publish an Android package called Networking Valley, it's still open source to this day. I called it Networking Valley to pay homage to a popular mobile game called Monumental Valley.

    Read More

    2020 Was a Mixed Year

    Mixed year because as good as the metrics are compared to last year, it saddens me that a huge number of people are laid off and companies closed because of Covid-19. Hopefully 2021 will be different. Here's a sneak peek of the app metrics during lockdown. In terms of number of installations, active devices and overall metrics, experienced significant gains throughout the year 2020. I rewrote the app, from React Native to Swift, back in January 2020 and released the new version a month after.

    Read More