You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

开发SMS/MMS消息系统:App可接收SMS但无法接收MMS求助

Troubleshooting MMS Receiving Issue on Galaxy S7 Edge (Android 7.0.1)

Hey there! Let's figure out why your SMS/MMS app isn't picking up MMS messages on your Galaxy S7 Edge, even though SMS works fine and your manifest looks correct. Here are some targeted checks and fixes to try:

1. Double-Check Your Intent Filter Configuration

Even if you think your manifest is right, let's verify the exact intent filter for MMS broadcasts. Your receiver needs to listen for the correct action and data scheme. Make sure your intent filter looks like this:

<receiver android:name="com.webnation.text2email.receivers.MMSBroadcastReceiver"
          android:enabled="true"
          android:permission="android.permission.BROADCAST_WAP_PUSH"
          android:exported="true">
    <intent-filter>
        <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
        <data android:mimeType="application/vnd.wap.mms-message" />
    </intent-filter>
</receiver>

The key here is the android.provider.Telephony.WAP_PUSH_RECEIVED action and the specific MMS mime type—missing either can cause the broadcast to be missed.

2. Ensure Runtime Permissions Are Granted

Android 6.0+ (including 7.0.1) requires dynamic permission requests for dangerous permissions like SMS/MMS access. Even if you've declared these in your manifest, your app needs to ask the user for them at runtime:

  • READ_SMS
  • RECEIVE_SMS
  • RECEIVE_MMS
  • READ_EXTERNAL_STORAGE (needed if you're saving MMS attachments)

Test if permissions are granted by going to Settings > Apps > [Your App] > Permissions and confirming all SMS/storage permissions are enabled.

3. Verify Your App Is Set as the Default SMS App

Starting with Android 4.4, only the default SMS app receives SMS/MMS broadcast intents. If another app is set as default, your receiver won't get the MMS broadcasts. To check:

  • Go to Settings > Apps > Default Apps > SMS
  • Select your app from the list if it's not already chosen

4. Test Broadcast Reception with ADB

To rule out whether the system is sending the MMS broadcast or your receiver is failing to catch it, use ADB to simulate an MMS broadcast:

adb shell am broadcast -a android.provider.Telephony.WAP_PUSH_RECEIVED -d "application/vnd.wap.mms-message"

Check your logcat for entries from your MMSBroadcastReceiver—if you see your debug logs, the receiver is working, and the issue is likely in how you're processing the MMS data. If no logs appear, double-check your manifest and permissions.

5. Bypass Samsung's Custom Restrictions

Galaxy S7 Edge uses TouchWiz, which has some built-in optimizations that might block your receiver:

  • Battery Optimization: Go to Settings > Battery > Battery Optimization, find your app, and set it to Don't optimize. Samsung's battery saver can disable background receivers to save power.
  • Smart Manager: Open the Smart Manager app, go to App Protection, and make sure your app isn't marked as "Unmonitored" or restricted from receiving broadcasts.

6. Debug MMS PDU Processing

If the broadcast is being received but you're not seeing the MMS content, check how you're parsing the MMS PDU data. In your onReceive method, add logs to confirm you're extracting the PDU correctly:

@Override
public void onReceive(Context context, Intent intent) {
    Log.d("MMSReceiver", "MMS broadcast received!");
    if (intent.getAction().equals("android.provider.Telephony.WAP_PUSH_RECEIVED")) {
        byte[] pduBytes = intent.getByteArrayExtra("pdus");
        if (pduBytes != null) {
            Log.d("MMSReceiver", "PDU data received: " + pduBytes.length + " bytes");
            // Try parsing the PDU here using Telephony.Mms.extractPdu()
        } else {
            Log.e("MMSReceiver", "No PDU data found in intent");
        }
    }
}

This will help you identify if the issue is with receiving the broadcast or processing the MMS content itself.

内容的提问来源于stack exchange,提问作者Kristy Welsh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 10:06:13