Skip to content
/ pincode Public

Example of adding pincode protection to Android APP when launching or resume.

Notifications You must be signed in to change notification settings

q1yh/pincode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Android APP Pincode

Here is an example of add pincode protection to Android APP when launching or resume an activity, in case where certain privacy protection is need for some APPs and the access of their contents.

  • Static pincode setting:

The 4-digits pincode needs to be preset statically in resource, ex: res/values/strings.xml.

  • Call pincode interface:

The pincode interface could be called under onCreate() or onResume() function of the calling activity.

startActivity(new Intent(this, PinCodeActivity.class));
  • Pincode session timeout:

The last successfully pincode verification time is recorded under key "lastPassVeriTime" of SharedPreference.

SharedPreferences.getLong("lastPassVeriTime",0);

By comparing the now and last verified time, the pincode session timeout could be archieved easily.

About

Example of adding pincode protection to Android APP when launching or resume.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages