Pregunta

My Galaxy Nexus running 4.2.2 currently only downloads MMS messages when data is enabled. Some phones will temporarily enable data to download the message, which is much easier than having to manually enable and disable data (I don't have a data plan so keeping data enabled all the time is a waste of battery usage).

This bug on the Google Code project for Android seems to show the problem occurs mostly on Samsung phones such as the Galaxy S series or the Nexus S, however I observed the same problem on a Nexus 4 as well.

According to this thread on xda-developers, one of the few ROMs that supports the Always receive MMS feature is MIUI.

How can I recreate this functionality for phones that seem to lack it?

¿Fue útil?

Solución

UPDATE: I just found this thread, basically saying to set your APN Type as just "mms". Then when your data is enabled, it will only allow mms data. Not sure on how the battery is affected by this.

Enable Data for Incoming MMS

There are two Intent actions that can help us here.

The first is android.provider.Telephony.WAP_PUSH_RECEIVED, which is triggered when an MMS is first received.

The other is android.intent.action.TRANSACTION_COMPLETED_ACTION, which triggers when an MMS has finished downloading its content.

The following receiver definition in my AndroidManifest.xml worked on my phone when receiving and downloading an MMS:

<receiver android:name="com.freek.mmsdataenabler.MMSReceiver" >
    <intent-filter android:priority="999" >
        <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
        <data android:mimeType="application/vnd.wap.mms-message" />
    </intent-filter>
    <intent-filter android:priority="999" >
        <action android:name="android.intent.action.TRANSACTION_COMPLETED_ACTION" />
    </intent-filter>
</receiver>

All you need to do then is implement MMSReceiver and then have it enable and disable data appropriately.

Using Tasker

Alternatively, you can very easily implement enabling data for incoming MMS using the information above in Tasker.

  1. Create two tasks. One that turns Mobile Data on and one that turns it off. (Net > Mobile Data)
  2. Create a profile called MMS Received, and for the trigger pick Event > Phone > Received Text. Set the type to MMS. Set this profile to run the task that turns Mobile Data on.
  3. Create a profile called MMS Downloaded, and for the trigger pick Event > System > Intent Received. Set the Action to android.intent.action.TRANSACTION_COMPLETED_ACTION and Priority to highest. Set this profile to run the task that turns Mobile Data off.

I have yet to figure out how to tell when an MMS is being sent from the phone.

Otros consejos

Use the application event to trigger for outgoing MMS based on the messaging app being open, just build in a one minute or so delay when closing the app before you hit regular data again

just a heads up about enabling this feature, since everyone is assuming that this function his more useful...

in the phones that activate the data flow for MMS´s (HTC´s, SE, huawei, etc do it) often if the user does not have a data pack, additional charges come up since the data flow is only opened for the time to receive/send the MMS, but the android SO and it´s APP´s find the data flow active and use it... when that occurs the provider automatically charges the data, since other URL´s outside off MMS are being contacted...

enabling data flow for MMS´s is nice, but it would be important to assure that this data flow only allows the MMS service URL´s to be contacted, or else the reason why a user chooses to disconnect the data option is lost...

I think that LG androids also work has samsung devices, i think!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top