Skip to content

Commit 472af14

Browse files
committed
Send heartbeat for both sim cards
1 parent db69a3f commit 472af14

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

android/app/src/main/java/com/httpsms/MainActivity.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,15 @@ class MainActivity : AppCompatActivity() {
330330
Timber.e(exception)
331331
error = exception.javaClass.simpleName
332332
}
333+
if (Settings.isDualSIM(context)) {
334+
try {
335+
HttpSmsApiService.create(context).storeHeartbeat(Settings.getSIM2PhoneNumber(context))
336+
Settings.setHeartbeatTimestampAsync(applicationContext, System.currentTimeMillis())
337+
} catch (exception: Exception) {
338+
Timber.e(exception)
339+
error = exception.javaClass.simpleName
340+
}
341+
}
333342
liveData.postValue(error)
334343
Timber.d("finished sending pulse")
335344
}.start()

0 commit comments

Comments
 (0)