Google opens the android source code. We can download it from the following website:
Http://source.android.com/source/downloading.html
However, sometimes we just want to see how a part is implemented and do not want to download the entire repo or even the entire workspace. Android online source code provides us with a good choice.
Search for "android source code online" in Google and find the following link:
Http://stackoverflow.com/questions/449763/where-can-i-browse-android-source-code-on-line
It provides many ways of Online source code. Unfortunately, due to time reasons, many of them have become invalid. However
Https://github.com/android/
It has been valid and updated to Android 4.0.3. Open the website and we can see that it is organized by git Repo. For example, the Dalvik repo source code is in https://github.com/android/platform_dalvik. you can directly appreciate dalvik.
But what I want to share with you in this article is what another buddy provides. A chrome plug-in, he can directly jump from the Android online class documentation (http://developer.android.com/reference/packages.html) to the implementation of this class source file!
For example, after installing the plug-in, open the http://developer.android.com/reference/android/content/BroadcastReceiver.html In the Chrome browser, we found that the brooadcastreceiver class added a link (View
Source)
After you click this connection, the online source code of this class will be automatically activated! As shown in:
With this plug-in, we can easily view how these Android classes are implemented. The plug-in can be installed from the following address:
Http://blog.blundell-apps.com/add-source-code-links-to-android-apis/
Of course, it is only applicable to chrome browsers
Enjoy!