Android lock screen with gesture recognition
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gradle/2.4/taskArtifacts
.idea
app
build/intermediates
etc
gradle/wrapper
.gitattributes
.gitignore
README.md
SLock.iml
ScreenLock-Android-master1.iml
build.gradle
gradlew
gradlew.bat
local.properties
settings.gradle

README.md

SLock

alt tag

SLock is an open source Android lock screen with a gesture recognition algorithm implemented from scratch.

The algorithm

The task of checking if two gestures match is equivalent to checking the similarity of two sets of points. Before comparing the two sets, we normalize them; we move the sets so that the first point of each set is (0,0) and then we resize each set to fit in a predefined frame. SLock uses a simple point sets similarity measure. Let A be the set of points of the saved gesture and B the set of points of the drawn gesture to unlock the device. To measure the similarity of the two sets we use this formula:

alt tag

where:

alt tag

What we get from this formula is a measure of distance between the two sets in pixels. If this distance is above a predefined threshold then the gesture in accepted as correct.

Known issues

The app has a strange bug possibly related to the lock mechanism that disables the home button. After a few minutes of leaving the device locked (~10min) the app crashes. Anyone who fixes this bug will become a collaborator. Also the app will be uploaded to Google Play as soon as this bug is fixed.