diff --git a/.gradle/8.7/executionHistory/executionHistory.bin b/.gradle/8.7/executionHistory/executionHistory.bin index 46b47ed..c8b98a8 100644 Binary files a/.gradle/8.7/executionHistory/executionHistory.bin and b/.gradle/8.7/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.7/executionHistory/executionHistory.lock b/.gradle/8.7/executionHistory/executionHistory.lock index 19a339c..a06e8c1 100644 Binary files a/.gradle/8.7/executionHistory/executionHistory.lock and b/.gradle/8.7/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.7/fileHashes/fileHashes.bin b/.gradle/8.7/fileHashes/fileHashes.bin index 6a4bc6d..7ec4c8d 100644 Binary files a/.gradle/8.7/fileHashes/fileHashes.bin and b/.gradle/8.7/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.7/fileHashes/fileHashes.lock b/.gradle/8.7/fileHashes/fileHashes.lock index 0f9f60d..f6d0509 100644 Binary files a/.gradle/8.7/fileHashes/fileHashes.lock and b/.gradle/8.7/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.7/fileHashes/resourceHashesCache.bin b/.gradle/8.7/fileHashes/resourceHashesCache.bin index f6e55da..4bbcc3e 100644 Binary files a/.gradle/8.7/fileHashes/resourceHashesCache.bin and b/.gradle/8.7/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index f45fa7f..fa3f199 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/app/build/intermediates/apk/debug/app-debug.apk b/app/build/intermediates/apk/debug/app-debug.apk index faeac26..0cca610 100644 Binary files a/app/build/intermediates/apk/debug/app-debug.apk and b/app/build/intermediates/apk/debug/app-debug.apk differ diff --git a/app/build/intermediates/dex/debug/mergeProjectDexDebug/12/classes.dex b/app/build/intermediates/dex/debug/mergeProjectDexDebug/12/classes.dex index a92fc52..c69b685 100644 Binary files a/app/build/intermediates/dex/debug/mergeProjectDexDebug/12/classes.dex and b/app/build/intermediates/dex/debug/mergeProjectDexDebug/12/classes.dex differ diff --git a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt index 3add9a7..94d2fb0 100644 --- a/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt +++ b/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt @@ -1,4 +1,4 @@ -#Thu May 14 20:19:47 EET 2026 +#Thu May 14 20:41:24 EET 2026 base.0=/Users/hamzaaleghwairyeen/development/App/jordan_bot/app/build/intermediates/dex/debug/mergeExtDexDebug/classes.dex base.1=/Users/hamzaaleghwairyeen/development/App/jordan_bot/app/build/intermediates/dex/debug/mergeProjectDexDebug/0/classes.dex base.2=/Users/hamzaaleghwairyeen/development/App/jordan_bot/app/build/intermediates/dex/debug/mergeProjectDexDebug/12/classes.dex diff --git a/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.dex b/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.dex index 6007c93..fe42e51 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.dex and b/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.dex differ diff --git a/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener.dex b/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener.dex index c5a1bff..69c6f23 100644 Binary files a/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener.dex and b/app/build/intermediates/project_dex_archive/debug/dexBuilderDebug/out/com/jordanbot/autoride/service/RideNotificationListener.dex differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab index 32c008c..67f486e 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at index 33613c1..cbe4997 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab index b1021b2..609cd2e 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at index b9b5f4b..ea00ff6 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab index 946d996..aa6d2ce 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at index 886abe4..12fae93 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab index 1eb3fb6..857a75f 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at index 3be7746..0c57874 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab index 077b2e0..e12b2d0 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at index 4f3f303..d500473 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab index 9f2fdc7..2ea8cff 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at index 0355c5d..1ead97c 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab index 53bc051..200b190 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at index 385dd35..ddf3daf 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab index c0da981..a258af5 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at index 5cbaeb4..e85706d 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab index 703ad20..4eb9e7b 100644 --- a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +++ b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab @@ -1,2 +1,2 @@ -29 +30 0 \ No newline at end of file diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab index dbefd51..a052244 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at index b70d3ef..ac19456 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab index b3b035e..52d8cc3 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream index fa194ba..a40e358 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len index a930d6b..19f7832 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len index fa43224..575d132 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at index 397e9d6..bfc9edc 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i index 20619a7..474fdca 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab index 35e2eb5..2f60bad 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values index 8fe1680..1e287b7 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at index 6570b67..79af247 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at and b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at differ diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s index 10adf52..d4879d9 100644 --- a/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +++ b/app/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s @@ -1 +1 @@ -Á·χýº˺Òœ \ No newline at end of file +Á·χýº˺Ҝච\ No newline at end of file diff --git a/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin b/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin index 252af55..ed0ad5e 100644 Binary files a/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin and b/app/build/kotlin/compileDebugKotlin/cacheable/last-build.bin differ diff --git a/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin b/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin index a0ee294..4e5f39f 100644 Binary files a/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin and b/app/build/kotlin/compileDebugKotlin/local-state/build-history.bin differ diff --git a/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.class b/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.class index 3c3f4ab..6f07d42 100644 Binary files a/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.class and b/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener$sendLogToBackend$1.class differ diff --git a/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener.class b/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener.class index 67537a2..96a426b 100644 Binary files a/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener.class and b/app/build/tmp/kotlin-classes/debug/com/jordanbot/autoride/service/RideNotificationListener.class differ diff --git a/app/src/main/java/com/jordanbot/autoride/api/BackendApi.kt b/app/src/main/java/com/jordanbot/autoride/api/BackendApi.kt index 0b2a259..f2c67c5 100644 --- a/app/src/main/java/com/jordanbot/autoride/api/BackendApi.kt +++ b/app/src/main/java/com/jordanbot/autoride/api/BackendApi.kt @@ -12,6 +12,8 @@ data class RideLogRequest( val pickupDistance: String, val dropoffDistance: String, val timeToPickup: String, + val pickupAddress: String, + val dropoffAddress: String, val isAccepted: Boolean, val rawText: String, val fingerprint: String, diff --git a/app/src/main/java/com/jordanbot/autoride/model/RideRequest.kt b/app/src/main/java/com/jordanbot/autoride/model/RideRequest.kt index 66509a0..e7306fa 100644 --- a/app/src/main/java/com/jordanbot/autoride/model/RideRequest.kt +++ b/app/src/main/java/com/jordanbot/autoride/model/RideRequest.kt @@ -5,6 +5,8 @@ data class RideRequest( val priceJod: Double?, val minutesAway: Int?, val distanceKm: Double?, + val pickupAddress: String? = null, + val dropoffAddress: String? = null, val title: String, val text: String ) diff --git a/app/src/main/java/com/jordanbot/autoride/parser/UberParser.kt b/app/src/main/java/com/jordanbot/autoride/parser/UberParser.kt index 82ca71a..10d8a6c 100644 --- a/app/src/main/java/com/jordanbot/autoride/parser/UberParser.kt +++ b/app/src/main/java/com/jordanbot/autoride/parser/UberParser.kt @@ -12,10 +12,16 @@ class UberParser : NotificationParser { var price: Double? = null var minutes: Int? = null var distance: Double? = null + var pickupAddress: String? = null + var dropoffAddress: String? = null val priceRegex = """(\d+\.?\d*)\s*(JOD|د\.Ø£)""".toRegex() val minutesRegex = """(\d+)\s*(min|دقيقة)""".toRegex() val distanceRegex = """(\d+\.?\d*)\s*(km|كم)""".toRegex() + + // Patterns for addresses (e.g. "Pick up: Amman", "Drop-off: Irbid") + val pickupAddrRegex = """(?:Pick up|من|صعود):\s*([^•\d,]+)""".toRegex(RegexOption.IGNORE_CASE) + val dropoffAddrRegex = """(?:Drop-off|إلى|نزول):\s*([^•\d,]+)""".toRegex(RegexOption.IGNORE_CASE) val fullText = "$title $text" @@ -31,11 +37,21 @@ class UberParser : NotificationParser { distance = it.groupValues[1].toDoubleOrNull() } + pickupAddrRegex.find(fullText)?.let { + pickupAddress = it.groupValues[1].trim() + } + + dropoffAddrRegex.find(fullText)?.let { + dropoffAddress = it.groupValues[1].trim() + } + return RideRequest( appPackage = packageName, priceJod = price, minutesAway = minutes, distanceKm = distance, + pickupAddress = pickupAddress, + dropoffAddress = dropoffAddress, title = title, text = text ) diff --git a/app/src/main/java/com/jordanbot/autoride/service/RideNotificationListener.kt b/app/src/main/java/com/jordanbot/autoride/service/RideNotificationListener.kt index b491054..7cd1a9b 100644 --- a/app/src/main/java/com/jordanbot/autoride/service/RideNotificationListener.kt +++ b/app/src/main/java/com/jordanbot/autoride/service/RideNotificationListener.kt @@ -49,6 +49,12 @@ class RideNotificationListener : NotificationListenerService() { override fun onNotificationPosted(sbn: StatusBarNotification) { var packageName = sbn.packageName Log.d("JordanBot", "Received notification from: $packageName") + + // TEMPORARY: Allow Shell notifications for testing + if (packageName == "com.android.shell") { + Log.d("JordanBot", "Testing mode: Treating Shell notification as Uber") + packageName = "com.ubercab.driver" + } val parser = parsers.find { it.packageName == packageName } if (parser == null) { @@ -109,6 +115,8 @@ class RideNotificationListener : NotificationListenerService() { pickupDistance = ride.distanceKm?.toString() ?: "Unknown", dropoffDistance = "Unknown", timeToPickup = ride.minutesAway?.toString() ?: "Unknown", + pickupAddress = ride.pickupAddress ?: "Unknown", + dropoffAddress = ride.dropoffAddress ?: "Unknown", isAccepted = isAccepted, rawText = rawText, fingerprint = DeviceUtils.getDeviceFingerprint(this@RideNotificationListener), diff --git a/backend/api/rides.php b/backend/api/rides.php index 4e13eb9..0bda65b 100644 --- a/backend/api/rides.php +++ b/backend/api/rides.php @@ -46,6 +46,8 @@ $price = $input['price'] ?? 0.0; $pickupDistance = $input['pickupDistance'] ?? 'Unknown'; $dropoffDistance = $input['dropoffDistance'] ?? 'Unknown'; $timeToPickup = $input['timeToPickup'] ?? 'Unknown'; +$pickupAddress = $input['pickupAddress'] ?? 'Unknown'; +$dropoffAddress = $input['dropoffAddress'] ?? 'Unknown'; $isAccepted = isset($input['isAccepted']) ? (int)$input['isAccepted'] : 0; $rawText = $input['rawText'] ?? ''; $fingerprint = $input['fingerprint'] ?? 'UNKNOWN_DEVICE'; @@ -53,8 +55,8 @@ $latitude = $input['latitude'] ?? null; $longitude = $input['longitude'] ?? null; try { - $sql = "INSERT INTO rides (fingerprint, platform, price, pickup_distance, dropoff_distance, time_to_pickup, is_accepted, raw_text, latitude, longitude, created_at) - VALUES (:fingerprint, :platform, :price, :pickup_distance, :dropoff_distance, :time_to_pickup, :is_accepted, :raw_text, :latitude, :longitude, NOW())"; + $sql = "INSERT INTO rides (fingerprint, platform, price, pickup_distance, dropoff_distance, time_to_pickup, pickup_address, dropoff_address, is_accepted, raw_text, latitude, longitude, created_at) + VALUES (:fingerprint, :platform, :price, :pickup_distance, :dropoff_distance, :time_to_pickup, :pickup_address, :dropoff_address, :is_accepted, :raw_text, :latitude, :longitude, NOW())"; $stmt = $pdo->prepare($sql); $stmt->execute([ @@ -64,6 +66,8 @@ try { ':pickup_distance' => $pickupDistance, ':dropoff_distance' => $dropoffDistance, ':time_to_pickup' => $timeToPickup, + ':pickup_address' => $pickupAddress, + ':dropoff_address' => $dropoffAddress, ':is_accepted' => $isAccepted, ':raw_text' => $rawText, ':latitude' => $latitude, diff --git a/backend/schema.sql b/backend/schema.sql index 842a624..0819329 100644 --- a/backend/schema.sql +++ b/backend/schema.sql @@ -12,6 +12,8 @@ CREATE TABLE IF NOT EXISTS rides ( pickup_distance VARCHAR(50), dropoff_distance VARCHAR(50), time_to_pickup VARCHAR(50), + pickup_address VARCHAR(255), + dropoff_address VARCHAR(255), is_accepted TINYINT(1) DEFAULT 0, raw_text TEXT, latitude DOUBLE DEFAULT NULL, diff --git a/test_notifications.sh b/test_notifications.sh index 1bbcf95..557ac91 100755 --- a/test_notifications.sh +++ b/test_notifications.sh @@ -5,7 +5,7 @@ adb devices echo "إرسال إشعار أوبر تجريبي..." # Uber mock notification -adb shell cmd notification post -t "Uber" -S "bigtext" "1.50 JOD" "Pick up: 2 min, 0.5 km. Drop-off: 10 min. 1.50 JOD. Cash" com.ubercab.driver +adb shell cmd notification post -t "Uber" -S "bigtext" "1.50 JOD" "Pick up: Abdoun, 2 min, 0.5 km. Drop-off: 7th Circle. 1.50 JOD. Cash" com.ubercab.driver sleep 2