Wednesday, February 27, 2019

How To Pass User Defined Properties To Android APK

We were looking around for ways to pass additional information to our Android app at run time. Main intent behind this was, to effectively test certain flow in the app - one such example would be the In-App Purchase flow.

One way of achieving this is by setting properties via ADB and reading their values from within the app via code. This post is about documenting the steps needed to achieve this.

There are two main parts to the solution
  • Setting the properties via ADB on the command line
  • Reading the property value from within the app via code and using its value to alter the app behaviour.

Without further ado, let's look at the actual code needed to achieve both parts.

The Solution

Setting the properties via ADB is pretty straightforward and we can easily do it with one line of code as follows

Here we are setting the property "log.tag.GITIAP" to value "DEBUG"

Reading the property value from within the app via code, needs a little bit of work. Here is the full code that will let you read the property "log.tag.GITIAP".

That should do it! When you call the method "PropertyHelper.initializeProperty()" it will set the value of "gitIAPValue" to the value that was passed via ADB.


  1. Seiya Omega Cosmos apk 2 for Android. Seri mengekor seorang. best game for Saint Seiya Omega Ultimate Cosmos. Home REVIEW DAN DOWNLOAD GAME ANDROID Saint Seiya Omega. Saint Seiya Omega Ultimate Cosmo, Game Fighting Dari Serial Saint. Saya hendak sekali karena jarang rilis game offline dengan genre jenis ini. Omega sendiri adalahsekuel dari Saint Seiya sehabis peperangan di Holy Wars. Download; Extrak file "zip" nya dengan winrar/zip (kalo tidak punya pc, Saran game android Hd, keren, offline dong bang hari. - download game saint seiya omega offline.


Have some Fun!