Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
jgclifton
Old
#1  
Member - OP
Thanks Meter 1
Posts: 92
Join Date: Mar 2009
Default Default Messaging App Source Code

Hi guys,

I was wanting to look at the default sms app to see how it works and possibly look into modifying parts. I've googled high and low and still havent found the source, does anyone know how I would get it just for the sms app?

Any help is much appreciated.
 
Newromancer
Old
#2  
Newromancer's Avatar
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Aug 2007
Sorry, can't post links, but here is some source for you.



Code:
    
public void sendSMS(String phoneNumber, String message)
    {        
        SmsManager sms = SmsManager.getDefault();
        Pendingetent pi = Pendingetent.getActivity(this, 0, new Intent(this, SMS.class), 0);                
        sms.sendTextMessage(phoneNumber, null, message, pi, null);        
    }

Don't forget to set manifest permissions for "SEND_SMS" and "RECEIVE_SMS" if required.

Code:
<manifest>
  ...
    <uses-permission android:name="android.permission.SEND_SMS">
    </uses-permission>
  ...
</manifest>

"The best way to predict the future is to invent it." Alan Kay, 1971.
 
jgclifton
Old
#3  
Member - OP
Thanks Meter 1
Posts: 92
Join Date: Mar 2009
Thanks, much appreciated. How come you are not able to post links? would it be possible to PM them to me? Thanks again.
 
zer0day
Old
#4  
Senior Member
Thanks Meter 8
Posts: 221
Join Date: Oct 2007
http://android.git.kernel.org/?p=pla....git;a=summary
Blog | AndChat - IRC for Android | Remember: Unused RAM is wasted RAM
 
mlevin
Old
#5  
mlevin's Avatar
Senior Member
Thanks Meter 0
Posts: 288
Join Date: Dec 2008
Location: Fairfax, VA
I had this exact same thought yesterday.

I was thinking that I could easily take the stock SMS app and modify it to include what I consider an annoyingly missing feature, marking a message or thread unread. How hard could it be? Just add a new item to a context menu and then some SQL that will mark the message unread.

Well, apparently it is kinda hard.

Here's what I did:

I got the source for the SMS app by typing this:

git clone git://android.git.kernel.org/platform/packages/apps/Mms.git

Then I went to Eclipse, created a new Android project and said "from existing source" and pointed it to this folder I'd just checked out of the repository.

FAIL.

Tons of red Xs in Eclipse. Tons of references it couldn't find. I started digging through the repo to see if I could find the things it wanted and started adding those to the project, but one thing just lead to another missing dependency and after adding half a dozen other apps I just gave up.

Maybe I need the entire framework or something? In that case, I have no idea how to set up the project and how to build just that app based on the stock app.

I know this can be done. People have branched other stock apps (the launcher, the email client, etc.) and released their own enhanced versions. But I just couldn't figure out how to get started -- I couldn't even build an UNMODIFIED version.

If anyone can point me in the right directions, that would be quite helpful.

Thanks!
 
4,8,15,16,23,42
Old
(Last edited by 4,8,15,16,23,42; 2nd May 2012 at 12:23 AM.)
#6  
Member
Thanks Meter 5
Posts: 48
Join Date: Jul 2010
Sorry for pushing a somewhat dated thread, but this topic is very interessting for me as well since all Messaging apps currently kind of suck and I really like the minimalistic approach of the default app but it lacks basic features.

Any new ideas?


A link to the best source I could find:
http://grepcode.com/file/repository....sApp.java?av=f
 
lufc
Old
#7  
lufc's Avatar
Senior Moderator / Resident Priest
Thanks Meter 1470
Posts: 9,442
Join Date: Oct 2007
Location: Blackpool UK

 
DONATE TO ME
Questions or Problems Should Not Be Posted in the Development Forum

Please Post in the Correct Forums & Read the Forum Rules


Moving to Q&A
Pay attention and participate,Encourage,
not discourage, Listen to advice and accept instruction,
and in the end you will be wise.......... Prov. 19:20
 
4,8,15,16,23,42
Old
#8  
Member
Thanks Meter 5
Posts: 48
Join Date: Jul 2010
okay thank you

Anyone knows where to get the source?
 
4,8,15,16,23,42
Old
#9  
Member
Thanks Meter 5
Posts: 48
Join Date: Jul 2010
Any help would be greatly appreciated!
 
4,8,15,16,23,42
Old
(Last edited by 4,8,15,16,23,42; 12th May 2012 at 08:07 PM.)
#10  
Member
Thanks Meter 5
Posts: 48
Join Date: Jul 2010
Found it!

https://github.com/android/platform_packages_apps_mms


edit: Weird problem. Lots of errors with missing classes/methods even though I can find those classes in online repos with the same API level (4.0.3). Importing those classes is not an option since a lot of new dependencies would be missing.
I know that the source is MMS for 4.0.4 but I find a lot of sources with the needed classes in the 4.0.3 framework. How is that possible?

edit2: Just found out that Google introduced their own Javadoc where they can hide experimental methods/classes for certain APIs but still use them in their stock apps. Now I only have to find a way to trick the system

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...