Bug 514984 - Group MMS sending fails when KDE Connect is not the default SMS app - configOverrides not passed to sendMultimediaMessage()
Summary: Group MMS sending fails when KDE Connect is not the default SMS app - configO...
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Pop!_OS Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-23 17:46 UTC by Brian Stine
Modified: 2026-01-23 23:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Stine 2026-01-23 17:46:46 UTC
### Problem

When sending MMS messages to group conversations (multiple recipients) from the desktop, the message appears to send successfully but never arrives on the phone or in the group conversation. This only occurs when KDE Connect is **not** set as the default SMS app on Android.

### Root Cause

In `SmsMmsUtils.kt`, the `sendMmsMessageNative()` function creates a `configOverrides` Bundle with `MMS_CONFIG_GROUP_MMS_ENABLED` but then passes `null` instead of `configOverrides` to `SmsManager.sendMultimediaMessage()`.

**Current code:**
```kotlin
val configOverrides = Bundle()
configOverrides.putBoolean(SmsManager.MMS_CONFIG_GROUP_MMS_ENABLED, klinkerSettings.group)

// ... later ...

mSmsManager.sendMultimediaMessage(context, contentUri, null, null, null)
//                                                          ^^^^ should be configOverrides
```

**The fix:**
```kotlin
mSmsManager.sendMultimediaMessage(context, contentUri, null, configOverrides, null)
```

### Why This Causes Device-Specific Behavior

KDE Connect Android has two code paths for sending MMS:

1. **Klinker library path** (when KDE Connect IS the default SMS app): Correctly passes `configOverrides` to `sendMultimediaMessage()` - group MMS works.

2. **Native path via `sendMmsMessageNative()`** (when KDE Connect is NOT the default SMS app): Creates `configOverrides` but passes `null` instead - group MMS fails on some devices.

Some Android ROMs/devices handle missing `MMS_CONFIG_GROUP_MMS_ENABLED` gracefully, while others require it to be explicitly set. This explains why the bug is device-specific (works on OnePlus, fails on Pixel/Samsung/LineageOS).

### Related Code References

- **File:** `src/org/kde/kdeconnect/Plugins/SMSPlugin/SmsMmsUtils.kt`
- **Function:** `sendMmsMessageNative()`
- **Comparison:** The klinker library's `Transaction.java` correctly passes `configOverrides`:
  ```java
  SmsManagerFactory.createSmsManager(settings).sendMultimediaMessage(
      context, contentUri, null, configOverrides, pendingIntent);
  ```

## Steps to Reproduce

1. Ensure KDE Connect is **not** set as the default SMS app on Android
2. Have a group MMS conversation (3+ participants) on the phone
3. From the desktop (via KDE Connect SMS app, kdeconnect-cli, or any D-Bus client), send a message to that group conversation
4. Observe: D-Bus call returns success, but message never appears in the group conversation on the phone

## Expected Behavior

Message should be sent to all group recipients and appear in the group conversation.

## Actual Behavior

Message appears to send (no error returned) but silently fails - never arrives in the group conversation.

## Affected Versions

- KDE Connect Android: Current master (also affects released versions)
- Affected devices: Pixel 4a5G, Pixel 2 XL, Samsung XCover6, various LineageOS devices
- Working devices: OnePlus Fold (likely because it handles missing config gracefully)

## Proposed Fix

Change line in `sendMmsMessageNative()` from:
```kotlin
mSmsManager.sendMultimediaMessage(context, contentUri, null, null, null)
```

To:
```kotlin
mSmsManager.sendMultimediaMessage(context, contentUri, null, configOverrides, null)
```

This is a one-line fix with low risk - the `configOverrides` Bundle is already being created correctly, it just needs to be passed to the API.

## Related Bugs

- Bug 501835: Group SMS not registering on Android from PC (likely same root cause)
- Bug 464555: Fixed receiving group messages, but sending still affected
- Bug 415531: Group conversation detection issues (related but different)

## Additional Context

This bug was discovered while developing a third-party KDE Connect client. The analysis involved tracing the code path from D-Bus through to the Android SMS APIs and comparing the klinker library implementation (which works) with the native implementation (which has this bug).
Comment 1 Bug Janitor Service 2026-01-23 19:54:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-android/-/merge_requests/606
Comment 2 Albert Vaca Cintora 2026-01-23 23:48:54 UTC
Git commit 060c411727a8249da95569f335ba53dfe0db2a31 by Albert Vaca Cintora, on behalf of Brian Stine.
Committed on 23/01/2026 at 23:48.
Pushed by albertvaka into branch 'master'.

[SMS Plugin] Pass configOverrides to sendMultimediaMessage for group MMS

The sendMmsMessageNative() function creates a configOverrides Bundle
with MMS_CONFIG_GROUP_MMS_ENABLED but was passing null instead of
configOverrides to SmsManager.sendMultimediaMessage().

This caused group MMS to fail silently on devices that require the
group MMS config flag to be explicitly set. The klinker library path
(used when KDE Connect is the default SMS app) correctly passes
configOverrides, which is why the bug was device/configuration specific.

M  +1    -1    src/org/kde/kdeconnect/Plugins/SMSPlugin/SmsMmsUtils.kt

https://invent.kde.org/network/kdeconnect-android/-/commit/060c411727a8249da95569f335ba53dfe0db2a31