[Fascinate Android Development] GizmoDroid:
[MOD][4/5/11] Froyo TW Samsung *v3.0* DeliveryReports/"Screen On"Notif/SMStoMMS

EDIT [4/5/11]:

Go ahead and jump to v3.0 here:

http://xdaforums.com/showpost.php?p=12672632&postcount=24

This post will updated whenever I get some feedback.

EDIT [3/12/11]:

I have only tested this on SuperClean 2.4-2.9.1. Please use caution, but feel free to use on other FROYO (only) Touchwiz ROM's (such as: EB01, Blackhole 4.x, etc). Currently reported to work on: EB01 Debloated/Deodexed, as well. The 160 char v2.0 has been bundled with recent releases of SuperClean, so you can be confident in v2.5 compatibility with them (or if you want to switch to the 960 char version).

[SIZE=+1]How does this differ from stock?[/SIZE]

Working SMS delivery reports (not available in EB16)

Option to receive delivery reports only for SMS/MMS/both/neither (not available in EB01)

Option to turn the screen on when receiving an SMS/MMS (not available in EB01)

Darker themed version to get rid of the obnoxious blue and yellow colors (credit to Kenesis)

In addition to that, you can choose either the USCC behavior of converting SMS to MMS after 160 characters, or the VZW behavior of converting SMS to MMS after 960 characters, by choosing one of the following downloads:

[SIZE=+1]Samsung MMS Mod v2.5 - APK Version[/SIZE]

[SIZE=+1]Convert SMS to MMS after 960 characters[/SIZE]

Mms.apk - Download @ MediaFire.com

[SIZE=+1]Convert SMS to MMS after 160 characters[/SIZE]

Mms.apk - Download @ MediaFire.com

Installation: Since this is a system app, it cannot be installed using the Package Installer. Mms.apk must replace /system/app/Mms.apk. You can accomplish this many different ways. Two common methods are: 1) use ADB to push it ("adb push Mms.apk /system/app/Mms.apk"); or 2) copy Mms.apk to your SD card, then use a program like Root Explorer to move it to "/system/app/". If you experience any problems, clear dalvik cache and reboot.​

If anyone wants a stock colored version or a CWM flash file, then leave me some feedback. I don't really want to make up a bunch of versions if everyone is happy with these.

