DescriptionCreate must-have applications for the latest Android OS
The Android OS is a popular and flexible platform for many of today's most in-demand mobile devices. This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices. Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers. Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications.
- Explains what an activity is and reviews its lifecycle
- Zeroes in on customizing activities by applying styles and themes
- Looks at the components of a screen, including LinearLayout, AbsoluteLayout, and RelativeLayout, among others
- Details ways to adapt to different screen sizes and adjust display orientation
- Reviews the variety of views such as TextView, ProgressBar, TimePicker, and more
Beginning Android Application Development pares down the most essential steps you need to know so you can start creating Android applications today.
GETTING STARTED W CHAPTER 1: ITH ANDROID PROGRAMMING 1
CHAPTER 2: ACTIVITIES AND INTENTS 27
CHAPTER 3: GETTING TO KNOW THE ANDROID USER INTERFACE 81
CHAPTER 4: DESIGNING YOUR USER INTERFACE USING VIEWS 125
CHAPTER 5: DISPLAYING PICTURES AND MENUS WITH VIEWS 169
CHAPTER 6: DATA PERSISTENCE 203
CHAPTER 7: CONTENT PROVIDERS 237
CHAPTER 8: MESSAGING AND NETWORKING 263
CHAPTER 9: LOCATION-BASED SERVICES 301
CHAPTER 10: DEVELOPING ANDROID SERVICES 331
CHAPTER 11: PUBLISHING ANDROID APPLICATIONS 359
APPENDIX A: USING ECLIPSE FOR ANDROID DEVELOPMENT 381
APPENDIX B: USING THE ANDROID EMULATOR 393
APPENDIX C: ANSWERS TO EXERCISES 411
|2||35-36||Error in Code,showDialog(1)|
|50||Error in Code, Using the same project created in the previous section, add the following statements in bold to the main.xml file: |
This should be activity2.xml instead main.xml
|54||Error in Code,It says:|
It should say:
The code will still work, since request_Code = 1, but it is better to use the constant.
|119||Error in Code,this line must be bolded:|
|132||Typo,The text just below Figure 4-5 reads as follows:|
The ToogleButton displays...
it should be:
The ToggleButton displays...
|144||Error in Text,Title for the Try it Out currently reads Using the TimePicker Wiew |
Should read Using the TimePicker View
|151, 153||Error in Code,In the code in bold towards the bottom it says:|
Date selected: + datePicker.getMonth() + 1 + ..... etc.
It should be:
Date selected: + (datePicker.getMonth() + 1) + .... etc
This will ensure that the 1 is added; otherwise the output looks like this (assuming the month of June (5) is picked: 51/1/11
With the fix above it will show: 6/1/11
Also on pg 153 in the how it works section.
|159||Errors in Code,This line: setContentView(R.layout.main);|
commented out, like this:
Instead of using constants 0, 1 and 2, like this: lstView.setChoiceMode(2); //CHOICE_MODE_MULTIPLE You could also use: lstView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
Should be bold.
|186||Missing Step,Add step between Step 1 and 2: Add the following <Button> element to the main.xml file:|
<?xml version= 1.0 encoding= utf-8 ?> <LinearLayout xmlns:android= http://schemas.android.com/apk/res/android android:orientation= vertical android:layout_width= fill_parent android:layout_height= fill_parent > <Button android:id= @+id/btn1 android:layout_width= fill_parent android:layout_height= wrap_content android:text= Tap and hold this for more options... /> </LinearLayout>
|5||187||Error in Menu Definition,The Menus application has the following menus defined: |
menu.add(0,3,3, Item 5 );
menu.add(0,3,3, Item 6 );
menu.add(0,3,3, Item 7 );
This causes menus 5-7 to display
You clicked on Item 4
Should instead be:
menu.add(0,4,4, Item 5 );
menu.add(0,5,5, Item 6 );
menu.add(0,6,6, Item 7 );
|195||Missing Step,Insert the line:|
<uses-permission android:name= android.permission.INTERNET />
in the manifest tag to make webview work.
|270||Error in Code,Inside the Note box, SMS_SEND should read SEND_SMS.||7/13/2011|
|273||Error in Text,Try It Out title should be Updating an Activity When a SMS is Received||7/13/2011|