Android for Beginners
eBook - ePub

Android for Beginners

Step by Step guide to develop Android App

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Android for Beginners

Step by Step guide to develop Android App

Book details
Book preview
Table of contents
Citations

About This Book

Build Android apps starting from zero programming experience Key Features

  • Comprehensive coverage of Android lying more stress on examples
  • The book covers the topics in simple and easy form taking practical examples in each topic
  • Simple language, crystal clear approach, straight forward comprehensible presentation
  • Adopting user-friendly classroom lecture style
  • The concepts are duly supported by several examples
  • The book cover the topics in a manner which fulfilled the skill gap among industry and academia


Description
The book has been written in such a way that the concepts are explained in detail, giving adequate emphasis on examples. To make clarity of the programming examples, logic is explained properly as well as discussed using comments in program itself. The book covers the topics right from the Introduction of the Android Studio and writing programs into it. The Android topics are discussed in detail taking into consideration the practical examples from simple to complex for the better understanding of students. Various sample practical exercises are included in the Book and their solutions so as to give students the basic idea of developing apps in Android. The examples given in book are user-focused and have been highly updated including topics, figures and examples.
The book features more on practical approach with more examples covering topics from simple to complex one addressing many of the core concepts required at the beginner level. What You Will Learn

  • Toasts, Activity, Dialogs, Intent, Android Life Cycle, Menus
  • Asynchronous Task, Recycler-view, Broadcast Receiver and Notification
  • Shared Preferences, Sqlite Database, Alarm Manager, Android Services, Testing Activity, Publishing App

  • Who This Book is For
    Students pursuing BE/BSc/ME/MSc/BTech/MTech in Computer Science Table of Contents
    1. Introduction
    2. Toast
    3. Activity
    4. Dialogs
    5. Intent
    6. Android Life Cycle
    7. Menus
    8. Asynchronous Task
    9. Recyclerview
    10. Broadcast Receiver and Notification
    11. Shared Preferences
    12. Sqlite Database
    13. Alarm manager
    14. Android Services
    15. Testing Activity
    16. Publishing App
    17. Appendix I
    18. Exercise 1
    19. Appendix II About the Author
    Pratiyush Guleria has done M.Tech in Computer Science with a Gold Medal, B.Tech in Information Technology and MBA Degree in Operation Research from Indira Gandhi National Open University (IGNOU). He has qualified SLET (State Level Eligibility Test) and has more than nine years of experience in IT Industry and Academics. He has, to his credit, approximately 25 research papers in peer reviewed International Journals and Conferences and has been the Technical Program Committee Member and reviewer for journals and International Conferences. His research interests include Data Mining Machine Learning and Web Technologies. He is also recipient of "Young Scientist Award" for best paper presentation in one of the International Conference. LinkedIn Profile: linkedin.com/in/pratiyush-guleria-2a944157

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Android for Beginners by Pratiyush Guleria in PDF and/or ePUB format, as well as other popular books in Computer Science & Operating Systems. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9789388176231

Chapter 1

Introduction

1.1 Know about Android

