Getting Your Program to Do What You Want

One of the keys to programming any application in Android is simply figuring out what it is that you want to do, and how to tell Android to do it with code. Fortunately, there have been many who have gone before you, and sometimes it is all about using the same programming code that others have used.

There are places where you can go online to receive help, as there is a community of Android developers who are happy to share their knowledge with you.

The Android Developers Web Site

Believe it or not, the Android development team actually wants you to know how to program on it. It lays out a lot of things that you need to do in order to program on it. The home page can be seen in Figure 12-10; you will remember being on the SDK tab when you had to download the Android SDK.

images

Figure 12-10. The Android Developers site home screen, at http://developer.android.com

The third tab is Dev Guide, and it will help you to understand some of the basics of Android programming. The References tab is also handy because it has a package index and a class index, and the Resources tab is good for articles, tutorials, sample code, and more. The Video and Blog tabs keep a developer in the know as far as new things on Android.

Most of the Android Developers site will seem very confusing at first, but I guarantee that certain things will become clearer when you use it. Note its handy search engine; you can use it to figure out how to make your program do what you want it to do.

Stack Overflow

As you get more adept at programming in Android, you will run into more complex problems with your application. You are going to need answers.

Stack Overflow was created by Jeff Atwood and Joel Spolsky in 2008 for questions and answers about computer programming. You can ask questions and get answers, and usually someone before you has asked the same question. You can see its home page in Figure 12-11, but I guarantee that this has changed by now.

images

Figure 12-11. The Stack Overflow site, at http://stackoverflow.com/

Other Ways to Find Programming Answers

Of course there are more places to find answers online than just Stack Overflow and the Android Developers site. However, when I have had questions about programming on Android and searched for the answers on Google, these two sites invariably came up in the top ten.

You will find that just doing a search for anything on Google is advantageous. Sometimes you just need to find the right combination of words, such as, “How do I link to Facebook on my Android app?”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.116.233