Fixing Dependency Conflict In OneSignal Android

Whilst following OneSignal’s setup guide for their Android SDK, everything went smoothly until attempting to run the build past our CI (continuous integration) server, CircleCI. I’ve encountered various issues when using custom build flavours with OneSignal before, and expect that was the cause of this issue too.

The build failed, due to the following exception:

Execution failed for task ':app:preCustomflavourQaAndroidTestBuild'.
> Conflict with dependency '' in project ':app'. Resolved versions for app (17.0.0) and test app (12.0.1) differ. See for details.

Continue reading →

Developing Android Apps With Firebase Cloud Firestore

Cloud Firestore provides an app an invisibly syncing cloud database. This takes away a lot of the complexity of ensuring data is up to date, and has very simple methods for creating, retrieving, updating, and deleting data. It also allows syncing between multiple clients, and managing the database via a web interface or an API.

Note that this service is in beta, and is intended to replace the existing Cloud Datastore. Google provides a full comparison to aid in choosing the most appropriate service.

Continue reading →

Reducing The Size Of TextView DrawableStart / DrawableEnds Using Styles

Using image files or SVGs at the start / end of a TextView can be an easy way to add icons to menu items, or indicators that clicking the TextView will trigger an action. That being said, it can be tricky to position the drawable correctly, and it may not be possible to easily resize it (especially if it was created by someone else).

Luckily, there is a partial workaround.

Continue reading →

Displaying a “Power Saving Enabled” Bar Inside Your Android App

If your app uses Android hardware features or otherwise needs to be running most of the time, tools such as power saving mode can limit your app’s freedom. Whilst the mode is great for users, the inconsistent implementation (much better now that Doze mode exists, and power saving is more standardised) often leads to unreliable performance on certain devices. Making users aware of this can prevent giving users a negative impression of your app.

In this tutorial, a simple animated “Power saving mode enabled” bar will be displayed inside the app whilst there any power saving mode is enabled, and disappear when it is disabled. An example power saving bar project is available, as well as a video of the finished implementation.

Continue reading →

Displaying a “No Internet” Bar Inside Your Android App

Whilst developing an app, you’re likely to have a strong, reliable data connection at all times. In the real world however, users often will be without connectivity, and your app should react appropriately.

In this tutorial, a simple animated “No internet is available” bar will be displayed inside the app whilst there is no internet, and disappear when connectivity returns. An example no internet bar project is available, as well as a video of the finished implementation.

Continue reading →

Brute Forcing A Forgotten Keystore Password Using Hashcat

Recently, I was preparing an update to a long abandoned Android app of mine when I realised the password to the keystore was long forgotten. A keystore and associated password is essential for updating an app (more information on keystores is available in easy to understand LEGO form), and as such the app could never be updated again!

Luckily, it’s possible to crack the password to a keystore.

Continue reading →

Developing Android Apps With Firebase Authentication

Firebase Authentication provides an app with the ability to handle user registration, user logging in, and retrieving user data. It has the ability to integrate with phone-based authentication as well as common services such as Facebook, Twitter, and Github. This tutorial will cover the simplest integrations, email and Google account.

Continue reading →