Răsfoiți Sursa

Add logging

Thomas Dy 7 ani în urmă
părinte
comite
6a83af7f40
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      src/main/kotlin/SendService.kt

+ 2 - 0
src/main/kotlin/SendService.kt

@@ -7,6 +7,7 @@ import android.content.Context
 import android.content.Intent
 import android.content.SharedPreferences
 import android.telephony.SmsManager
+import android.util.Log
 
 class SendService : IntentService("SendService") {
 
@@ -28,6 +29,7 @@ class SendService : IntentService("SendService") {
 
   override fun onHandleIntent(intent: Intent) {
     if(intent.action == ACTION_SEND) {
+      Log.i("SendService", "Sending request")
       val smsManager = SmsManager.getDefault()
       smsManager.sendTextMessage("5554", null, "GS99", null, null)
       sharedPreferences.edit().putLong("last_requested", System.currentTimeMillis()).commit()