This document provides an overview of the tools and steps needed to develop Android applications in Eclipse. It describes how to install the Android SDK and set up an Android project in Eclipse. It also explains key Android concepts like activities, services, and the manifest file. The document demonstrates how to add a MapView to an app and get an API key for Google Maps. It provides guidance on running apps in the emulator or on a device, as well as debugging techniques.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to an app's layout.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to layouts.
This document provides an overview of the steps to create an Android application using Eclipse that incorporates Google Maps. It describes downloading the necessary tools like the Android SDK and Eclipse plugin. It explains how to set up a project, configure the manifest file to include the maps library and internet permission. It also covers getting an API key for maps by obtaining the fingerprint of the debug certificate. The document then gives examples of basic maps functionality like adding a MapView to a layout.
This document provides an overview of developing Android applications. It discusses installing the necessary tools like the Android SDK and Eclipse plugin. It describes creating an Android project in Eclipse, including specifying the SDK location. It explains app components like activities and services. It provides an example of adding maps functionality by configuring the manifest file and getting an API key. The document is a tutorial that introduces major Android development concepts in a brief and high-level manner.
This document provides an overview of key concepts for developing Android applications. It discusses tools like Eclipse, the Android SDK, and Android Virtual Devices. It also covers important app components like activities, services, and the manifest file. The document demonstrates how to set up a basic maps application using the Google Maps API, including getting an API key. It recommends several Android developer resources and forums for additional information.
This document provides an overview of tools and steps for developing Android applications. It describes installing the Android SDK and Eclipse plugin, creating an Android project, basic project components like activities and services, using the Android emulator and debugger, and includes an example of integrating the Google Maps API. The tutorial is intended as a brief introduction to major Android development concepts and references more complete documentation on the Android developer site.
This document discusses user interface layout basics in Android application development. It explains that layouts are defined as XML resources that template a user interface screen or portion of a screen. It also describes layout classes like LinearLayout and RelativeLayout that organize child controls on the screen. The document notes that user interfaces can be defined via XML layout resources or programmatically, and that using XML is the most convenient way to separate view and logic.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to an app's layout.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to layouts.
This document provides an overview of the steps to create an Android application using Eclipse that incorporates Google Maps. It describes downloading the necessary tools like the Android SDK and Eclipse plugin. It explains how to set up a project, configure the manifest file to include the maps library and internet permission. It also covers getting an API key for maps by obtaining the fingerprint of the debug certificate. The document then gives examples of basic maps functionality like adding a MapView to a layout.
This document provides an overview of developing Android applications. It discusses installing the necessary tools like the Android SDK and Eclipse plugin. It describes creating an Android project in Eclipse, including specifying the SDK location. It explains app components like activities and services. It provides an example of adding maps functionality by configuring the manifest file and getting an API key. The document is a tutorial that introduces major Android development concepts in a brief and high-level manner.
This document provides an overview of key concepts for developing Android applications. It discusses tools like Eclipse, the Android SDK, and Android Virtual Devices. It also covers important app components like activities, services, and the manifest file. The document demonstrates how to set up a basic maps application using the Google Maps API, including getting an API key. It recommends several Android developer resources and forums for additional information.
This document provides an overview of tools and steps for developing Android applications. It describes installing the Android SDK and Eclipse plugin, creating an Android project, basic project components like activities and services, using the Android emulator and debugger, and includes an example of integrating the Google Maps API. The tutorial is intended as a brief introduction to major Android development concepts and references more complete documentation on the Android developer site.
This document discusses user interface layout basics in Android application development. It explains that layouts are defined as XML resources that template a user interface screen or portion of a screen. It also describes layout classes like LinearLayout and RelativeLayout that organize child controls on the screen. The document notes that user interfaces can be defined via XML layout resources or programmatically, and that using XML is the most convenient way to separate view and logic.
Getting started with android dev and test perspectiveGunjan Kumar
The presentation covers basic intro to Android, how to get started with development, including instructions on setup, common UI usages like menus, dialogs; details on services like Sensors, Location and Google Maps
It also covers ideas on how to test including details on shell and installation instructions without using Eclipse
The document discusses various widgets in Android for building user interfaces, including TextView, EditText, Button, CheckBox, RadioButton, DatePicker, TimePicker, image buttons, text fields, toggle buttons, and a rating bar. It provides tutorials on how to create and handle events for these different form elements and widgets. The last part discusses how to create an autocomplete text view that provides country name suggestions from a string array.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It describes how an Android application is structured with packages like src, res, assets etc. It explains what an activity is, how it provides the user interface, and how it loads views from XML layouts. It also provides an example of creating a simple project with an activity that displays the current time when a button is pressed to demonstrate the basic concepts.
Android is an open source platform developed by Google and the Open Handset Alliance for mobile devices. It consists of an operating system, middleware, and key applications. The document provides an overview of Android versions from 1.1 to 4.1 Jelly Bean and their market shares. It also discusses installing the Android Development Tools plugin for Eclipse, exploring a sample project's components, and developing applications considering different Android versions. The sample project demonstrates creating layouts, handling button clicks, launching a new activity, and registering activities in the manifest file.
Android software development – the first few hourssjmarsh
My challenge for this year is to learn a new programming language or software development technology. While I don’t intend adopting the suggestion of The Pragmatic Programmer and learning one new language each year, I do think that there is much to be gained by seeing what else is out there. With the booming popularity of the Android platform for mobile devices I thought what better place to start? Over the past few weeks I have taken the first few steps in learning about Android application development.
Multiple Activity and Navigation PrimerAhsanul Karim
The document discusses Android application development using activities and intents. It describes that an activity provides an interactive screen for a user to perform tasks like making calls or viewing maps. Applications typically contain multiple activities, with one specified as the main launch activity. Activities are created by subclassing the Activity base class and implementing callback methods like onCreate. Activities can transition between each other using intents passed to the startActivity() method. The document provides an example exercise to create registration and login activities with navigation between them. It also outlines the activity lifecycle in Android.
This document provides an overview of an Android application development session that covers topics from the basics of Android to an advanced level. It discusses introducing Android and the Android SDK. It describes how to set up the development environment on Windows and Linux and install the Android Development Tools plugin for Eclipse. It demonstrates how to create an Android project in Eclipse and build a simple "Hello World" application. It also explains the structure of an Android project directory and the purpose of key directories like res, src, and values.
This document provides an overview of an Android application development session that covers the Android framework, Android layouts, and basic UI widgets. The session will discuss the main components of the Android framework - activities, services, broadcast receivers, and content providers. It will explain how to design screens using linear, relative and list views in Android layouts. It will also demonstrate how to add basic widgets like text boxes, buttons, checkboxes and radio buttons to a user interface. Code examples are provided to illustrate how to set up activities, initialize views, and retrieve widget values.
Day: 2 Environment Setup for Android Application DevelopmentAhsanul Karim
The document provides an overview of setting up the development environment for Android application development. It discusses installing the Java Development Kit (JDK), Eclipse IDE, Android SDK, and ADT plugin. It then demonstrates creating a "Hello World" Android app in Eclipse to introduce application structure, components, and the building blocks of an Android app.
This document provides an overview of programming graphical user interfaces (GUIs) in Java using the Abstract Window Toolkit (AWT) and Swing APIs. It discusses AWT containers like Frame, Panel, and Dialog which are used to hold components in layouts. Common AWT components include buttons, labels, text fields. It also covers key concepts like events, listeners and layout managers for positioning components. The document is an introduction to building GUIs in Java using the standard classes and APIs.
This document summarizes the topics of menus and dialogs covered in Android application development session 3. It discusses the three types of menus: option menus, context menus, and popup menus. It provides code examples for creating and handling each type of menu. It also discusses the three types of dialogs: alert dialogs, progress dialogs, and custom dialogs. Code is shown for building each type of dialog and handling button clicks. Custom dialog creation involves separate layout files for the main screen and dialog, with code to display the custom dialog when a button is clicked.
The document provides an overview of the Android platform, including its architecture, core components, and development tools. It describes the Linux kernel, middleware layers, Dalvik VM, application framework, and key pre-installed applications. It also summarizes the Android software development kit, emulator, tools for writing, building, and debugging applications, and different Android device configurations.
The Android emulator allows developers to test Android applications without using physical devices. It simulates key aspects of an Android device including hardware, software, and various form factors. The emulator runs on the computer and displays an emulated Android device that developers can interact with. It supports running multiple emulated Android devices at once with varying configurations defined through Android Virtual Devices (AVDs). The emulator and AVDs allow easy prototyping and testing of Android applications across different device profiles before releasing to physical hardware.
The document discusses the AndroidManifest.xml file which defines the structure and metadata of an Android application. It includes nodes for application components and their interactions. It also specifies requirements, permissions, and configuration options. The manifest allows defining the application version, install location, minimum SDK, and supported screen sizes. It declares necessary permissions and hardware features. The document also covers handling runtime configuration changes and the Android application lifecycle.
This document provides an overview of Android including its core components and features. It discusses what Android is, its various versions, the technologies and tools used in Android development like Java, XML, and SQLite. It also explains key Android concepts such as activities, intents, preferences, and working with resources, layouts, the R class and ListView. The document demonstrates how to set up Android Studio and create a basic Android project and its core components.
While it is technically possible to create and attach widgets to your activity purely through Java code, the more common approach is to use an XML-based layout file. Dynamic instantiation of widgets is reserved for more complicated scenarios, where the widgets are not known at compile time (e.g., populating a column of radio buttons based on data retrieved from the Internet).
With that in mind, this chapter discuss the XML way to lay out Android activity views that way
This document provides an overview of Android including:
- Android is an open source software platform and operating system for mobile devices based on the Linux kernel.
- It allows developers to write managed code using the Java programming language and includes features like views, content providers, notifications and more.
- The Android SDK provides tools for building, testing and debugging Android apps and uses a specific project structure.
- Input controls like buttons, text fields, checkboxes and spinners allow users to interact with apps. Attributes define behaviors of these controls.
- Screen size, density, resolution and orientation impact user interfaces and alternative resources support different densities.
The document describes how to set up the development environment for Android application development. It outlines the system requirements including supported operating systems and development environments. It provides steps to install the Java Development Kit (JDK), Eclipse IDE, Android SDK, and ADT plugin. It also describes setting the SDK path in Eclipse preferences. The document contains screenshots of setting up the environment in a lab.
This document provides an overview of developing Android applications. It discusses key Android concepts like activities, services, and manifest files. It also outlines the steps to set up an Android development environment in Eclipse, including installing the Android SDK and ADT plugin. It describes how to create a basic Android project structure with resources like layouts defined in XML. It also covers debugging tools and techniques like Logcat logging.
The document provides instructions for various Android development tasks including enabling USB debugging, using the Android Debug Bridge (ADB), debugging with logcat, taking screenshots, and adding maps to an app. It explains that USB debugging must be enabled in phone settings, and that ADB can be used to install apps, view attached devices, and read the log file. It also outlines how to import and use the Log class for debugging, and run logcat to view logs.
Getting started with android dev and test perspectiveGunjan Kumar
The presentation covers basic intro to Android, how to get started with development, including instructions on setup, common UI usages like menus, dialogs; details on services like Sensors, Location and Google Maps
It also covers ideas on how to test including details on shell and installation instructions without using Eclipse
The document discusses various widgets in Android for building user interfaces, including TextView, EditText, Button, CheckBox, RadioButton, DatePicker, TimePicker, image buttons, text fields, toggle buttons, and a rating bar. It provides tutorials on how to create and handle events for these different form elements and widgets. The last part discusses how to create an autocomplete text view that provides country name suggestions from a string array.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It describes how an Android application is structured with packages like src, res, assets etc. It explains what an activity is, how it provides the user interface, and how it loads views from XML layouts. It also provides an example of creating a simple project with an activity that displays the current time when a button is pressed to demonstrate the basic concepts.
Android is an open source platform developed by Google and the Open Handset Alliance for mobile devices. It consists of an operating system, middleware, and key applications. The document provides an overview of Android versions from 1.1 to 4.1 Jelly Bean and their market shares. It also discusses installing the Android Development Tools plugin for Eclipse, exploring a sample project's components, and developing applications considering different Android versions. The sample project demonstrates creating layouts, handling button clicks, launching a new activity, and registering activities in the manifest file.
Android software development – the first few hourssjmarsh
My challenge for this year is to learn a new programming language or software development technology. While I don’t intend adopting the suggestion of The Pragmatic Programmer and learning one new language each year, I do think that there is much to be gained by seeing what else is out there. With the booming popularity of the Android platform for mobile devices I thought what better place to start? Over the past few weeks I have taken the first few steps in learning about Android application development.
Multiple Activity and Navigation PrimerAhsanul Karim
The document discusses Android application development using activities and intents. It describes that an activity provides an interactive screen for a user to perform tasks like making calls or viewing maps. Applications typically contain multiple activities, with one specified as the main launch activity. Activities are created by subclassing the Activity base class and implementing callback methods like onCreate. Activities can transition between each other using intents passed to the startActivity() method. The document provides an example exercise to create registration and login activities with navigation between them. It also outlines the activity lifecycle in Android.
This document provides an overview of an Android application development session that covers topics from the basics of Android to an advanced level. It discusses introducing Android and the Android SDK. It describes how to set up the development environment on Windows and Linux and install the Android Development Tools plugin for Eclipse. It demonstrates how to create an Android project in Eclipse and build a simple "Hello World" application. It also explains the structure of an Android project directory and the purpose of key directories like res, src, and values.
This document provides an overview of an Android application development session that covers the Android framework, Android layouts, and basic UI widgets. The session will discuss the main components of the Android framework - activities, services, broadcast receivers, and content providers. It will explain how to design screens using linear, relative and list views in Android layouts. It will also demonstrate how to add basic widgets like text boxes, buttons, checkboxes and radio buttons to a user interface. Code examples are provided to illustrate how to set up activities, initialize views, and retrieve widget values.
Day: 2 Environment Setup for Android Application DevelopmentAhsanul Karim
The document provides an overview of setting up the development environment for Android application development. It discusses installing the Java Development Kit (JDK), Eclipse IDE, Android SDK, and ADT plugin. It then demonstrates creating a "Hello World" Android app in Eclipse to introduce application structure, components, and the building blocks of an Android app.
This document provides an overview of programming graphical user interfaces (GUIs) in Java using the Abstract Window Toolkit (AWT) and Swing APIs. It discusses AWT containers like Frame, Panel, and Dialog which are used to hold components in layouts. Common AWT components include buttons, labels, text fields. It also covers key concepts like events, listeners and layout managers for positioning components. The document is an introduction to building GUIs in Java using the standard classes and APIs.
This document summarizes the topics of menus and dialogs covered in Android application development session 3. It discusses the three types of menus: option menus, context menus, and popup menus. It provides code examples for creating and handling each type of menu. It also discusses the three types of dialogs: alert dialogs, progress dialogs, and custom dialogs. Code is shown for building each type of dialog and handling button clicks. Custom dialog creation involves separate layout files for the main screen and dialog, with code to display the custom dialog when a button is clicked.
The document provides an overview of the Android platform, including its architecture, core components, and development tools. It describes the Linux kernel, middleware layers, Dalvik VM, application framework, and key pre-installed applications. It also summarizes the Android software development kit, emulator, tools for writing, building, and debugging applications, and different Android device configurations.
The Android emulator allows developers to test Android applications without using physical devices. It simulates key aspects of an Android device including hardware, software, and various form factors. The emulator runs on the computer and displays an emulated Android device that developers can interact with. It supports running multiple emulated Android devices at once with varying configurations defined through Android Virtual Devices (AVDs). The emulator and AVDs allow easy prototyping and testing of Android applications across different device profiles before releasing to physical hardware.
The document discusses the AndroidManifest.xml file which defines the structure and metadata of an Android application. It includes nodes for application components and their interactions. It also specifies requirements, permissions, and configuration options. The manifest allows defining the application version, install location, minimum SDK, and supported screen sizes. It declares necessary permissions and hardware features. The document also covers handling runtime configuration changes and the Android application lifecycle.
This document provides an overview of Android including its core components and features. It discusses what Android is, its various versions, the technologies and tools used in Android development like Java, XML, and SQLite. It also explains key Android concepts such as activities, intents, preferences, and working with resources, layouts, the R class and ListView. The document demonstrates how to set up Android Studio and create a basic Android project and its core components.
While it is technically possible to create and attach widgets to your activity purely through Java code, the more common approach is to use an XML-based layout file. Dynamic instantiation of widgets is reserved for more complicated scenarios, where the widgets are not known at compile time (e.g., populating a column of radio buttons based on data retrieved from the Internet).
With that in mind, this chapter discuss the XML way to lay out Android activity views that way
This document provides an overview of Android including:
- Android is an open source software platform and operating system for mobile devices based on the Linux kernel.
- It allows developers to write managed code using the Java programming language and includes features like views, content providers, notifications and more.
- The Android SDK provides tools for building, testing and debugging Android apps and uses a specific project structure.
- Input controls like buttons, text fields, checkboxes and spinners allow users to interact with apps. Attributes define behaviors of these controls.
- Screen size, density, resolution and orientation impact user interfaces and alternative resources support different densities.
The document describes how to set up the development environment for Android application development. It outlines the system requirements including supported operating systems and development environments. It provides steps to install the Java Development Kit (JDK), Eclipse IDE, Android SDK, and ADT plugin. It also describes setting the SDK path in Eclipse preferences. The document contains screenshots of setting up the environment in a lab.
This document provides an overview of developing Android applications. It discusses key Android concepts like activities, services, and manifest files. It also outlines the steps to set up an Android development environment in Eclipse, including installing the Android SDK and ADT plugin. It describes how to create a basic Android project structure with resources like layouts defined in XML. It also covers debugging tools and techniques like Logcat logging.
The document provides instructions for various Android development tasks including enabling USB debugging, using the Android Debug Bridge (ADB), debugging with logcat, taking screenshots, and adding maps to an app. It explains that USB debugging must be enabled in phone settings, and that ADB can be used to install apps, view attached devices, and read the log file. It also outlines how to import and use the Log class for debugging, and run logcat to view logs.
This Presentation will give u information about Android :
1. UI design Components and layouts- Frame Layout,
2. Linear Layout,
3. Relative Layout Write the XML
4. Load the XML Resource Attributes- ID,
5. Layout Parameters,
6. Position,
7. Size,
8. Padding and Margins
This document provides instructions for installing the Java Development Kit (JDK), Android SDK, Eclipse, and Android Development Tools (ADT) plugin to set up an Android development environment. It also demonstrates creating a basic "Hello World" Android project in Eclipse called "HelloAndroid" that displays plain text.
This document provides an introduction to Android including:
1. A brief history of Android and an overview of its concepts and philosophy including the Linux kernel, application framework, and development environment.
2. The prerequisites for Android development including Java, Eclipse, and the Android SDK.
3. An overview of key Android development concepts such as activities, views, intents, services, content providers, and the application structure and lifecycle.
This document provides an overview of Android development basics including what Android is, its components, security and permissions model, and how to develop Android applications. Some key points:
- Android is an operating system based on Linux with a Java programming interface and uses the Dalvik virtual machine. It allows background processing and rich user interfaces.
- Google Play is used to distribute Android apps. Apps declare required permissions which users must approve during installation.
- Main Android app components include Activities, Services, ContentProviders, BroadcastReceivers, and widgets.
- The Android Development Tools in Eclipse provide tools for app development including compiling, debugging and deploying apps to emulators and devices.
- Apps are written
This document provides an overview of setting up the Android development environment and creating basic Android projects. It discusses downloading the Java Development Kit (JDK), Eclipse IDE, and Android SDK. It also explains how to install the Android Development Tools (ADT) plugin for Eclipse and configure the SDK and AVD Manager. The document demonstrates how to create a simple "Hello World" project and tabbed application. It also provides information on accessing sensors like GPS and accelerometers as well as using local SQLite and remote databases with Android applications.
- Android is an open source software platform for mobile devices based on the Linux kernel and managed by the Open Handset Alliance. It allows developers to write managed code in Java for the applications layer.
- The Android software stack includes the Linux kernel, native libraries, the Android runtime (which includes a Java virtual machine called Dalvik), and the Application Framework layer where Android applications run.
- Android applications are built using the Android SDK and its tools which allow compilation of Java code into an executable .apk file that can be installed and run on Android devices.
This document provides an overview of getting started with Android development. It discusses downloading the necessary software, creating an Android project and basic activity, and understanding key Android building blocks like activities, intents, views, and layouts. It also demonstrates a simple "Hello World" Android app.
The document discusses the course Mobile Application Development. It provides details about the course teacher, outcomes, textbooks, and configuration of the Android development environment. The key topics covered are the Android SDK, Android Virtual Devices, emulators, Dalvik Virtual Machines, and steps to install Android Studio and SDK.
The document provides information about setting up the Android development environment using Eclipse. It discusses downloading the Android SDK starter package, installing the ADT plugin for Eclipse, and adding Android platforms and components to the SDK using the Android SDK and AVD Manager. The typical layout of the Eclipse IDE for Android development is shown, including the ADT plugin extensions. Steps for creating an Android Virtual Device for use with the emulator are also outlined.
This document provides an overview of setting up an Android development environment. It discusses downloading and installing the Java SDK, Eclipse IDE, and Android SDK. It also covers adding platforms and components to the Android SDK and configuring the development environment. Key steps include installing Java, downloading Eclipse, obtaining the Android SDK, and installing the ADT plugin for Eclipse. The document then describes creating a basic "Hello World" Android project in Eclipse to test the setup.
Android interview questions and answerskavinilavuG
Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode format called .dex files. The DVM executes multiple virtual machines efficiently and runs Java bytecode, converting it to .dex format. Activities dictate the user interface and handle interactions, services handle background processes, broadcast receivers handle communication between apps and the OS, and content providers manage data storage. The Android SDK includes tools like the emulator, DDMS, and ADB for app development.
Creating the first app with android studioParinita03
The document provides an overview of Android Studio, the integrated development environment for Android app development. It discusses what Android is, how Android Studio differs from Eclipse, and walks through creating a new project in Android Studio. The key steps covered are installing Android Studio, creating a new project, selecting project options like the application name and form factors, adding an initial activity, and running the app on an Android emulator.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
This document provides an introduction to Android programming, covering Moore's law and mobile device hardware capabilities, the Android software development checklist, basics of the Android graphical user interface, getting started with Android code, and running your first "Hello World" Android app. Key topics include the ingredients needed for an Android app, using XML to define app layout and components, implementing activities and handling events, and describing the app in the Android manifest file.
This document provides an overview of Android development and OAuth. It begins with definitions of Android and its history. It then discusses Android development environment, project structure, and the basic "Hello World" app. It introduces key Android concepts like activities and intents. The document also provides a detailed example walking through the OAuth authorization workflow. It concludes by discussing debates around the security of OAuth 2.0.
This document provides an overview of developing Android applications using Java and the Android SDK. It discusses why to use Android and its open source model. It then covers setting up Eclipse with the Android SDK, creating a basic "Hello World" app, understanding the activity lifecycle, and debugging apps. It also demonstrates a simple stopwatch app and discusses publishing apps on the Google Play store.
This document provides an overview of Android app development. It discusses what Android is, its history and architecture. It describes the core components of an Android app like activities, services, content providers and intents. It also discusses Android Studio as the IDE, system requirements, how to develop a first app, common programming languages and learning resources. The goal is to introduce the key concepts for developing Android apps.
2. References
This tutorial is a brief overview of some major
concepts…Android is much richer and more
complex
Developer’s Guide
http://developer.android.com/guide/index.html
API Reference
http://developer.android.com/reference/packages.html
3. Tools
Phone
Eclipse ( http://www.eclipse.org/downloads/ )
Android Plugin (ADT)
Android SDK ( http://developer.android.com/sdk/index.html )
Install everything except Additional SDK
Platforms, unless you want to
Windows Users: may need to install Motorola
Driver directly ( http://www.motorola.com/Support/US-
EN/Support-Homepage/Software_and_Drivers/USB-and-PC-
Charging-Drivers )
4. Android SDK
Once installed open the SDK Manager
Install the desired packages
Create an Android Virtual Device (AVD)
7. ADT Plugin (1)
In Eclipse, go to Help -> Install New Software
Click ‘Add’ in top right
Enter:
Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/
Click OK, then select ‘Developer Tools’, click Next
Click Next and then Finish
Afterwards, restart Eclipse
Specify SDK location (next 3 slides)
Must do this every time start a new project in a new
location (at least in Windows)
13. Project Components
src – your source code
gen – auto-generated code (usually just R.java)
Included libraries
Resources
Drawables (like .png images)
Layouts
Values (like strings)
Manifest file
14. XML
Used to define some of the resources
Layouts (UI)
Strings
Manifest file
Shouldn’t usually have to edit it directly,
Eclipse can do that for you
Preferred way of creating UIs
Separates the description of the layout from any
actual code that controls it
Can easily take a UI from one platform to another
15. R Class
Auto-generated: you shouldn’t edit it
Contains IDs of the project resources
Enforces good software engineering
Use findViewById and Resources object to
get access to the resources
Ex. Button b = (Button)findViewById(R.id.button1)
Ex. getResources().getString(R.string.hello));
16. Layouts (1)
Eclipse has a great UI creator
Generates the XML for you
Composed of View objects
Can be specified for portrait and landscape
mode
Use same file name, so can make completely
different UIs for the orientations without modifying
any code
18. Layouts (3)
Click ‘Create’ to make layout modifications
When in portrait mode can select ‘Portrait’ to make a
res sub folder for portrait layouts
Likewise for Landscape layouts while in landscape mode
Will create folders titled ‘layout-port’ and ‘layout-land’
Note: these ‘port’ and ‘land’ folders are examples of
‘alternate layouts’, see here for more info
http://developer.android.com/guide/topics/resources/providing-resources.html
Avoid errors by making sure components have the
same id in both orientations, and that you’ve tested
each orientation thoroughly
20. Strings
In res/values
strings.xml
Application wide available strings
Promotes good software engineering
UI components made in the UI editor should
have text defined in strings.xml
Strings are just one kind of ‘Value’ there are
many others
21. Manifest File (1)
Contains characteristics about your application
When have more than one Activity in app, NEED to
specify it in manifest file
Go to graphical view of the manifest file
Add an Activity in the bottom right
Browse for the name of the activity
Need to specify Services and other components too
Also important to define permissions and external
libraries, like Google Maps API
23. Android Programming Components
Activity
http://developer.android.com/guide/topics/fundamentals/activities.html
Service
http://developer.android.com/guide/topics/fundamentals/services.html
Content Providers
Broadcast Receivers
Android in a nutshell:
http://developer.android.com/guide/topics/fundamentals.html
24. Activities (1)
The basis of android applications
A single Activity defines a single viewable
screen
the actions, not the layout
Can have multiple per application
Each is a separate entity
They have a structured life cycle
Different events in their life happen either via the
user touching buttons or programmatically
26. Services (1)
Run in the background
Can continue even if Activity that started it dies
Should be used if something needs to be done while the user is not
interacting with application
Otherwise, a thread is probably more applicable
Should create a new thread in the service to do work in, since the
service runs in the main thread
Can be bound to an application
In which case will terminate when all applications bound to it unbind
Allows multiple applications to communicate with it via a common
interface
Needs to be declared in manifest file
Like Activities, has a structured life cycle
28. Running in Eclipse (1)
Similar to launching a regular Java app, use
the launch configurations
Specify an Android Application and create a
new one
Specify activity to be run
Can select a manual option, so each time
program is run, you are asked whether you
want to use the actual phone or the emulator
Otherwise, it should be smart and use whichever
one is available
32. USB Debugging
Should be enabled on phone to use
developer features
In the main apps screen select Settings ->
Applications -> Development -> USB
debugging (it needs to be checked)
33. Android Debug Bridge
Used for a wide variety of developer tasks
Read from the log file
Show what android devices are available
Install android applications (.apk files)
In the ‘platform-tools’ directory of the main
android sdk directory
Recommend putting this directory and the ‘tools’
directory on the system path
adb.exe
34. Debugging
Instead of using traditional System.out.println, use the Log class
Imported with android.util.Log
Multiple types of output (debug, warning, error, …)
Log.d(<tag>,<string>)
Can be read using logcat.
Print out the whole log, which auto-updates
adb logcat
Erase log
adb logcat –c
Filter output via tags
adb logcat <tag>:<msg type> *:S
can have multiple <tag>:<msg type> filters
<msg type> corresponds to debug, warning, error, etc.
If use Log.d(), then <msg type> = D
Reference
http://developer.android.com/guide/developing/debugging/debugging-log.html
35. Screen Shots
Some say you need to root the phone – that
is not true
One option: Android Screen Capture
http://www.mightypocket.com/2010/08/android-
screenshots-screen-capture-screen-cast/
It’s slow, but fine for screenshots of applications
whose screens aren’t changing fast
Read their installation help, following the extra
steps if need be (I had to copy adb.exe and some
dll files, as they explain)
36. Maps Example (1)
Using Google Maps in your app
Setup project to use ‘Google API’ version
Edit Manifest file
To indicate the app will use maps and the internet
Get a maps API key
Note: Google Maps API can display a map and draw overlays,
but is not the full Google Maps experience you enjoy on the web
For example, there does not seem to be inherent support for
drawing routes between points (if you find it let me
know)…however, you can draw lines between points and almost
any type of overlay, but that’s different than street routes
The directions API is a web service, which is different, among
several other Google web services
Read the Google API terms of use
38. Maps Example (3) – Manifest (1)
Open Manifest file
Add map library tag
Add the ‘Uses Library’ com.google.android.maps
Indicate the app will access the internet
Add the ‘Permission’ android.permission.lNTERNET
End goal is to add the following two lines to XML file,
under the <manifest> and <application tags>,
respectively
Under the <manifest> tag
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Under the <application> tag
<uses-library android:name="com.google.android.maps"></uses-library>
Following is GUI way to add them
40. Maps Example (5) – Manifest (3)
Select ‘Add’ under ‘Uses Library’ (last slide)
Then select ‘Uses Library at this prompt
Set name as: com.google.android.maps (next
slide) and save
43. Maps Example (8) – Manifest (6)
Select ‘Permissions’ and then ‘Add’ (last slide)
Select ‘Uses Permissions’ at this prompt
Set name to: android.permission.INTERNET
and save (next slide)
45. Maps Example (10) – Maps API Key (1)
All Android applications need to be signed
The debug mode signs for you with special debug
certificate
All MapView elements in map applications
need to have an API key associated with
them
That key must be registered with the certificate
used to sign the app
When releasing app, need to sign with a
release certificate and get a new API Key
46. Maps Example (11) – Maps API Key (2)
For debug mode, get the MD5 fingerprint of the debug certificate
Locate the ‘keystore’
Windows Vista: C:Users<user>.androiddebug.keystore
Windows XP: C:Documents and Settings<user>.androiddebug.keystore
OS X and Linux: ~/.android/debug.keystore
Use Keytool (comes with Java, in the bin directory with the other
Java tools, should put that dir on system PATH) to get fingerprint
keytool -list –v -alias androiddebugkey -keystore
“<path_to_debug_keystore>” -storepass android -keypass android
If don’t include –v option, then will probably get only 1 fingerprint, and if it’s
not MD5, then need –v (Java 7 needs –v)
Extract the MD5 fingerprint, SHA will not work unfortunately
Go to https://code.google. com/android/maps-api-signup.html ,
agree to terms and paste MD5 fingerprint, you will then be given
an API Key
47. Maps Example (12)
Need to put MapView tag in XML
com.google.android.maps.MapView
MapView is the basic view that represents a Google Map
display
Must include API Key in XML, inside a layout
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey=“<api key>”/>
Maps API Reference
http://code.google.com/android/add-ons/google-apis/reference/index.html
48. Acknowledgements
Android Developer’s Website
Activity and Service life-cycle flow charts
Tons of other Android info
Google Maps API external library
http://code.google.com/android/add-ons/google-apis/maps-overview.html
MightyPocket
http://www.mightypocket.com/2010/08/android-screenshots-screen-capture-screen-cast/
Numerous Forums & other developer sites, including:
http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html
http://efreedom.com/Question/1-6070968/Google-Maps-Api-Directions
http://www.mail-archive.com/android-developers@googlegroups.com/msg28487.html
http://android.bigresource.com/ threads
http://groups.google.com/group/android-developers threads
Many http://stackoverflow.com threads
http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html
Zainan Victor Zhou – for advice and his own tutorial