Author name: Catalin Prata

Born in Alba Iulia, a beautiful city from Romania. I like hiking and everything related with electronics and IT . Eager to learn and enhance my knowledge in programming languages. My main specialization is on Mobile Applications development (Android and iOS).

Privacy Policy

Android Studio / IntelliJ IDEA productivity guide

Android Studio and productivity One interesting feature that Android Studio and IntelliJ IDEA have is the Productivity Guide panel. It helps you see how much of the productivity tools that are available and you are using. You can see here a quick screenshot with the one I have, on one of the computers I am […]

, ,
Articles, Solutions

Print Android instrumentation tests logs in the terminal/console

While debugging some Android instrumentation tests that were ran using adb shell am instrument, I needed to print some logs into the terminal/console to inspect the flow and resolve some issues. Ever been coding away, trying to track down what’s happening under the hood, thinking Log.i/e/d or System.out would be your trusty sidekicks for logging

, , , ,
Snippets, Solutions

How to get current flavor from gradle

 Figuring out how to pull the current flavor from gradle While working on an update for one of our games, I needed to figure out how to get the current flavor and use it in code. Since there are a lot of ways to do this, I chose to create a custom build config parameter and

, , ,
Did You Know?, Solutions

Signing key SHA1 fingerprints within AndroidStudio

Did you know you can get the signing SHA1 and MD5 fingerprints within AndroidStudio? Ever needed the SHA1, SHA-256 or MD5 fingerprints of your Android debug/release key/certificate? Maybe for a new API or framework that you want to integrate in your project like Firebase, Facebook or Maps? See that you can also get it from AndroidStudio, pretty

, , , , , ,
Snippets

Generate random number between 2 numbers

The following snippet will help you generate a random number in Java that is between 2 numbers (min and max). static Random random = new Random(); /** * Min is inclusive and max is exclusive in this case **/ public static int randomBetween(int min, int max) { return random.nextInt(max – min) + min; } Please

, ,
Snippets

Get screen size programatically in Android

So if you ever need to get the screen size(width and height) programatically on Android, note that there are a few options out there. Please see below some of them. Get Android screen size from DisplayMetrics The following snippet helps you load the screen size in Android using the Display class. This is quite old,

, , , , , ,
Solutions, Tutorial

Google Play Games API + Playground

The Problem… So I wanted to reset my score on one of my google play games here(QuickAZ) and for that I could use Google Play Games API if the user was registered as a tester in the play console. In order to easily authenticate to the service and test the API I used Google’s Playground. The only

, , ,
Solutions, Tutorial

Load localized strings at runtime

Here is a possible solution if you want to load localized text resources on a TextView in Android. Problem: You may need to extend your app flexibility to be able to load localized texts at runtime from a web server for example. That would be to be able to add new localizations (for new countries)

, , , , , , , ,
Snippets, Solutions

How to unzip Gzipped InputStream

If you are working with HttpURLConnection on Android then you might encounter strange InputStream outputs like when you have a strange character encoding even though on the server side everything seems ok. A problem I was encountered lately was when I needed to parse a RSS/Atom feed on Android. I was getting the following error:

, , , ,
Scroll to Top