在哪里可以获得Android相机应用程序源代码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1105196/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can I get the Android camera application source code?
提问by user121196
I'm referring to the camera application that is already installed on my G1, not the camera API source code.
我指的是已经安装在我的 G1 上的相机应用程序,而不是相机 API 源代码。
How do I get the source code?
我如何获得源代码?
回答by AdamC
You will need to clonethe project from the Android repository using git
.
您将需要克隆使用从Android库项目git
。
The project URL is:
项目网址是:
https://android.googlesource.com/platform/packages/apps/Camera.git
https://android.googlesource.com/platform/packages/apps/Camera.git
You can clone the project like this:
您可以像这样克隆项目:
git clone https://android.googlesource.com/platform/packages/apps/Camera.git
The source code will be in the directory Camera.
源代码将在目录Camera 中。
This linkwill tell you how to download all the sources.
此链接将告诉您如何下载所有源。
If you need help with using git then checkout git's documentation section.
如果您在使用 git 方面需要帮助,请查看 git 的文档部分。
回答by David
Google has moved hosting to their own servers, so the process has changed. You can no longer browse the kernel source online, but the Android source code can be downloaded from http://source.android.com/source/downloading.html.
Google 已将托管转移到自己的服务器上,因此流程发生了变化。您无法再在线浏览内核源代码,但可以从http://source.android.com/source/downloading.html下载 Android 源代码。
You'll need a git client, and a lot of time to download the entire source code.
您将需要一个 git 客户端,并且需要大量时间来下载整个源代码。
If you don't want the entire current version of Android, here are some alternatives:
如果您不想要整个当前版本的 Android,这里有一些替代方案:
Searching through these public repos should give you enough code to work with.
搜索这些公共存储库应该会给你足够的代码来使用。
回答by AppleDroid
These links may be of help to you.
这些链接可能对您有所帮助。
Native code:
原生代码:
Customized code:
自定义代码:
回答by user5195112
Recently I looked for Contact stock app in android and I hit this thread. I was able to find the solution.
最近我在 android 中寻找 Contact stock 应用程序,我点击了这个线程。我能够找到解决方案。
git clone https://android.googlesource.com/platform/packages/apps/Camera
git 克隆https://android.googlesource.com/platform/packages/apps/Camera
is the way to clone camera app.
是克隆相机应用程序的方法。
All apps are listed in page
所有应用程序都列在页面中
https://android.googlesource.com/
https://android.googlesource.com/
In browser search for packages/apps/ to get the corresponding apps repository name.
在浏览器中搜索 packages/apps/ 以获取相应的应用程序存储库名称。