Question

Am developing a sample application for some administration activities. I need to know how to make password visible using Device Policy Manager. Give me a sample code or else suggest me any ways to handle it.

Was it helpful?

Solution

Visible password can be read and write using the below piece of code: int visiblePassword = Settings.System.getInt( this.getContentResolver(), Settings.System.TEXT_SHOW_PASSWORD, 1);

     if(visiblePassword==0){
         Settings.System.putInt(
                    this.getContentResolver(),
                    Settings.System.TEXT_SHOW_PASSWORD, 1);

     }

OTHER TIPS

I'm pretty sure that would be impossible... Passwords should not be available as plain text after input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top