For the sake of testing a feature that I don't want to release yet to the general public, I would like to implement a "secret" menu or menu item.
By "secret" I don't mean truly secret but more of a hidden or invisible menu, accessible to the developer (me) only, by entering a code or some other mechanism.
It's not the end of the world if an end-user finds about it and attempts to use it ("They made it idiot proof, but I found a workaround."). I just don't want to fail the unsuspecting innocent lay end-user, by providing a feature that isn't fully tested yet.
Any suggestions on how to go about this? (Android 2.2 and up only)
compare e.g. the Android Id of the device and if it matches your dev phone unlock the menu
let your app check if another app (some empty dummy) is installed and unlock the menu based on that info.
you can add an Activity to your code / manifest that is not triggered by any code. You can still start it via adb shell am start -n com.your.package/.SecretThing
(that activity could simply set a shared preference that unlocks the menu)
you could trigger a menu if you listen to some secret broadcast you send with adb shell am broadcast -a your.secret.broacast.ACTION_SECRET
if you have a device that has a keyboard implement a key listener that only triggers the menu if you enter some secret word (still forward key events to the system)
if your app has access to location then hide the menu if your are e.g. not at home.
add some always visible menu item that triggers a password protected screen (not a good idea but it works)
One approach I've used a couple of times is to pop up a PIN entry form when the user triple-taps a particular part of the screen. You enter the PIN, you get through to the developer screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With