This article will be talking about Aspect-Oriented Programming (AOP), particularly in the context of Android Applications. If you aren’t familiar with this paradigm, I’d recommend reading my previous article on the subject: Aspect-Oriented Programming in Android

Image for post
Image for post
Artistic interpretation of AOP Code being woven

Trouble in AOParadise

Recently, when updating my Aspect-Oriented Programming Android sample project, I ran into issues for every Android Gradle Plugin (AGP) release version. Frequently with AGP updates, my previous aspect plugin of choice, android-gradle-aspectj, would break and I would be unable to update AGP until the plugin itself supported the newer AGP version.

This isn’t ideal for various reasons and was made worse since some recent fixes have re-introduced older issues. Of course, since this is an open-source project, I can’t exactly blame the maintainers since it’s free software and no one is getting paid. I could potentially fix the issues myself and raise PRs every time the plugin broke with an AGP change (assuming I could understand the internals properly in the first place), but I wanted to find something that felt a little more stable. …


The standard GitHub Pages process imposes limitations on which Jekyll plugins we can use. Let’s avoid this issue using GitHub Actions instead.

GitHub Pages

For the most part and in most simple cases, the basic Jekyll deployment flow on GitHub Pages is straight-forward and you can be up-and-running in a few minutes. The basic flow of deploying on GitHub pages in simple cases is as follows:

  • Replace regular Jekyll gem with the github-pages gem in your Jekyll repository
  • Enable GitHub pages on your repository via the project’s GitHub settings menu
  • Push to the master branch of your GitHub repo

The Jekyll source code will be then be run on subsequent pushes to the master branch and automatically published to your site. Typically, this will then be available for viewing either at yourusername.github.io or yourusername.github.io/projectname …


Displaying comments on your blog using your own data source

Although it’s not new, I recently discovered Jekyll for posting articles to my own website and even creating a static release notes page for my Notification Launcher app. Jekyll-generated sites were basically what I was looking for but were missing one thing that I had wanted: user comments. This thread on the Jekyll forums has many suggestions but I found each approach lacking in some way.

  • Disqus — requires user login and also shows ads for the free version
  • Staticman — requires setting up a backend and hosting it somewhere like Heroku and also commits to the repository that your static site is hosted…


Displaying more than 3 lint results when running lint in the terminal.

When working on a project, it’s important to make sure that the code you are checking in is up-to-par with the quality expected for the project, especially as the project gets larger. This is part of the reason why linting and testing are so important and are often validated when raising Pull Requests.

This article is about a specific pain point in the linting process, so if you are unfamiliar with linting, you may want to read the Android Developer Lint Documentation or read one of the many available articles on the topic. …


As an Android developer, I find myself mirroring my physical device onto my monitor quite often. Not only does it allow me to keep my hands on my mouse and keyboard without switching back-and-forth to my phone, but it also allows me to screen-share my physical Android device to coworkers when necessary. Outside of work, I’ve also been doing so more frequently as I can browse the internet while doing mindless farming in FGO or Azur Lane.

For mirroring, I use scrcpy, which allows for displaying and controlling Android devices connected via USB and does not require the device to be rooted. …


Google Play Policy Updates and Unpublishing Statistexts

Image for post
Image for post

The Problem

About a month and a half ago (October 08, 2018), Google updated their Developer Program Policies and mentioned the updates in the a blog post. The overall gist is that Google wants to ensure users have a safe and secure experience and stop developers from potentially abusing the SMS and Call Log permissions groups. Personally, I am on the fence about these actions. …


Update January 18, 2021: The sample project has been updated to use the latest stable Android Gradle Plugin release (4.1.1). If anyone has any issues, feel free to reach out!

Aspect-Oriented Programming (AOP) is a paradigm that allows for cross-cutting concerns to be taken care of without cluttering your files with the same redundant code everywhere. This article will try to give a broad overview of why you’d want to use AOP, how it works, and then give some concrete examples of usage.

AOP in Android: The Why

Have you ever found yourself copying the same code for every time an action occurs? For instance:

  • Analytics must be tracked every time any button is…

About

JD Porterfield

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store