AndroMedians

About


Welcome to the Android resources guide of the AndroMedians. This guide is categorized by their topic, so you can easily find guides on related topics whether that is views, styling, testing, or using APKs. We have scoured the web endlessly for content while creating these guides and adapted content from many source that had hidden gems of information.
We don't claim the content is original (although we did develop quite a bit ourselves), but unlike those other sources listed, it is freely community editable. We have openly adapted, modified and brought together this content from all the sources we could find for the benefit of every engineer. This will help AndroMedians and everyone else to kick start in Android development.

Pro Tip


  Don't give up because it's initially hard, there is always a big cliff where you suddenly just understand what is happening, it might even take one week or two to reach that bug cliff.


  Google everything, If you have a problem someone else probably has, just Google your question and look for answers. Search before you post.


  Follow Android Design Guidelines, it's much easier.


  Make sure you be consistent and work with a practical approach. Work along with the tutorials. Make sure your code works.

  Once you learn the basics, invest some time in understanding some key concepts: configuration changes, usage of threads and broadcast receivers, usage of the support library, and the implementation of Parcelable

Way to Glory


Now we will take you through the resources right from Java Basics to Android Advanced. We would suggest the Beginners with no prior programming experience to start with the Java Section. Please do not rush, take your time and go through each and every resources. We have added all types of (text as well as video) resources for you. Make sure you start from the level you think you are now at.

1. Learning to Program with Java  


If you never programmed at all before or if you are interested in starting with the basics, spend the first few months just on learning Java. Learn the syntax and understand how everything works. You’ll need to be able to create classes, create and call methods, use interfaces as well as know how inheritance works, before you can go to the next step. These are the basics of Java, and you’ll use them extensively when developing Android apps. Helpful resources for learning Java:

Be sure to check out these particular Java topics as well:

Understanding the concepts is a good thing because it lets you search for practical ways to achieve something. Almost everything you can think of doing has already been tried and documented by someone else.
And now that you are done with the java learning so now you should quickly implement this learning to the android development.



2. Beginning with Android  


With the basics in mind, it is time to start coding your first Android app. To begin, download and install the Android Developer Tools. The Android SDK is actually a bundle of helpful tools consisting of Android libraries, emulator, debugger and documentation. It gives you a framework of Java classes and methods that all Android devices are able to use. The whole SDK is neatly packaged inside Eclipse or Android Studio, allowing you to only worry about your code and how devices implement it.
Android apps are a bit different from ordinary Java applications, because they’re build around Activities and Fragments, which both have lifecycles that determine the state of the app. When learning Android it’s not about learning how to code, it’s more about understanding the way Android works. That means that you’ll spend the majority of the time learning about Activity lifecycles, Fragments, ListViews, Bundles and other important Android concepts.
So if you are totally new to Android Development, Start Here:

We're now pretty much done with the resources for the basic concepts of the Android Development. There might be more resources but there are the ones that were present around the web for free. We encourage you to see all the resources and start with the ones you find most suitable for you.



3. Digging deeper into key concepts of Android  


These are the key concepts of Android that you will need while Android Programming. You may see these after a kick start of can even see them along with them. It takes you deeper into Android Specifics.

Structure

Exploring the foundations of app development:

Views and Layouts

Exploring the gritty details of views, layout, styling and common UI patterns:

Designing and Styling Views

AdapterViews

Custom Views

Interaction

Exploring how to allow user interaction and navigation within an app:

Navigation

Networking and Models

Diving into the networking and model layers for data-driven apps:

Persistence

Exploring the strategies for data persistence:

Fragments

Understanding how to build powerful and flexible views using Fragments:

Sensors and Device SDKs

Exploring sensors and components available via the Android SDK:

Services

Digging into how to run background services or leverage Android system services:

Workflow Guides

Focused on issues like deployment, testing, dependency management, etc:

Configuration Changes

