views:

528

answers:

1

I want to make some changes to the stock Mms Android application and install it on my device. However, I have problems with compiling the code checkout obtained from git. I have created a new Eclipse Android project with "use existing sources", setting the target framework to 2.1. However, Eclipse does not find some needed framework classes, e.g. android.telephony.SmsManager.

I have the whole Android toolchain set up and working (make finished without errors), Eclipse is running on Sun Jdk 1.5.

Perhaps my mistake was that I did not copy the .classpath file into the new project, I will check this. Never the less, should I succeed, will I be able to install this .apk into a non-rooted device?

+2  A: 

The stock Android applications are not designed to be built using the Android SDK, mostly because many of them predate that SDK. Right now, they can only be compiled as part of the firmware.

Even if you wind up with an APK, you will not be able to install it separately from a replacement firmware, unless you change the package in the manifest. You cannot have two applications on the device at the same time with the same package, and since you will not be signing your APK with the digital signature used by the firmware, yours will not be able to overwrite the existing one.

If you have a device that supports replaceable firmware (e.g., ADP2, Nexus One), you may be able to create, sign, and install your own firmware, then replace that APK in the future without replacing all of firmware a second time -- I don't know how well that works.

CommonsWare
Thank you for your input. As another option - I can change the package name and install a second version of Messaging App (I have seen this work with Maps App) - then will I be able to choose my custom built .apk as a default handler for Sms-related Intents?
skolima
In theory, yes. I cannot say whether there are any specific problems with doing this for SMS, since I haven't tried it.
CommonsWare