āœ“ It is a Mobile operating system, which was developed by Google, primarily for mobile devices.
āœ“ Linux based operating system.
āœ“ Android Latest version is 8.0-8.1 and is assigned with the code name ā€œOreoā€.
āœ“ The latest versions running are:
āœ“ 7.0-7.1.2 and is assigned with the code name ā€œNougatā€.
āœ“ Android 6.0 and is assigned with the code name ā€œMarshmallowā€.
āœ“ Android 5.0,Android 5.1 and is assigned with the code name ā€œLollipopā€.
āœ“ The API Level supported by Oreo is 26-27 whereas the API Level supported by Nougat is 24-25 and API Supported in other versions i.e. Marshmallow is 23 and in Lollipop, it is 21-22.
āœ“ The android programming is based on Java Programming.
āœ“ Platform Supported and Hardware Support:
āœ“ It supports on 32-bit as well on 64-bit operating system.
āœ“ The minimum 8GB RAM should be installed in systems so as to run the programs in Android Studio otherwise on less RAM android versions with API 20+ may not run on the programs properly and results in slow performance of systems.
Brief History about Android Operating System
Android was initially developed by Android Inc. founded by Andy Rubin, Rich Miner, Nick Sears, Chris White and then it is bought by Google in 2005 with the first commercial Android Device launched in September 2008. The first commercial version, Android 1.0 was released in September 2008. Then Android OS is continuously updated by Google since the initial release.
The first two versions i.e. Version 1.0 and 1.1 were released without any specific code names and then after it, all the versions released with specific code names and all code names areconfectionery themed and in alphabetical order since 2009. The list of Android operating system version with their API level is shown in Table 1.0.
Table 1.0. Android Operating System Versions and API Level
āœ“ Android Program Structure
The program structure of Android Studio shows the hierarchical representation of module. In Figure 1.1, it shows the project modules.
āœ“ Android app module: This module is a container for appā€™s source code, resource files, build files and android manifest file.
Figure 1.1: Android Project Modules
The android manifest file is having extension ā€œ.xmlā€ and is the root of the project source. This manifest file is responsible for disseminating an information about app to the Android operating system and Google Play store.
āœ“ Android res module:
The /res directory contains the following sub directories:
1) drawable/ -> This is the place for bitmap files i.e. .gif,.webp,.png etc.
2) layout/ -> layout/ directory will contain XML files defining user interface layout.
3) menu/ -> It contains the XML files for app menus like options menu, context menu and sub menu etc.
4) mipmap ->It is the place for app launcher icons.
5) values -> It is the place for files which describe multiple resources. The values/ directory contain simple values such as strings, integers, colors etc. For example, ā€œarray.xmlā€ for resource arrays, ā€œcolors. xmlā€ for color values, ā€œdimens.xmlā€ for dimension values, ā€œstrings. xmlā€ for string values and ā€œstyles.xmlā€ for styles.
The toolbar shown in Figure 1.2 displays few buttons i.e. Android SDK Manager and Android Virtual Device Manager.
Figure 1.2: Android Toolbar displaying Android SDK and Android Virtual Device Manager
Role of Android SDK Manager:
āœ“ Android SDK Manager is a tool where we view, install, update and uninstall packages.
āœ“ Android SDK Manager is also responsible for libraries required to build android applications.
āœ“ Android SDKManager displays the Android API and from there, the API required for personal phone can be downloaded.
āœ“ The steps to open the Android SDK Manager are shown in Figure 1.3 and the API Level, Android version is shown in Figure 1.4.
Role of Android AVD Manager:
āœ“ It is a Graphical User Interface where we can create and manage Android Virtual Devices which are required by the Android Emulator.
āœ“ Android Emulator provides an environment to run the program by using Android Virtual Devices, in caseif it is not possible to run the program on your mobile handset.
āœ“ To open the AVD Manager, do the following:
Select Tools->Android->AVD Manager. The steps are shown in Figure 1.5.
Figure 1.3: Steps to open Android SDK Manager
Figure 1.4: Android SDK
Figure 1.5: Android AVD Manager

1.2 Letā€™s Start with Simple User Interface:

In order to build a simple user interface as shown in Figure 1.6, please go through the following
steps:
āœ“ First of all, open the layout editor and add a textbox, button from the toolbox.
Figure 1.6: Simple User Interface
The xml file generated of the layout shown in Figure 1.6 is: activity_main.xml
Note: The user interface in an Android app is built using a hierarchy of layouts (ViewGroup objects) and widgets (View objects).
The Layouts act as containers that control child views positioning on the screen. ...

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Preface
  5. Acknowledgement
  6. Table of Contents
  7. Chapter 1 Introduction
  8. Chapter 2 Toast
  9. Chapter 3 Activity
  10. Chapter 4 Dialogs
  11. Chapter 5 Intent
  12. Chapter 6 Android Life Cycle
  13. Chapter 7 Menus
  14. Chapter 8 Asynchronous Task
  15. Chapter 9 Recyclerview
  16. Chapter 10 Broadcast Receiver and Notification
  17. Chapter 11 Shared Preferences
  18. Chapter 12 Sqlite Database
  19. Chapter 13 Alarm manager
  20. Chapter 14 Android Services
  21. Chapter 15 Testing Activity
  22. Chapter 16 Publishing App
  23. Appendix I
  24. Appendix II