[Xposed Framework Modules] Kevin M:
Hi! Awesome to see people finding this module as useful for them as it is to me. I probably wouldn't be using Hangouts without it either. :D My phone has very awkward APN problems that I can only assume have to do with a combination of CyanogenMod and an odd modem...

I haven't tested very much across carriers to see what the best quality is you can send. Verizon compresses the living hell out of nearly any image you throw at it. Perhaps if you could trick it into thinking it was a video... An idea for the future. The 640 max dimension is partly based on my Verizon experience but I've found it to be a very reasonable default when paired with the JPEG 60 default. You get the resizing algorithm benefits without creating considerably larger files. With that said the defaults do err on the low-quality end of things. I usually bump my JPEG quality up to 80. But as I'm on Verizon I do not not generally up the max resolution. I could and Verizon would still accept it but they would compress it back down. With MMS it only matters who the sender is. If you're on AT&T but your buddy is on Verizon then he will still get whatever AT&T allows. The sender's carrier controls the compression and formatting of MMS. If your Verizon buddy sends you a photo it will be compressed according to Verizon's standards. With that said I encourage you to up the defaults to get the most out of XHangouts and MMS. Just be aware that most carriers count MMS against your data.

The image quality dialog is pretty helpful at determining what looks best at what quality. The first image is an example photo and the second image is an example screenshot. Two very different types of media you may be sending. Ignore the actual file sizes but pay attention to the relative file sizes when compared to other quality levels. The actual file sizes shown do not represent the file sizes of MMS images you will be sending and are not influenced by your max dimensions. The best way to test your settings is to send an MMS to yourself. You can easily see the quality on both ends.

MMS usually works like this: Person A composes an MMS on their phone to person B. They hit send and their phone acquires a mobile connection suitable for MMS transactions (APN stuff). Once the APN is available (referenced as TYPE_MOBILE_MMS within Android) the MMS will be sent to the carrier's MMSC. The MMSC is really just a "big" web server operated by person A's carrier that accepts HTTP POST queries with highly structured data (XML-ish) representing the MMS. It's not like sending an SMS which uses special functions on person A's phone's modem. MMS is just a normal web query. You could actually send an MMS from anything that has an Internet connection but carriers limit access to their MMSC so that you may only reach it through their mobile network (3G, LTE, etc). Now that the MMSC has his data, person A's phone will show the MMS as sent. Person A's phone will turn off the APN connection. The MMSC will perform a number of operations to prepare the message for "sending." This is where it resizes the images or compresses the video or whatever it needs to do. Once all that is done the MMS is given a publicly accessible web address. Think of it as a YouTube video that is "unlisted" so anyone can see it if they know the URL. The MMSC will then communicate with the carrier's internal SMS network to send an SMS/text to person B on behalf of person A. This SMS is specially formatted to include the URL of the MMS that is now on the MMSC. Person B will receive this SMS just as any other but it will not show up on his phone as a standard message. His phone will acquire an APN connection. Once the connection is available he will pull down the MMS from the URL specified in the SMS. This is again all done over a simple HTTP GET query. Once the query is complete Person B's phone will close the APN and display the MMS on his phone as if it were an SMS but with multimedia. Most phones do a good job of hiding the fact that an SMS and MMS are very different. If Person A opted to have read or delivery receipts those would be acted upon here.

This is my understanding of the MMS transaction process. I have made some logical assumptions in areas where I have not confirmed the information for myself. To any experts out there, please revise as necessary. I only know what I've read from specs on a few late nights + the Hangouts decompiled source. Did not know much about it before writing this module.

Further reading: http://technical.openmobilealliance.org/Technical/technical-information/release-program/current-releases/mms-v1-3

And with some Googling you can probably find more accessible specs. ;)