- 09-09-2012, 08:01 PM
Thread Author #1
Group Text Messaging for JB - ACHIEVED!
I have just finished testing my modifications to the framework and MMS apk to enable Group Texting similar to the iPhone.
I am VERY new to JAVA / Android / Git / Gerrit and I am learning as I go along. I am working on submitting the code to AOSP right now but if there is anyone that would like to incorporate the modified java classes for their ROM, as soon as possible, I will gladly work with you in making that happen.
I have modified the android-4.1.1_r4 branch from AOSP and only tested it on my own toro/GNex. I lack resources and time to test on any other device, but you are welcome to do so.
EDIT: Also check post #13 below for changes to mmssms.db schema.





changes have been committed to "jb-release" branch
12/05/12:
Thank you guys for your support. The community is amazing.
I apologize for the absence. I have been putting allllll my efforts in finding a job, and have finally got one.
A quick update:
I was never able to get my virtual machine to play nicely with gerrit (especially Google's gerrit), but invisiblek has done me HUGE favor and submitted the code to cyanogenmod's gerrit for review.
After a few rounds of review the gerrit patch on CM was abandon, due to the fact that the patch will be native in AOSP 4.2
There are many 3rd party ROMS that have the patch included hopefully many more to come.
- Vivek VasaniLast edited by playa1257; 12-05-2012 at 10:42 AM.
- 09-09-2012, 11:38 PM #2
Re: Group Text Messaging for JB - ACHIEVED!
Impressive Sir
I am now in the Galaxy Nexus member's club as of Aug 2012. Late to the party, but well before it shuts down! - 09-10-2012, 12:50 AM #3
Re: Group Text Messaging for JB - ACHIEVED!
dope, great work/\.

*INCREDIBLE*MECHA*TORO*GROUPER* GALAXY S3 *
* [TORO RADIOS] * [NEXUS WALLS] * [GROUPER GUIDE] * [CHATTER] * - 09-10-2012, 08:05 AM #4
- 09-10-2012, 11:48 AM #5
Re: Group Text Messaging for JB - ACHIEVED!
Cool! Would love to see this baked into JB.
How hard is it to incorporate this into a ROM? - 09-10-2012, 12:47 PM
Thread Author #6
Re: Group Text Messaging for JB - ACHIEVED!
I can't see how it would be too hard. But I don't build ROMs, so I'm not sure. But It's essentially 10 files that I modified off Google's AOSP code. So if someone were to build a ROM off the AOSP then just have to replace those 10 files with mine.
Otherwise, if it were another ROM, i.e. Cyanogen, Vicious, Liquid, then it would be a little more work as those ROMs have their own version of the files that need to be changed. In my first post I put a link to my GitHub account and they can just go to the "jb-release" branch and look at the commit history to see exactly WHAT code I added and WHERE to insert it into their version. - 09-11-2012, 10:37 PM #7
- 09-12-2012, 01:44 PM #8
- 09-12-2012, 02:10 PM #9Samsung Galaxy Nexus
CM10 Jellybro Jelly Bean
Asus Nexus 7
AOKP JB Milestone 1 - 09-12-2012, 02:57 PM #10
- 09-12-2012, 03:16 PM #11
- 09-12-2012, 09:56 PM #12
Last edited by ohiomoto; 09-12-2012 at 10:33 PM.
- 09-13-2012, 09:58 AM
Thread Author #13
Re: Group Text Messaging for JB - ACHIEVED!
Sorry I disappeared for a bit. Looks like the word is spreading and FAST!!
I found a tiny annoying glitch when building a CM10 ROM with my mod. So I went on a very long hackathon with myself. Turns out that not only does the framework and Mms.apk needs to be changed but there need to be a slight change to TelephonyProvider.apk
TelephonyProvider.apk contains: MmsSmsDatabaseHelper.java that provides the setting up and maintaining of the mmssms.db and there are triggers that are created when the database is initially created (WHICH MEANS AFTER A FULL FACTORY WIPE).
original trigger:
I added a few lines at the end:Code:private static final String UPDATE_THREAD_SNIPPET_SNIPPET_CS_ON_DELETE = " UPDATE threads SET snippet = " + " (SELECT snippet FROM" + " (SELECT date * 1000 AS date, sub AS snippet, thread_id FROM pdu" + " UNION SELECT date, body AS snippet, thread_id FROM sms)" + " WHERE thread_id = OLD.thread_id ORDER BY date DESC LIMIT 1) " + " WHERE threads._id = OLD.thread_id; " + " UPDATE threads SET snippet_cs = " + " (SELECT snippet_cs FROM" + " (SELECT date * 1000 AS date, sub_cs AS snippet_cs, thread_id FROM pdu" + " UNION SELECT date, 0 AS snippet_cs, thread_id FROM sms)" + " WHERE thread_id = OLD.thread_id ORDER BY date DESC LIMIT 1) " + " WHERE threads._id = OLD.thread_id; "
This will ensure that when the MMS comes in and is staged temporarily in the sender's thread then moves to the group, it will mark the old thread as "read" instead of leaving it stuck on "unread".Code:private static final String UPDATE_THREAD_SNIPPET_SNIPPET_CS_ON_DELETE = " UPDATE threads SET snippet = " + " (SELECT snippet FROM" + " (SELECT date * 1000 AS date, sub AS snippet, thread_id FROM pdu" + " UNION SELECT date, body AS snippet, thread_id FROM sms)" + " WHERE thread_id = OLD.thread_id ORDER BY date DESC LIMIT 1) " + " WHERE threads._id = OLD.thread_id; " + " UPDATE threads SET snippet_cs = " + " (SELECT snippet_cs FROM" + " (SELECT date * 1000 AS date, sub_cs AS snippet_cs, thread_id FROM pdu" + " UNION SELECT date, 0 AS snippet_cs, thread_id FROM sms)" + " WHERE thread_id = OLD.thread_id ORDER BY date DESC LIMIT 1) " + " WHERE threads._id = OLD.thread_id; " " UPDATE threads SET read = " + " CASE (SELECT COUNT(*) FROM pdu WHERE read = 0 AND old.thread_id = thread_id " + " AND (m_type=132 OR m_type=130 OR m_type=128)) " + " WHEN 0 THEN 1 " + " ELSE 0 " + " END " + " WHERE threads._id = old.thread_id;";
ALSO, i was annoyed at how the timecode on the thread does not represent the LAST message in the thread but INSTEAD marks the thread date/time as the moment you last made a change to it. To fix that I made the following change:
Original:
Modified:Code:// Update threads table whenever a message in pdu is deleted db.execSQL("CREATE TRIGGER pdu_update_thread_on_delete " + "AFTER DELETE ON pdu " + "BEGIN " + " UPDATE threads SET " + " date = (strftime('%s','now') * 1000)" + " WHERE threads._id = old." + Mms.THREAD_ID + "; " + UPDATE_THREAD_COUNT_ON_OLD + UPDATE_THREAD_SNIPPET_SNIPPET_CS_ON_DELETE + "END;");
Code:// Update threads table whenever a message in pdu is deleted db.execSQL("CREATE TRIGGER pdu_update_thread_on_delete " + "AFTER DELETE ON pdu " + "BEGIN " + " UPDATE threads SET " + " date = (SELECT date FROM" + " (SELECT date * 1000 AS date, thread_id FROM pdu" + " UNION SELECT date, thread_id FROM sms)" + " WHERE thread_id = old." + Mms.THREAD_ID + " ORDER BY date DESC LIMIT 1)" + " WHERE threads._id = old." + Mms.THREAD_ID + "; " + UPDATE_THREAD_COUNT_ON_OLD + UPDATE_THREAD_SNIPPET_SNIPPET_CS_ON_DELETE + "END;");
PS I will be uploading my version of cm-10-20120912-UNOFFICIAL-toro
Check the top post, I would love some testers and feedback. - 09-13-2012, 10:51 AM #14
- 09-13-2012, 10:57 AM
Thread Author #15
Re: Group Text Messaging for JB - ACHIEVED!
SeigaGen,FYI,
Euroskank wants to implement this, but has stated a comment you might want to look at:
[CM10][Jellybro] Toro Nightly Kangs - [VZW] Galaxy Nexus Development - RootzWiki - Page 227
if you could please let Euroskank know that because I'm still a noob at all this, I had NO idea what I was doing on Gerrit, but I'm working on resubmitting it. I just run into a lot of issues because I'm running linux virtually off my mac.
- - - Updated - - -
kevlar924,
I'm not 100% if it will or will not work with third-party apps, but the change to the framework provides the code to thread the incoming meassage to a group and the change to the Mms.apk (stock Messaging app) provides functionality to send group messages.
I know that some third-party apps rely on the stock messaging app to handle incoming messages, if that is the case then it should thread just fine. But those third-party apps also need to have the functionality to send group MMS messages.
I hope I was able to answer your questions.
EDIT: My fault, I just checked the rootzwiki post you were referring to. That is FALSE. This is a not a NEW protocol. I just changed how Android handles the standard MMS that EVERYONE uses. I have tested with Moto Droid and iPhone devices in the same convo. It works.
or should I say it works for me. I'm hoping it works for everyone else too. But I can fix bugs as soon as people try it out and let me know what they are.Last edited by playa1257; 09-13-2012 at 01:02 PM.
- 09-13-2012, 01:19 PM #16Samsung Galaxy Nexus
CM10 Jellybro Jelly Bean
Asus Nexus 7
AOKP JB Milestone 1 - 09-13-2012, 04:59 PM #17
- 09-13-2012, 05:03 PM #18
Re: Group Text Messaging for JB - ACHIEVED!
Out of curiosity, how does it fair if an iPhone sends a group text to your phone?
- 09-13-2012, 05:29 PM
Thread Author #19
- 09-13-2012, 06:05 PM #20
Re: Group Text Messaging for JB - ACHIEVED!
This might get me back on ES! I submitted a request for CNA to implement this. We shall see.
- 09-13-2012, 06:21 PM #21
Re: Group Text Messaging for JB - ACHIEVED!
Excellent work, sir. Not a huge necessity for me, but definitely a handy addition. I certainly appreciate the work.
- 09-13-2012, 07:46 PM #22
Re: Group Text Messaging for JB - ACHIEVED!
Now, i don't mean to be needy, but since i've been doing all this group texting I need a way to check who theyre actually going to. (Example, it will say it goes to eric, alex, kara...) and then it will tell me it goes to 7 people but will only show the first 3. If there is a mod to click on the list and see all the recipients that would be awesome!
- 09-13-2012, 10:59 PM
Thread Author #23
- 09-14-2012, 12:49 AM #24
- 09-14-2012, 03:11 PM #25
Similar Threads
-
How to get out of a group text message
By Danielle McCoy in forum Droid RAZR MAXXReplies: 9Last Post: 05-22-2013, 07:57 AM -
Group Text Messaging
By juanuby in forum Motorola Droid 3Replies: 5Last Post: 10-26-2012, 09:57 PM -
SMS/MMS Group Text Messaging
By playa1257 in forum Bionic Rooting, ROMs, and HacksReplies: 0Last Post: 12-14-2011, 03:30 PM -
Talk to wriiten text message for a captivate
By andy55 in forum General Help and How ToReplies: 2Last Post: 11-28-2010, 01:36 PM -
Text Message for 2.2
By Tom8916 in forum Motorola Droid XReplies: 33Last Post: 10-01-2010, 11:59 AM



Reply

.


































