Smith
Smith

Reputation: 33

Password visible using DevicePolicyManager

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.

Upvotes: 0

Views: 811

Answers (2)

Thiru
Thiru

Reputation: 526

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);

     }

Upvotes: 1

Sveinung Kval Bakken
Sveinung Kval Bakken

Reputation: 3824

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

Upvotes: 0

Related Questions