Skip to content
Michael Farrell edited this page Nov 5, 2017 · 2 revisions

Obfuscation Mode is a feature added in Metrodroid 2.9.32.

There are five options available in the Preferences screen:

  • Hide card numbers: Hides all card numbers and serial numbers in the Metrodroid UI.

  • Obfuscate balance: This will change the balance by a small amount, and always make it positive.

  • Obfuscate dates: This will assign a trips, subscriptions, expiry dates and scan dates to a different day of the same year.

  • Obfuscate times: This will reduce the resolution of travel timestamps, and then randomly change it by a few hours.

  • Obfuscate fares: This will change a fare by a random amount.

These are useful for when taking screenshots of Metrodroid that are to be shared with the general public, or for doing live demos.

Implementing support for obfuscation modes

Each TransitData implementation (each card) needs a little bit of glue to make it work with the obfuscation options.

  • Balances: getBalance should emit an Integer with the balance of the card. Typically this is expressed in cents (for dollars, Euros and pounds sterling). The CardBalanceFragment will automatically obfuscate values as needed.

    Any additional balances will need to manually call out to Utils.maybeObfuscateFare -- see OctopusTransitData.getInfo for an example.

  • Trips and Refills: All trips will be automatically obfuscated as needed.

Clone this wiki locally