Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Signal bypassed when sending SMS messages via SmsManager (API call)

Open marcopaganini opened this issue 9 years ago • 8 comments

I have:

  • [x] searched open and closed issues for duplicates
  • [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports

Bug description

SMS messages sent using the SmsManager API call end up being sent by the "Messenger" android app instead of Signal. Signal is correctly configured to be the default app for SMS and is able to send and receive SMSes normally under regular operation.

I noticed this behavior when using the android Join app. This app sends SMSes on my behalf using the aforementioned SmsManager API call.

For testing purposes, I temporarily installed Chomp SMS and configured it to become the default SMS app. Under this configuration, SMSes sent by Join (via SmsManager) are correctly sent by Chomp SMS, not messenger. This seems to exclude Join (or the SmsManager call) as the source of the problem.

Steps to reproduce

  • Install Signal and allow it to become the default SMS app.
  • Install Join.
  • Configure join for computer integration.
  • Send an SMS from the computer (the message path will be: computer -> join app (using SmsManager) -> Default SMS app).

Actual result: The SMS message sent from the computer appears in the Android's "messenger" app history, not on Signal's history.

Expected result: Sent SMSes should be sent by Signal and appear in Signal's history.

Device info

Device: Nexus 6 Android version: 7.1.1 Signal version: 3.27.1

marcopaganini avatar Jan 24 '17 03:01 marcopaganini

I don't think any app gets any notification of an SMS being sent. I assume the app you're using is sending the message and then inserting it into the system SMS database, which is visible from Chomp or Messenger or whatever. Signal doesn't use the system SMS database, so it's not visible in Signal. IIRC there's a duplicate issue for this somewhere in here.

moxie0 avatar Jan 24 '17 18:01 moxie0

Possibly related: #5803 #218 #4037

mawed avatar Jan 24 '17 18:01 mawed

This is interesting. I spoke with Join developer and he said basically the only thing he does is to use SmsManager to send an SMS. Perhaps this call inserts the SMS in the database? Is there a way to know if Signal was used to send a message? If signal is used to send the message, why isn't it adding the outgoing SMS to its history?

marcopaganini avatar Jan 24 '17 18:01 marcopaganini

SmsManager does not insert the SMS into the system SMS database. If there's a callback an app can receive to be told about an outgoing SMS, I don't think I know about it.

moxie0 avatar Jan 24 '17 20:01 moxie0

Is it possible to turn on some kind of logging in Signal to tell if it's sending the outgoing messages or not?

marcopaganini avatar Jan 24 '17 20:01 marcopaganini

@marcopaganini I'm not sure what you mean. If someone is using the SmsManager API, no "app" is "sending" the messages, the messages are just being sent. That is the exact same API that Signal itself uses to send SMS messages.

moxie0 avatar Jan 25 '17 07:01 moxie0

@moxie0 Join developer here. Join doesn't write the SMS in the sms provider. It simply sends the message with SmsManager. As seen here, only the default SMS app on the phone can write to the provider: https://developer.android.com/reference/android/provider/Telephony.html

I'm not sure how Google Messenger works though. How does it know that other apps are sending the message? And how does the message appear in the provider later? Do you know?

Thanks in advance for your help with this issue.

joaomgcd avatar Jan 25 '17 11:01 joaomgcd

GitHub Issue Cleanup: See #7598 for more information.

automated-signal avatar Apr 03 '18 01:04 automated-signal