Auto Split SMS

Discussion in 'MIUI Mods' started by NUNsLAUGHTER92, Jan 12, 2013.

  1. NUNsLAUGHTER92

    Aug 11, 2011
    54
    1
    18
    Does anyone know how to add the auto split function to the Mms.apk that MIUI comes with?
    I'm on a cdma network so I cannot send messages longer than 160 characters.
    I have an old Mms.apk that has auto split enabled but it is for a much older version of MIUI gingerbread so settings doesn't work.

    "You know, a long time ago being crazy meant something. Nowadays everybody's crazy."
     
  2. lenny_kano

    lenny_kanoMI-ONE Staff Developer

    Aug 5, 2011
    176
    53
    38
    If you know how to edit apks, you need to modify Res/XML/mms_config.XML in mms.apk

    Change smsToMmsTextThreshold to 1

    Rebuild and push to device. Hope this helps.
     
  3. lenny_kano

    lenny_kanoMI-ONE Staff Developer

    Aug 5, 2011
    176
    53
    38
    Damn just realised that's not quite what you want. Sorry bout that.

    Try changing enableMultipartSMS to true. Mess around with that con fig XML and you should get what you're after.

    Edit: Try that and maxMessageTextSize to 1, leave the SMS to mms one alone.
     
  4. NUNsLAUGHTER92

    Aug 11, 2011
    54
    1
    18
    My Mms.apk actually didn't have anything like enableMultipartSMS in it but the older apk I have does, so I added it and I also added in the maxMessageTextSize from the older one, but it had -1 so I just changed it to 1.

    Here's what the original Mms.apk has in mms_config.xml

    <?xml version="1.0" encoding="utf-8"?>
    <mms_config version="4">
    <bool name="enabledMMS">true</bool>
    <bool name="enabledTransID">true</bool>
    <bool name="enabledNotifyWapMMSC">true</bool>
    <int name="maxMessageSize">1258291</int>
    <string name="userAgent">pcdadr63k</string>
    <string name="uaProfUrl">http://uaprof.vtext.com/pcd/adr63k/adr63k.xml</string>
    <int name="recipientLimit">10</int>
    <string name="httpParams">x-up-calling-line-id: 1##LINE1##|X-VzW-MDN: 1##LINE1##</string>
    <string name="httpParamsLine1Key">##LINE1##</string>
    <int name="maxImageHeight">1936</int>
    <int name="maxImageWidth">2592</int>
    <int name="maxSMSMessagesPerThread">200</int>
    <int name="maxMMSMessagesPerThread">10 </int>
    <string name="emailGatewayNumber">6245</string>
    <bool name="aliasEnabled">true</bool>
    <int name="aliasMinChars">2</int>
    <int name="aliasMaxChars">48</int>
    <bool name="allowAttachAudio">true</bool>
    </mms_config>


    Here's what the old edited Mms.apk had in its mms_config.xml

    <?xml version="1.0" encoding="utf-8"?>
    <mms_config version="4">
    <bool name="enabledMMS">true</bool>
    <int name="maxMessageSize">307200</int>
    <int name="maxImageHeight">480</int>
    <int name="maxImageWidth">640</int>
    <int name="defaultSMSMessagesPerThread">200</int>
    <int name="defaultMMSMessagesPerThread">20</int>
    <int name="minMessageCountPerThread">10</int>
    <int name="maxMessageCountPerThread">5000</int>
    <string name="uaProfUrl">http://www.google.com/oha/rdf/ua-profile-kila.xml</string>
    <int name="recipientLimit">-1</int>
    <int name="smsToMmsTextThreshold">4</int>
    <bool name="enableMultipartSMS">true</bool>
    <bool name="enableSlideDuration">true</bool>
    <int name="maxMessageTextSize">-1</int>
    </mms_config>



    I tried 2 different things to get it to work. First, I added:
    <bool name="enableMultipartSMS">true</bool>
    <int name="maxMessageTextSize">1</int>
    to the mms_config.xml file.


    Then I tried changing <int name="maxMessageSize">1258291</int> to <int name="maxMessageSize">307200</int>

    That didn't work either.


    But there are also other strings that I added in other places from the old apk to the one that is included in the ROM I'm on, I had added 1 thing that you told me to change in the mms_config.xml the enablemultipartsms, I didn't know about maxmessagesize before you told me.

    \res\values-en\strings.xml
    added to bottom before </resources>:
    <string name="pref_title_sms_split_160">SMS split</string>
    <string name="pref_summary_sms_split_160">Split messages every 160 characters</string>
    <string name="pref_title_sms_split_counter">Split counter</string>
    <string name="pref_summary_sms_split_counter">Adds counter to message ex. (1/2)</string>

    \res\xml\mms_config.xml
    <bool name="enableMultipartSMS">true</bool>
    <bool name="enableSlideDuration">true</bool>

    \res\xml\preferences.xml
    <CheckBoxPreference android:title="@string/pref_title_sms_split_160" android:key="pref_key_sms_split_160" android:summary="@string/pref_summary_sms_split_160" android:defaultValue="true" />
    <CheckBoxPreference android:title="@string/pref_title_sms_split_counter" android:key="pref_key_sms_split_counter" android:summary="@string/pref_summary_sms_split_counter" android:dependency="pref_key_sms_split_160" android:defaultValue="true" />

    \smali\com\android\mms\transaction
    # static fields
    .field private static final DEFAULT_SMS_SPLIT_COUNTER:Z

    .field private static final DEFAULT_SMS_SPLIT_MESSAGE:Z

    .field private static final SERVICE_CENTER_PROJECTION:[Ljava/lang/String;


    It seems all that only added the option to turn it on and off, but had no effect at all and I couldn't find anything else about sms splitting in the apk.
    Is there anything else you can think of? And sorry if this is a mess and thank you so much for helping.


    Edit: I found something that is meant for Cyanogenmod, but maybe it would help.
    I'm wondering if I should add every line of code into the Mms.apk that are on these two pages.
    https://github.com/cadavre/android_packages_apps_Mms/commit/fcd2cb7f10c044459a226c788c7345a7a356a595
    https://github.com/cadavre/android_packages_apps_Mms/commit/9385d957720da1b78fe5035e52161a61aca6ddae

    "You know, a long time ago being crazy meant something. Nowadays everybody's crazy."
     
  5. lenny_kano

    lenny_kanoMI-ONE Staff Developer

    Aug 5, 2011
    176
    53
    38
    What rom are you on?
     
  6. NUNsLAUGHTER92

    Aug 11, 2011
    54
    1
    18
    Gingerbread MIUI on DroidX

    "You know, a long time ago being crazy meant something. Nowadays everybody's crazy."
     
  7. lenny_kano

    lenny_kanoMI-ONE Staff Developer

    Aug 5, 2011
    176
    53
    38
    Oh well I don't have any ideas on gingerbread miui, and noone is developing that any more, so if those options aren't in there I can't really help much more. Adding the stuff you did doesn't change anything, from the sounds of it your version doesn't have the Java code required. Rolling back to the older version where it did work would be the easiest way.
     
  8. NUNsLAUGHTER92

    Aug 11, 2011
    54
    1
    18
    Well that really sucks. Thank you for trying to help though.

    "You know, a long time ago being crazy meant something. Nowadays everybody's crazy."
     
  9. lenny_kano

    lenny_kanoMI-ONE Staff Developer

    Aug 5, 2011
    176
    53
    38
    No problem, sorry it didn't work for ya.
     
  10. Ravish Malhotra

    Jan 31, 2013
    1
    0
    11
    Male
    Any idea how to mod mms.apk to work in landscape mode..m running miui 2.11.9 miui ics ported by me on my little xperia u..

    Sent from my Xperia U using Tapatalk 2
     
  11. NUNsLAUGHTER92

    Aug 11, 2011
    54
    1
    18
    There's a thread on it, if all you need to do is delete strings in the manifest then it's very easy. http://miuiandroid.com/community/index.php?threads/18790/

    "You know, a long time ago being crazy meant something. Nowadays everybody's crazy."
     
  12. JayDee

    JayDeeMembers

    Apr 17, 2012
    70
    6
    18
    Male
    Since 3.2.1, landscape mode in mms.apk is enabled again! ;)
     
  13. ingbrzy

    ingbrzyXiaomi.eu Multilang leader
    Staff Member

    yes, we enabled that also for English ROMs sice 3.2.1... :)
     

Share Our Site