0

Here is the code which shows KeyguardManager's Credential Screen:

KeyguardManager km = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
Intent i = km.createConfirmDeviceCredentialIntent("title", "description");
startActivityForResult(i, requestCode);

which looks like this:

Screen lock

This lock screen looks really plain and does not match with the app style. The app can only set the title and description AFAIK. I want to customise this stubborn screen to match my app theme and provide some logo and stuff like that. Ideally it should get mixed with the app UI. Is there any way to do this?

Mangesh
  • 5,491
  • 5
  • 48
  • 71

1 Answers1

1

which looks like this

It looks like that on the device that you tested.

This lock screen looks really plain and does not match with the app style.

The look of that screen varies by device, based on OS version and manufacturer customizations. It will also look a bit different for PIN vs. password vs. pattern.

I want to customise this stubborn screen to match my app theme and provide some logo and stuff like that. Is there any way to do this?

No. That screen is not coming from your app.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • So in short it does not allow customisation right? In that case I would like it to :) – Mangesh Mar 14 '18 at 14:59
  • @Mangesh: "So in short it does not allow customisation right?" -- correct, other than the title and description. Whether those values show up at all varies by OS version and device model. "In that case I would like it to :)" -- I imagine that most people involved in Android security would much prefer that this screen remain consistent regardless of app. Beyond that, you have no ability to style lots of other system-supplied things (e.g., permissions dialog), and so I would be surprised if they started with this. – CommonsWare Mar 14 '18 at 15:15