View Single Post
Old November 4th, 2010, 11:28 PM   #19 (permalink)
New Member
Join Date: Nov 2010
Posts: 1
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts

Originally Posted by tweakt View Post
As a long time java developer who frequently works with open source, I'm used to having the java source for libraries available for reference within eclipse. If you work on android with the Eclipse plugin you probably found there is no source code for android libraries. (If you browse to an android class, you get a rough decompiled view of it, but not very useful).

Since the source was released a few days ago I managed to locate all the necessary .java source for android.jar that comes with the SDK.

If you have Git installed, the following script should it. If someone can recommend a convenient place, I could upload the premade android-src.jar. Now once you have it, you have to remove the built-in "Android Library" classpath container from your project. Then manually add the android.jar file, and you can then associate android-src.jar with it. Then you have source code at your fingertips for all of the android API. =D


git-clone git:// android-api
cd android-api
git checkout android-1.0
jar cvf ../android-src.jar -C core/java .
jar uvf ../android-src.jar -C graphics/java .
jar uvf ../android-src.jar -C location/java .
jar uvf ../android-src.jar -C media/java .
jar uvf ../android-src.jar -C opengl/java .
jar uvf ../android-src.jar -C sax/java .
jar uvf ../android-src.jar -C services/java .
jar uvf ../android-src.jar -C telephony/java .
jar uvf ../android-src.jar -C wifi/java .
cd ..

I have downloaded the source code for android in windows by executing the following line :
git clone git:// android-api

I was just browsing through Bluetooth source code in eclipse and bumped on this ServiceManager class whose source i couldn't read !! When i browsed through the android.jar i couldn't see the source code for few packages like java.nio ,etc..

How can i get the source code for the above mentioned classes ?? I would like to have all the source related to android 2.2 version !! How do i get that ?

Please let me know..

24adithya is offline  
Reply With Quote