Please let me know if the added features are working/not working, or if I broke anything in the stock functionality. Also, just having another set of eyes to verify I posted the right links to the right versions always helps (this is why I hate multiple versions and why I'm working to make a unified one).

[SIZE=+1]Changelog[/SIZE]

[SIZE=+0]v2.5[/SIZE]

-SMS delivery report notification icons have been ported

-Based off of darker themed Mms.apk of SuperClean 2.9 (credit to Kenesis)

[SIZE=+0]v2.0[/SIZE]

-Ported SMS delivery notifications from EB01

-Made two versions, one for EB01 SMS-to-MMS behavior, and one for EB16

[SIZE=+0]v1.0[/SIZE]

-Initial Release

Things to come

-User selectable SMS-to-MMS conversion point in Settings (pain in the butt, so probably not today)

-MMS read reports (maybe not supported by VZW? I never seem to get them back)

[SIZE=+1]Technical Info[/SIZE]

(How I Made It)

[SIZE=+0]v2.5[/SIZE]

Kenesis did the color changes. A couple people noticed that in the conversations that the delivery report icons from EB01 were not appearing. Since EB16 did not have sms delivery reports originally, then it makes since that the code to display them might have been taken out. I hunted this down and ported it. I'll try to post the specifics soon. (yeah, yeah, just like v2.0, :p)

[SIZE=+0]v2.0[/SIZE]

Large amount of smali code editing in order to port the SMS delivery reports code. I will try to posts the specifics sometime soon.

[SIZE=+0]v1.0[/SIZE]

With some of my mods, I try to make as few changes as possible to accomplish what I want to accomplish, that way no undesired side-effects sneak up. Well, this is an easy one. You actually don't need to decompile anything if you don't want. It's as simple as changing one character in one file with a hex editor.

Inside of /system/app/Mms.apk is a binary compiled XML, res\xml\mms_config.xml, that contains the setting. By changing value of smsToMmsTextThreshold from "2" to "7", we increase the number of characters before it will start converting the SMS to an MMS message from 161 characters, to 961 characters.

o.M.m.s.T.e.x.t.T.h.r.e.s.h.o.l.d.....[COLOR="Red"]7[/COLOR].....u.s.

Then, you can place this file back inside the zip, over top of the stock file. Optionally, you can then zipalign the apk, since the modification will break alignment.

If you use apktool or some other xml printer, you can change the value using a simple text editor:

<int name="smsToMmsTextThreshold">[COLOR="Red"]7[/COLOR]</int>

You will need to recompile after this. Don't forget to grab your signature folder out of your stock Mms.apk and put it in the new one. (Apk Manager automates this process)

[SIZE=+1]Rambling Lesson About MMS/SMS[/SIZE]

(placed at the bottom for the TL;DR kind of folks)

Basically, every phone/OS I've ever ran has the default SMS behavior of that if you sent a message longer than 160 characters then one of two things would happen:

Not let you send an SMS longer than 160 characters (I'm staring at you, Blackberry)

Automatically chop the message into 160 character SMS messages and send them separately

The message would send as a (let's call it "multiple page") SMS where, depending on the receiver's carrier (or maybe even some phones), it would arrive on their phone as one big SMS, or it would automatically chop it into multiple 160 character SMS messages.

For my phones, the upper limit for #3 has always been 6 linked together SMS's before it wants you to convert to MMS.

Now, I consider #3 to be my most favorite option, ever since AT&T started accepting Verizon messages longer than 160 characters. That means that everyone I text regularly can get texts up to 960 characters in length (I think that's the upper limit, but I rarely break the 200 mark). This is also the way that it was handled in every fully functional stock MMS app I've used on Android, so I've grown quite attached.

I say all this because there seems to be a large amount of confusion about the way that long SMS's work. This is largely because it seems to depend on the carrier/phone/messaging app (of the sender and receiver). I'll even admit that I'm not sure everything I just posted is true 100% of the time. But it's true enough to show that there are a lot of factors going on for why someone might be getting split up text messages from you, or why you might be receiving split texts from someone else.

Q: Why do you hate MMS so much, GizmoDroid?

A: To put it simply, I hate the way most phones handle MMS's. If they are supposed to be an alternative means for sending text, don't make me hit "play" like it's going to be a movie. If it can support all kinds of cool goodies, give me a text editor with basic functions like colors/fonts/sizes/bold/etc.

Here is how most of my experiences with text-only MMS's have gone:

"Why is there a slideshow playing?"

"What happened to the text I was just reading?"

"Oh look, I'm on slide #2. That's why."

"What's on slide #2?", you might ask me. Nothing. But my phone thought that it was more important than slide #1, right in the middle of me reading that really wordy message that you should have just called me about.

Why should I put someone else through that when I want to send a message that's 161 characters? Also, in my experience, most people expect a picture/video/sound attached when receiving an MMS, and get confused when there's only text.

[SIZE=+0]Previous Versions:[/SIZE]

[SIZE=-1]Samsung MMS Mod - APK Version

Convert SMS to MMS after 960 characters v2.0 Mms.apk - Download @ MediaFire.com

Convert SMS to MMS after 160 characters v2.0 Mms.apk - Download @ MediaFire.com

Convert SMS to MMS after 960 characters v1.0 Mms.apk - Download @ MediaFire.com

Samsung MMS Mod - CWM ZIP Version

Convert SMS to MMS after 960 characters v2.0 EB16_MMS_MOD_960_2.0_CWM.zip - Download @ MediaFire.com

Convert SMS to MMS after 160 characters v2.0 EB16_MMS_MOD_160_2.0_CWM.zip - Download @ MediaFire.com

Installation: Copy zip file to sdcard. Boot into CWM, and select "Install zip from sd card". Select the file, then confirm the flash. When finished, reboot.

*Note* This file has been verified to work in Red, Green, and Orange (newest ROM Manager) CWM recovery. [/size]