Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm getting back into Java programming, and I've decided that giving back by working on open source Android apps is a great way to start. I've been running Cyanogenmod nightlies for about a year now, and would like to start with some of the core apps I work with on a daily basis (Camera, gallery, GitHub, StackExchange, the list goes on)
I can find packages on GitHub easily, and I can bring them into Eclipse (Kepler) but I find myself going down a rabbit hole of endless required packages and such, and never actually getting anything to build!
Is there anywhere I can find documentation on starting to edit these things? Tutorials, tips/tricks, required reading for this sort of thing? Is there a master repo somewhere where I can grab all of the code for Cyanogen (I know, this is probably ridiculous) to make sure I have all the imports?
Is there anywhere I can find documentation on starting the edit these things?
Ask the developers of your project(s) of interest. Usually, if they really want contributions, they will have build instructions. The GitHub app does as part of its project README. The newly-released StackExchange app is not open source.
Is there a master repo somewhere where I can grab all of the code for Cyanogen (I know, this is probably ridiculous) to make sure I have all the imports?
CyanogenMod has a wiki which contains lots of project documentation, including a set of pages for how to build CM and so forth. They even have dedicated build guides for how to build from source for various device models. There is also a page describing their GitHub hosting model.
Please bear in mind that many of the apps that came to CyanogenMod from the Android Open Source Project (AOSP) are not Android SDK apps that you can build with an IDE and the SDK alone. Most have many hooks into the rest of the OS and as such need to be built as part of a larger OS build. As such, this is not what I would recommend somebody "getting back into Java programming" to get involved with as their first order of business. The being said, for further assistance in developing for CyanogenMod, contact their community through their various channels.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have background about android application development and now I want to explore deeper side of the Android.
Because of Android is open source, I want to find my phone's source code, then change some values in code, and after all I can compile and flash the code into the phone and see the changes.
I know there is an android documentation here but it is not clear for me.
So, my question is how can I download the source code of my phone?
You haven't specified your device type so here are some more general ideas:
Basically it is not that simple and depends on your device. Parts of Android are open source, other parts are not. Furthermore, your Android device can have a locked bootloader which won't allow you to install your custom build firmware.
Your link shows you how to download the current Android source code using the repo tool. Usually, Android is not in a single git repo. The repo tool reads from a configuration file the different git repositories, current branches, etc. and clones them for you.
I did Android development for OMAP devices (in the past). OMAP itself is outdated but you can learn alot from the documentation: http://omapedia.org/wiki/Main_Page Furthermore, you can still buy OMAP dev boards and play around with them, build a custom image, patch things, etc.
Building a custom Android for OMAP devices works like this:
Clone Android source code
Clone Linux Kernel
Clone U-Boot bootloader
Build all three and create image files
Flash them on the device
A few words about open source: Many things ar eopen source, but not everything. E.g. GPU driver are closed source. In case of OMAP devices, you can get them precompiled. So if you want to touch something which is not open source, you run into problems.
I hope that helps you and points you a little bit into the right direction.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm working in a project in Android Studio and up to now, I've copied my files in other directory to change my code for adding new improvements in my program.
And this way is very overwhelming for me.
But I heard that is a good idea use Git when developing, and I want to try it. But I have some questions:
My app is not published yet, should I use Git or other VCS?
How can I use Git from Android Studio?
Is there any risks to my app in development get messed while trying a VCS?
What is VCS and why should you use it?
There are many benefits of using a version control system for your projects.
Collaboration
Without a VCS in place, you're probably working together in a shared folder on the same set of files.It's extremely error-prone as sooner or later, someone will overwrite someone else's changes.
With a VCS, everybody on the team is able to work absolutely freely - on any file at any time. The VCS will later allow you to merge all the changes into a common version.
Storing Versions (Properly)
Saving a version of your project after making changes is an essential habit. But without a VCS, this becomes tedious and confusing very quickly:
Restoring Previous Versions
Being able to restore older versions of a file (or even the whole project) effectively means one thing: you can't mess up! If the changes you've made lately prove to be garbage, you can simply undo them in a few clicks. Knowing this should make you a lot more relaxed when working on important bits of a project.
Understanding What Happened
Every time you save a new version of your project, your VCS requires you to provide a short description of what was changed. Additionally (if it's a code / text file), you can see what exactly was changed in the file's content. This helps you understand how your project evolved between versions.
Backup
A side-effect of using a distributed VCS like Git is that it can act as a backup; every team member has a full-blown version of the project on his disk - including the project's complete history.
How to use GIT on Android Studio
Have a look here
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What are the pro's and con's of using android studio instead of eclipse ?
Note:: I have looked into the answers here answered by CommonsWare but it was not much clear in debugging tools
Does Android Studio offers special debugging features which are not
in eclipse ?
If so what are those ?
I have used extensively both IDE's. IMHO Android Studio is much better than Eclipse.
Some obvious advantages are:
It supports gradle (this allows you to really have control over the build, create different application flavors, different signing configurations and so on).
In the layout view you have the option to view both the actual layout and the xml at the same time, while in Eclipse you must choose between the two tabs.
It feels better. From doing a refactoring (like renaming a method, to extracting a class) to viewing the Logcat. The refactorings seem more solid and the Logcat does not "disappear" as it happens in Eclipse (although it must be noted that the filtering does not work that well).
Its the future. Sooner or later this is going to be the standard, as Google is actively developing it.
On the downside I can notice three things:
Still it is not that stable. For example if you want to view your project modules in the module view (as of v0.4.2 for Windows) I cannot see all of them. This actually means that in certain cases the only thing you can do is to build from command line and edit the gradle script.
Because is something relative new, many libraries are not supporting it out of the box, whereas in Eclipse, since it has been around for so long, everything is more or less trivial.One example of this, is Robolectric (the library that allows you to run android unit tests on your pc - i.e. over any jvm). I have really struggled to set up Robolectric in a gradle project, and I never managed to do it. In Eclipse it was quite easy.
The last thing is also related to the other ones: Since Android Studio is quite new, you may not find answers online for the problems that you face.
To sum up, sorry I went a bit beyond the debugging tools (although both of them use the same ddms, so there is no difference there, but I noticed Logcat has a difference, as mentioned above). There is no actual dilemma which one is better. Android Studio is, period. The point is when are you going to switch to it.
Just my two pennies.
Android studio is much clever. It understands context in which you are working (because it's built over IDEA). And for now it is stable enough to work with. I changed IDE from eclipse to IDEA and then to ADS, six month ago and very happy about this.
No, both of them give you full functionality of debugging process.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm looking into porting an application called ygopro (source code here) to Android. I was just wondering if anybody can help me out by telling me what would be the best way to go about doing this? I would prefer to not spend more than about 60 hours on it and I certainly don't have the time to go through and rebuild everything from scratch. The code is in C++ and there are about 5,500 Lua scripts to do various things. Is there any easy way I can port this?
First, you'll note that the graphics library used by this project is based on has been ported to android.
There are two demos available for that project. Those will show you how to write an android application that uses this library. I suggest you essentially hack your projects source into the framework they provide.
In terms of Lua, again you'll want to use an existing port. Many of the Lua ports are oriented towards allowing access to LUA from Java via JNI, but you just want a Lua shared library out of them to link to from your C++ code. You will probably want something like AndroLua rather than the Android Scripting Environment. Pretty much, add all the folders in it's jni folder to your Android.mk includes, add it as a library, and you'll be good to go.
In terms of actual porting, I'm assuming that the project currently compiles happily under GCC. If that is the case, as you try to build it, it will complain about functions that are platform specific, and you will have to replace these. That should be manageable, if you are slowly adding code to the graphics framework demo as suggested. Beyond that, some libc functions are missing, but generally only rarely used ones.
Hope this helps. It goes without saying that you should complete some Android Native tutorials before starting. This project is more than a weekend.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Where can I browse the source code for any Android Open Source Project (AOSP) application (for example the Contacts application)? Is the only way to clone the entire source repository for all of AOSP?
Everything is mirrored on omapzoom.org. Some of the code is also mirrored on github.
Contacts is here for example.
Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the
Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android. Some of the projects (such as Kernel) have been removed and it now only points you to clonable git repositories.
To get all the code locally, you can use the repo helper program, or you can just clone individual repositories.
And others:
Downloading the Source Tree
2020: The official AOSP code search https://cs.android.com/
You can view the source code through http://developer.android.com, when you're reading the API there will be a link to the matching source code on GitHub, you just need to add the Android SDK Reference Search Plugin on Chrome.
I blogged about it here:
http://blog.blundellapps.com/add-source-code-links-to-android-apis/
I stumbled across Android XRef the other day and found it useful, especially since it is backed by OpenGrok which offers insanely awesome and blindingly fast search.
I've found a way to get only the Contacts application:
git clone https://android.googlesource.com/platform/packages/apps/Contacts
which is good enough for me for now, but doesn't answer the question of browsing the code on the web.
You can browse Android SDK samples from your smartphone using "Code Search":
https://market.android.com/details?id=sqwady.codesearch
This eclipse plugin allows for inline source viewing and even stepping inside the Android source code:
http://code.google.com/p/adt-addons/
(edit: specifically the "Android Sources" plugin: http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/)
gitweb will allow you to browse through the code (and changes) via a browser.
http://git.or.cz/gitwiki/Gitweb
(Don't know if someone has already setup a public gitweb for Android, but it's probably not too hard.)