What is the standard way to organize Android code in project [closed] What is the standard way to organize Android code in project [closed] android android

What is the standard way to organize Android code in project [closed]


Organize it in whatever way makes the most sense to you. There's no 100% correct way to organize an Android project... it depends on a number of factors (i.e. the size of your project).

If you want to see how Google organizes their projects, take a look at the Google I/O 2012 source code. In particular, check out the iosched.util package... it gives a number of ways to reuse code across your project (mostly by using static utility helper methods).


This is actually a debatable question, but I will give my two pennies.

Considering Android is a portable system you need to consider that your application will not have unlimited power, and the power it does have has to be shared with other applications running on the system, by power I mean battery life, considering a large number of Android devices are actually quite healthy in terms of CPU and RAM, however even though most devices have more RAM these days, this RAM is still shared with other applications, so it should be used sparingly.

That said, any elaborate, highly engineered solution that prefers layering and abstraction over simply 'getting the job done' will probably suffer in the long run, the bottom line is the less instructions your application executes and the less memory your application uses, the more efficient it will be.

To give a more practical answer to your question, I would first make sure you are comfortable with core Android components such as content providers, services, broadcast receivers, intents and handlers, etc and work out from there.

Sorry for not giving a more specific answer, but I hope that helps a little.