From 63259cbb58a54fccc84af9b431239333f466dbd0 Mon Sep 17 00:00:00 2001 From: keepalivedev Date: Wed, 31 Jul 2024 07:59:32 -0500 Subject: [PATCH 1/2] add strings --- app/src/main/res/values/strings.xml | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 46e8873..6ea8124 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -10,12 +10,57 @@ Delete Close Cancel + Confirm Back Go to Settings Enabled Disabled PLACEHOLDER TEXT + + GET + POST + Webhook URL + HTTP Method + Verify Certificate + Timeout (seconds) + Retries + Include Location in Request? + Headers + Add Header + Remove Header + Test Webhook + Maximum number of headers reached (%1$s) + Webhook Configuration + When an Alert is triggered an HTTP request will be sent using the settings below. By default, no other data is included in the request. If enabled, location data is sent in the following format {"lat": 0.0, "lon": 0.0, "acc": 0.0, "address": "address"}. + Not Configured + Do Not Include + Body - JSON + Body - Form + Query Parameters + Please enter a webhook URL + URL Invalid + URL Invalid: %1$s + Invalid timeout value + Invalid retries value + Maximum timeout is %1$s + Maximum retries is %1$s + Name + Value + Name cannot be blank + Max Name length is %1$s + Max Value length is %1$s + Name has invalid characters + Value has invalid characters + Success! Response code was %1$d + Failed! Response code was %1$d + Failed! Error was %1$s + Webhook Successful! + Request sent to %1$d + Webhook Failed! + Return status code was %1$d + Error: %1$s + Settings About @@ -75,10 +120,12 @@ Alert Notifications SMS Sent Notifications Call Sent Notifications + Webhook Sent Notifications Alert Service Notifications Are you there? Prompts Sent when an SMS alert is triggered Sent when an Phone Call alert is triggered + Sent when a Webhook alert is triggered Displayed while sending an Alert Glad to see you are still alive! Cancelling Alert. Are you still there? @@ -142,6 +189,8 @@ Hey I may be dead, if I do not contact you in the next 24 hours, you know what to do. Add Emergency Contact Edit Emergency Contact + Alert Webhook + Webhook URL Monitoring Method @@ -315,5 +364,22 @@ App is disabled? Exception in BootBroadcastReceiver: %1$s + + Webhook configuration saved + Webhook configuration deleted + Error loading webhook configuration + + + Disabling webhook certificate verification! + Request successful with code: %1$d + Request failed with code: %1$d + Request failed with code %1$d, not retrying. + Unknown Exception while sending webhook: %1$s + IOException while sending webhook: %1$s + Attempt #%1$d + Failed sending webhook, max retries exceeded + Sending request to: %1$s. Location is %2$s + Error testing webhook: %1$s + Failed while sending webhook: %1$s From 056057eb476ea1ff4e4190221abb9c53aadb907e Mon Sep 17 00:00:00 2001 From: keepalivedev Date: Wed, 31 Jul 2024 08:01:13 -0500 Subject: [PATCH 2/2] minor fix --- app/src/main/java/io/keepalive/android/LocationHelperBase.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/keepalive/android/LocationHelperBase.kt b/app/src/main/java/io/keepalive/android/LocationHelperBase.kt index a4b8401..c42a868 100644 --- a/app/src/main/java/io/keepalive/android/LocationHelperBase.kt +++ b/app/src/main/java/io/keepalive/android/LocationHelperBase.kt @@ -43,8 +43,8 @@ open class LocationHelperBase( // how long to wait for everything to complete before timing out private val globalTimeoutLength = 61000L - // background executor to be used with location requests - private val backgroundExecutor: Executor = Executors.newSingleThreadExecutor() + // background executor to be used with fDroid location requests and the callback + val backgroundExecutor: Executor = Executors.newSingleThreadExecutor() // background handler to be used with timeout handlers here and in fDroid version val backgroundHandler = Handler(HandlerThread("LocationBackgroundThread").apply { start() }.looper)