The most common of these is caused by orientation changes. Whenever there is an orientation change, your activity needs to be destroyed and recreated to address the changes in layout. This means you need to handle this recreation process yourself, making sure your app doesn't crash. A lot of beginners (myself included) consider simply disabling these changes but this is consider a bad practice. Besides, even if you do disable orientation changes, there are other things that can cause configuration changes that you need to handle anyway.

Here are two good posts discussing this further: http://stackoverflow.com/a/582585/362298 and http://stackoverflow.com/questions/1111980/how-to-handle-screen-orientation-change-when-progress-dialog-and-background-thre

To force yourself to catch problems sooner than later, consider the following tip from a previous post here on Reddit. You can enable a developer setting to not keep activities, so that they always get destroyed and recreated.

And more specifically, here are two examples of dealing with this problem when using a FragmentPagerAdapter, a common use case:

In a more abstract sense but still related to the topic, an old post on avoiding memory leaks is probably worthy of your time as well. This was written by Romain Guy, a Google employee very active in the Android community. It is certainly worth following him on Google+.

Parcelable

You can pass objects from one activity to another in a Bundle if your class implements the Parcelable interface. Parcelables were designed specifically for performance and should almost always be used instead of Serializable. Here is a good page explaining how to use it.

You can also have inheritance while using it without adding too much of an overhead to the children like this post

One thing you MUST always keep in mind is the order with which you write to the parcel and read from it. That order must be consistent. Otherwise you will start getting very crypt error messages which are very hard to debug.

Threading

Android is full of features to help you deal with threads. This is a very important aspect of Android development because your app has to give snappy responses. So all your heavy work such as database operations and network access need to be done in a separate thread.

For this reason it is important to know when to use a Service, a Thread, an IntentService or an AsyncTask. Learn about to them, check examples, and make sure you use them whenever appropriate. Perhaps the best place to start is this post summarizing your options: http://techtej.blogspot.com.es/2011/03/android-thread-constructspart-4.html You will realize that knowing about callbacks and listeners will be useful here too.

Broadcast Receivers

Broadcast receivers are a great way to have your asynchronous tasks (refer to the previous topic above) communicate with the main thread or to receive push notifications from your phone. It is a powerful feature to understand and use.

Consider reading about it in the official documentation. Also, refer again to the list of common tasks to get to know how to use them.

Compatibility

According to the latest statistics I can see in my Developer Console, API 9 and above represents almost 97% of all active Android devices out there. The number of Android tablets is still much lower than that of Android phones. Take this year's Q1 sales for a reference. 28 million Android tablets were sold as opposed to 156 million Android phones sold in the same period.

Supporting older Android versions turned out to be easier than I thought initially. I am using the ActionBarSherlock for providing the same UI experience in terms of ActionBar layout. I know now that the official Android Support Library has a similar library called ActionBarCompat which is probably worth considering to avoid relying too much on third-party libraries.

Aside from the ActionBarSherlock, though, most things in the UI can done to all API levels using the Support Library. You just have to make sure to use the right sets of classes. For example, instead of using "android.app.Fragment" when creating a new fragment, you use android.support.v4.app.Fragment instead.

Wrapping Up

Again please note this guide above was originally posted on reddit and was adapted here for wider access. For more details, check out the original document.

Understanding the concepts is a good thing because it lets you search for practical ways to achieve something. Almost everything you can think of doing has already been tried and documented by someone else.
And now that you are done with the java learning so now you should quickly implement this learning to the android development.

4. Designing great apps  


Following are the resources for developing apps that not just work great but also look great. Developer must follow android Design Guidelines while making an app to make sure it suits with the overall feel of the Android Platform. Design resources available around the web is:

Design Resources




That is pretty much all that is available on the internet and is used by most of the professional developers to kick start their android journey.
We request you not to consider this as just another resource, rather go through it regularly and make sure you evaluate yourself well before using this. We will try our best to update it regularly. Please support us by liking our facebook page Ciphertron


Developed by © Bhavishya Garg