"you do not have a secure keyguard!" when starting saferoom demo on moto g6 emulator API 28

98 Views Asked by At

attempting to run the saferoom demo running against an emulator defined as Pie (API 28). using android studio 3.4 on a Lenovo Windows 10 Professional system. sdk for API 28 is being used.

At open the app shows the message "You do not have a secure keyguard!" as a long toast on the emulated screen.

How is this corrected?

no change to the code from Github clone.

1

There are 1 best solutions below

1
JWDurbin On

resolved by opening settings in the emulator and setting a pin number for log on to the emulator. However - each time the emulator is restarted, the settings need to be changed again. Maybe there is a way to control this in code or some setting in android studio?

What I meant by "the settings need to be changed again" was a mistake. Once set up with a pin, the emulator does retain the pin across restarts. The app itself asks for the pin. Apparently pin, password, or fingerprint must be set up through the settings app in the emulator at least once in order for the emulator to have a secure keyguard. for my app, requesting the pin at startup is a good thing.

Thanks for the question. it helped clarify things for me.