Skip to content

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API

Don't send heartbeats if the user is not logged in

Acho Arnoldc25b8a42cbd4
diff --git a/android/app/src/main/java/com/httpsms/Settings.kt b/android/app/src/main/java/com/httpsms/Settings.kt
index 8a01a5bd..d3825176 100644
--- a/android/app/src/main/java/com/httpsms/Settings.kt
+++ b/android/app/src/main/java/com/httpsms/Settings.kt
@@ -27,7 +27,7 @@ object Settings {
.getString(this.SETTINGS_SIM1_PHONE_NUMBER, null)
if (owner == null) {
- Timber.e("cannot get owner from preference [${this.SETTINGS_SIM1_PHONE_NUMBER}]")
+ Timber.i("cannot get owner from preference [${this.SETTINGS_SIM1_PHONE_NUMBER}]")
return ""
}
@@ -43,7 +43,7 @@ object Settings {
.getString(this.SETTINGS_SIM2_PHONE_NUMBER, null)
if (owner == null) {
- Timber.d("cannot get owner from preference [${this.SETTINGS_SIM2_PHONE_NUMBER}]")
+ Timber.i("cannot get owner from preference [${this.SETTINGS_SIM2_PHONE_NUMBER}]")
return ""
}
@@ -158,7 +158,7 @@ object Settings {
}
fun isLoggedIn(context: Context): Boolean {
- return getApiKey(context) != null
+ return getApiKey(context) != null && hasOwner(context)
}
fun isDualSIM(context: Context): Boolean {