Thursday, December 08, 2011

Android Source Files

 

for some reason, the open-source project Google setup for android with all the Git’s and Repos and stuff is very well mainained but requires a degree in particle physics to understand.

This is especially true, if you’re just trying to look under the hood of android and not interested in joining the project per-say or  uploading stuff of your own to a Git repository.

I come from Windows and am unused to becoming an IT specialist to install and use development software.

looking around different blogs and sites I finally found a likeminded individual interested in spreading the joy of SIMPLE and EASY rather than COMPLEX and REQUIRES HOURS OF UNDERSTANDING to do android things.

I want to develop for android, not be part of a complex Operating System’s development team (at least not for now).

I found a blogger who has likeminded views on the subject.

http://mobilebytes.wordpress.com/2010/06/30/classes-source-for-eclipse/

He has downloaded, stripped, mapped, vm’s and refitted the sources for android classes ready for Eclipse.

I uploaded them to megaupoad as well to lower this bloggers bandwidth problems (in case he pays for them)

and here they are:

Android version source megaupload URL I uploaded it to
1.5 r3 http://www.megaupload.com/?d=OL71VL2F
1.6 r2 http://www.megaupload.com/?d=B5F0R1AV
2.01 r1 http://www.megaupload.com/?d=MIJOHYYI
2.1 r1 http://www.megaupload.com/?d=93048HL0
2.2 froyo http://www.megaupload.com/?d=UJRSNLHN

 

In case you don’t know how to wire this up:

Step 1

Download the source codes into a directory such as c:\android\android-sdk-source\

SNAGHTML498a857

Step 2

1) open eclipse, open a project you wish to view the source of:

 

Right click on android.jar – select image

2) Select properties (last one on the context menu) or press Alt-Enter

3) In the window that comes up, under Java source Attachment select External file, then find the source file you downloaded in my case C:/Android/android-sdk-sources/android-sdk-1.6_r2-src.jar

image

4) click Open on the Windows Folder

5) and OK on the eclipse, and you should be all sourced up.

usage:

Click F3 on an android class such as BroadcastReceiver.class and you will see the source code.

image

Word of warning to the Debuggers out there.

YOUR USE OF ANDROID SOURCES and Versionage does not mean the EMULATOR is using the same version - if your app is for android 1.6 (as most should be) and your emulator is 2.2, the source you should attach is 2.2 as the emulator works under 2.2 and not 1.6

make sense?

Good luck

Mickey Perlstein