-
Notifications
You must be signed in to change notification settings - Fork 72
Obfuscation Mode
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.
Each TransitData
implementation (each card) needs a little bit of glue to make it work with the obfuscation options.
-
Balances:
getBalance
should emit anInteger
with the balance of the card. Typically this is expressed in cents (for dollars, Euros and pounds sterling). TheCardBalanceFragment
will automatically obfuscate values as needed.Any additional balances will need to manually call out to
Utils.maybeObfuscateFare
-- seeOctopusTransitData.getInfo
for an example. -
Trips and Refills: All trips will be automatically obfuscated as needed.