You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you construct a Message which should be sent as MMS with save set to true, it will hit an error similar to #113 because it tries to write to the Outbox, which only the default messaging app should be able to do.
It looks like the save == false path is implementation-specific for the messaging apps which use this library, since it seems to assume that either this is a message which is a new message or this is a message which is an update to an existing message. Since I don't have any experience with the fully-fledged SMS apps which use this library, I don't feel confident in making a patch to make this behavior work for the case where I want to request the system-default messsaging app to send an MMS message for me.
My gut feeling is that it would require adding an else if block to check if this is intended to be an updated to an old message (existingMessageUri != null, or something), and then moving a bunch of the following code into that block, since a great deal of it is not needed for calling the SmsManager.SendMultimediaMessage
As an example of how to do it differently, I have copy-pasted a bunch of this library's logic into KDE Connect's SMS handling: https://invent.kde.org/network/kdeconnect-android/-/merge_requests/217 -- This still uses a lot of this library's internals (android.mms.pdu_alt package especially), so I hope it is very understandable to a developer of this library.
The text was updated successfully, but these errors were encountered:
If you construct a Message which should be sent as MMS with
save
set to true, it will hit an error similar to #113 because it tries to write to the Outbox, which only the default messaging app should be able to do.android-smsmms/library/src/main/java/com/klinker/android/send_message/Transaction.java
Lines 657 to 661 in f6fa7d3
This makes sense, since we did ask to save it.
If you construct the same Message with
save
set to false, you will get a null pointer exception fromandroid-smsmms/library/src/main/java/com/klinker/android/send_message/Transaction.java
Lines 662 to 664 in f6fa7d3
existingMessageUri
is null.It looks like the
save == false
path is implementation-specific for the messaging apps which use this library, since it seems to assume that either this is a message which is a new message or this is a message which is an update to an existing message. Since I don't have any experience with the fully-fledged SMS apps which use this library, I don't feel confident in making a patch to make this behavior work for the case where I want to request the system-default messsaging app to send an MMS message for me.My gut feeling is that it would require adding an
else if
block to check if this is intended to be an updated to an old message (existingMessageUri != null
, or something), and then moving a bunch of the following code into that block, since a great deal of it is not needed for calling the SmsManager.SendMultimediaMessageAs an example of how to do it differently, I have copy-pasted a bunch of this library's logic into KDE Connect's SMS handling: https://invent.kde.org/network/kdeconnect-android/-/merge_requests/217 -- This still uses a lot of this library's internals (
android.mms.pdu_alt
package especially), so I hope it is very understandable to a developer of this library.The text was updated successfully, but these errors were encountered: