SlideShare a Scribd company logo
1 of 21
Sasha Goldshtein
CTO, SELA Group

@goldshtn
blog.sashag.net

First Steps in Android
Development

© Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
(Relevant) Android Versions

Froyo

Gingerbread

Honeycomb

•Android 2.2

•Android 2.3.x

•Android 3.x

Ice Cream
Sandwich
•Android 4.0

Jelly Bean

KitKat

•Android 4.1-4.3

•Android 4.4
Android Development Environment
Native Android

Xamarin (C#)

• Eclipse/Android
Studio
• Android plugin
for Eclipse (ADT)
• Android SDK

• Visual Studio
• Xamarin.Android
extension
• Android SDK
Hello World

Demo
Project Structure
src
gen
res
layout
values

assets
Android X.X.X
Libraries
AndroidManifest.xml
What Makes an Android
Application?
•
•
•
•

Presentation layer
Derive from Activity
Use Views
Similar to forms in the
desktop world

• Worker processes in
application
• Invisible
• Responsible for
updating data
sources, activities,
notifications

• Shareable data store
• Preferred way to
share data across
applications

Activities

Services

Content
Providers

• Message-passing
framework
• Broadcast messages
to target
activity/service

• Broadcast consumers
• Filtered by criteria
• Listen to intents that
match the criteria

• Enables notifications
without interrupting
the current activity
• Device notification
area

Intents

Broadcast
Receivers

Notifications
Resources
Resources are non-code application parts
Android resources include
images, strings, simple
values, animations, themes, etc.
Best to keep separated/external from code
External resources are easier to
maintain, upgrade, and manage (…and localize!)

Created under the res folder
Layout Resources
Layouts specify the UI
Decouple presentation layer from code
Enable designing UI in XML
Can be referenced as any other resource from other
layouts

Usually, each layout XML file = view
Code and User Interface
Separation

Strive to define most of the UI in XML files, and
write only code in Java files
Clean code/UI separation provides flexibility and
easy maintenance
Makes it easier to adjust for various types of
hardware devices (similar to resource localization)

UI elements can be manipulated from code
Use findViewById to get UI element instance from
code
Connecting UI to Code

Demo
Localization
Resources make localization easy
Create a language-specific folder structure alongside
the main folder structure
Folder name includes qualifiers

+ res
+ values
+ strings.xml

+ values-fr
+ strings.xml

+ values-fr-rCA
+ strings.xml
What Is an Activity?
An activity represents a screen
Using Views to provide UI
Extends the Activity class
To navigate screens, start a new activity using an intent

By default, activities occupy the entire screen
Can create semi-transparent/floating activities

Last-in-first-out activity stack
New activity pushes foreground activity down into stack
Navigating back or finishing an activity pops from the
stack the previous activity
Creating Activities
Extend the Activity class
The base class presents an empty screen
Encapsulates window display handling functionality

User interfaces are created using Views
Can create UI from layout or from View-derived
instances
//Using a layout resource identifier:
setContentView(R.layout.main);
//Using a View-derived instance:
TextView text = new TextView(this);
text.setText("New text!");
setContentView(text);
Multiple Activities
All activities must be declared in the application
manifest
<activity android:name=".SecondaryActivity"/>

Span a sub-activity using an Intent
Intent launch = new Intent(this, SecondaryActivity.class);
startActivity(launch);
Layouts
Most commonly used layouts
Layout

Description

FrameLayout

Pins child views to the top left corner. Adding multiple
children stacks each new child on top of the previous,
with each new view obscuring the last.

LinearLayout

Adds each child view in a straight line, either vertically or
horizontally.

RelativeLayout

Enables defining the positions of each of the child views
relative to each other and the screen boundaries.

TableLayout

Lay out views using a grid of rows and columns.

Multiple layouts can be mixed together
Selectors and Lists
ListView provides a convenient UI
for value selection from a long list
Presents multiple items on screen

Spinner provides UI for value
selection
Presents only a single value at a time
Drop-down overlay of selectable items
Multiple Activities and ListView

Demo
Xamarin: C# on 3 Billion Devices
Xamarin provides a .NET runtime for iOS and
Android development in C#
Proprietary IDE: Xamarin Studio
Full Visual Studio integration
Xamarin.Android

Demo
Summary
Android development environment
Resources, layouts, views
It’s just another
{language, IDE, UI framework}
The rest is just details: data, networking,
preferences, styling, …
Questions
Sasha Goldshtein
CTO, SELA Group

@goldshtn
blog.sashag.net

More Related Content

What's hot

Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_programEyad Almasri
 
Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)shwetarathi Rathi
 
Lec004 setting up for development
Lec004   setting up for developmentLec004   setting up for development
Lec004 setting up for developmentEyad Almasri
 
Android Web app
Android Web app Android Web app
Android Web app Sumit Kumar
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - PresentationAtul Panjwani
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentCan Elmas
 
Android Infrastructure
Android InfrastructureAndroid Infrastructure
Android InfrastructureEyad Almasri
 
Lecture 2: Android Introduction
Lecture 2: Android Introduction Lecture 2: Android Introduction
Lecture 2: Android Introduction Eyad Almasri
 
iOS 8 & Xamarin whats new
iOS 8 & Xamarin whats newiOS 8 & Xamarin whats new
iOS 8 & Xamarin whats newAlex Blount
 
Android app development
Android app developmentAndroid app development
Android app developmentTechizzaa
 
Android application development
Android application developmentAndroid application development
Android application developmentMadhuprakashR1
 
Anroid Tutorial Beginner level By SAMRAT TAYADE
Anroid Tutorial Beginner level By SAMRAT TAYADE Anroid Tutorial Beginner level By SAMRAT TAYADE
Anroid Tutorial Beginner level By SAMRAT TAYADE Samrat Tayade
 
Android application and android operating system
Android application and android operating systemAndroid application and android operating system
Android application and android operating systemProvaAkter
 

What's hot (20)

Android101
Android101Android101
Android101
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)Project presentation (Loginradius SDK for Android)
Project presentation (Loginradius SDK for Android)
 
Lec001
Lec001Lec001
Lec001
 
Android Basics
Android BasicsAndroid Basics
Android Basics
 
Lec004 setting up for development
Lec004   setting up for developmentLec004   setting up for development
Lec004 setting up for development
 
Android Web app
Android Web app Android Web app
Android Web app
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android Infrastructure
Android InfrastructureAndroid Infrastructure
Android Infrastructure
 
Lecture 2: Android Introduction
Lecture 2: Android Introduction Lecture 2: Android Introduction
Lecture 2: Android Introduction
 
iOS 8 & Xamarin whats new
iOS 8 & Xamarin whats newiOS 8 & Xamarin whats new
iOS 8 & Xamarin whats new
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android app development
Android app developmentAndroid app development
Android app development
 
Android application development
Android application developmentAndroid application development
Android application development
 
iMA 2013
iMA 2013iMA 2013
iMA 2013
 
Anroid Tutorial Beginner level By SAMRAT TAYADE
Anroid Tutorial Beginner level By SAMRAT TAYADE Anroid Tutorial Beginner level By SAMRAT TAYADE
Anroid Tutorial Beginner level By SAMRAT TAYADE
 
Google android os
Google android osGoogle android os
Google android os
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android application and android operating system
Android application and android operating systemAndroid application and android operating system
Android application and android operating system
 

Similar to First Steps in Android Development with Eclipse and Xamarin

Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinPranav Ainavolu
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Androidrizki adam kurniawan
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
Android Development project
Android Development projectAndroid Development project
Android Development projectMinhaj Kazi
 
Learn how to develop for Android, beyond the Hello World android app - Cape T...
Learn how to develop for Android, beyond the Hello World android app - Cape T...Learn how to develop for Android, beyond the Hello World android app - Cape T...
Learn how to develop for Android, beyond the Hello World android app - Cape T...Joseph Kandi
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and EventsHenry Osborne
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android StudioSuyash Srijan
 
App innovationcircles xamarin
App innovationcircles xamarinApp innovationcircles xamarin
App innovationcircles xamarinMohit Chhabra
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptxMugiiiReee
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKDominik Renzel
 

Similar to First Steps in Android Development with Eclipse and Xamarin (20)

Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Lightning Talk - Xamarin
Lightning Talk - Xamarin Lightning Talk - Xamarin
Lightning Talk - Xamarin
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Android Development project
Android Development projectAndroid Development project
Android Development project
 
Learn how to develop for Android, beyond the Hello World android app - Cape T...
Learn how to develop for Android, beyond the Hello World android app - Cape T...Learn how to develop for Android, beyond the Hello World android app - Cape T...
Learn how to develop for Android, beyond the Hello World android app - Cape T...
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and Events
 
Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
App innovationcircles xamarin
App innovationcircles xamarinApp innovationcircles xamarin
App innovationcircles xamarin
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
 

More from Sasha Goldshtein

Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing LandscapeSasha Goldshtein
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerSasha Goldshtein
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF AbyssSasha Goldshtein
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkSasha Goldshtein
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSasha Goldshtein
 
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinC# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinSasha Goldshtein
 
Modern Backends for Mobile Apps
Modern Backends for Mobile AppsModern Backends for Mobile Apps
Modern Backends for Mobile AppsSasha Goldshtein
 
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Sasha Goldshtein
 
Mastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionMastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionSasha Goldshtein
 
Delivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in MinutesDelivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in MinutesSasha Goldshtein
 
Building Mobile Apps with a Mobile Services .NET Backend
Building Mobile Apps with a Mobile Services .NET BackendBuilding Mobile Apps with a Mobile Services .NET Backend
Building Mobile Apps with a Mobile Services .NET BackendSasha Goldshtein
 
Building iOS and Android Apps with Mobile Services
Building iOS and Android Apps with Mobile ServicesBuilding iOS and Android Apps with Mobile Services
Building iOS and Android Apps with Mobile ServicesSasha Goldshtein
 
Attacking Web Applications
Attacking Web ApplicationsAttacking Web Applications
Attacking Web ApplicationsSasha Goldshtein
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile ServicesSasha Goldshtein
 
First Steps in Android Development
First Steps in Android DevelopmentFirst Steps in Android Development
First Steps in Android DevelopmentSasha Goldshtein
 

More from Sasha Goldshtein (20)

Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET Framework
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS X
 
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinC# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
 
Modern Backends for Mobile Apps
Modern Backends for Mobile AppsModern Backends for Mobile Apps
Modern Backends for Mobile Apps
 
.NET Debugging Workshop
.NET Debugging Workshop.NET Debugging Workshop
.NET Debugging Workshop
 
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
 
Mastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionMastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and Production
 
Introduction to RavenDB
Introduction to RavenDBIntroduction to RavenDB
Introduction to RavenDB
 
State of the Platforms
State of the PlatformsState of the Platforms
State of the Platforms
 
Delivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in MinutesDelivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in Minutes
 
Building Mobile Apps with a Mobile Services .NET Backend
Building Mobile Apps with a Mobile Services .NET BackendBuilding Mobile Apps with a Mobile Services .NET Backend
Building Mobile Apps with a Mobile Services .NET Backend
 
Building iOS and Android Apps with Mobile Services
Building iOS and Android Apps with Mobile ServicesBuilding iOS and Android Apps with Mobile Services
Building iOS and Android Apps with Mobile Services
 
Task and Data Parallelism
Task and Data ParallelismTask and Data Parallelism
Task and Data Parallelism
 
What's New in C++ 11?
What's New in C++ 11?What's New in C++ 11?
What's New in C++ 11?
 
Attacking Web Applications
Attacking Web ApplicationsAttacking Web Applications
Attacking Web Applications
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile Services
 
First Steps in Android Development
First Steps in Android DevelopmentFirst Steps in Android Development
First Steps in Android Development
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

First Steps in Android Development with Eclipse and Xamarin

  • 1. Sasha Goldshtein CTO, SELA Group @goldshtn blog.sashag.net First Steps in Android Development © Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
  • 2. (Relevant) Android Versions Froyo Gingerbread Honeycomb •Android 2.2 •Android 2.3.x •Android 3.x Ice Cream Sandwich •Android 4.0 Jelly Bean KitKat •Android 4.1-4.3 •Android 4.4
  • 3. Android Development Environment Native Android Xamarin (C#) • Eclipse/Android Studio • Android plugin for Eclipse (ADT) • Android SDK • Visual Studio • Xamarin.Android extension • Android SDK
  • 6. What Makes an Android Application? • • • • Presentation layer Derive from Activity Use Views Similar to forms in the desktop world • Worker processes in application • Invisible • Responsible for updating data sources, activities, notifications • Shareable data store • Preferred way to share data across applications Activities Services Content Providers • Message-passing framework • Broadcast messages to target activity/service • Broadcast consumers • Filtered by criteria • Listen to intents that match the criteria • Enables notifications without interrupting the current activity • Device notification area Intents Broadcast Receivers Notifications
  • 7. Resources Resources are non-code application parts Android resources include images, strings, simple values, animations, themes, etc. Best to keep separated/external from code External resources are easier to maintain, upgrade, and manage (…and localize!) Created under the res folder
  • 8. Layout Resources Layouts specify the UI Decouple presentation layer from code Enable designing UI in XML Can be referenced as any other resource from other layouts Usually, each layout XML file = view
  • 9. Code and User Interface Separation Strive to define most of the UI in XML files, and write only code in Java files Clean code/UI separation provides flexibility and easy maintenance Makes it easier to adjust for various types of hardware devices (similar to resource localization) UI elements can be manipulated from code Use findViewById to get UI element instance from code
  • 10. Connecting UI to Code Demo
  • 11. Localization Resources make localization easy Create a language-specific folder structure alongside the main folder structure Folder name includes qualifiers + res + values + strings.xml + values-fr + strings.xml + values-fr-rCA + strings.xml
  • 12. What Is an Activity? An activity represents a screen Using Views to provide UI Extends the Activity class To navigate screens, start a new activity using an intent By default, activities occupy the entire screen Can create semi-transparent/floating activities Last-in-first-out activity stack New activity pushes foreground activity down into stack Navigating back or finishing an activity pops from the stack the previous activity
  • 13. Creating Activities Extend the Activity class The base class presents an empty screen Encapsulates window display handling functionality User interfaces are created using Views Can create UI from layout or from View-derived instances //Using a layout resource identifier: setContentView(R.layout.main); //Using a View-derived instance: TextView text = new TextView(this); text.setText("New text!"); setContentView(text);
  • 14. Multiple Activities All activities must be declared in the application manifest <activity android:name=".SecondaryActivity"/> Span a sub-activity using an Intent Intent launch = new Intent(this, SecondaryActivity.class); startActivity(launch);
  • 15. Layouts Most commonly used layouts Layout Description FrameLayout Pins child views to the top left corner. Adding multiple children stacks each new child on top of the previous, with each new view obscuring the last. LinearLayout Adds each child view in a straight line, either vertically or horizontally. RelativeLayout Enables defining the positions of each of the child views relative to each other and the screen boundaries. TableLayout Lay out views using a grid of rows and columns. Multiple layouts can be mixed together
  • 16. Selectors and Lists ListView provides a convenient UI for value selection from a long list Presents multiple items on screen Spinner provides UI for value selection Presents only a single value at a time Drop-down overlay of selectable items
  • 17. Multiple Activities and ListView Demo
  • 18. Xamarin: C# on 3 Billion Devices Xamarin provides a .NET runtime for iOS and Android development in C# Proprietary IDE: Xamarin Studio Full Visual Studio integration
  • 20. Summary Android development environment Resources, layouts, views It’s just another {language, IDE, UI framework} The rest is just details: data, networking, preferences, styling, …
  • 21. Questions Sasha Goldshtein CTO, SELA Group @goldshtn blog.sashag.net

Editor's Notes

  1. Folders structure:Src – hold all the source filesGen – holds auto-generated filesRes – holds the resources of the application. Subfolders (like drawable-*) holds graphics optimized for different resolutionsRes/layout – holds the layout definition XML filesRes/values – holds XML files with predefined values, such as string resource dictionaries, constants, etc.Android (2.3.3) – holds a reference to JAR file with Android APIsReference Libraries/”MyLibrary” holds a reference to 3rd party libraries and JARs referenced in the projectAsses – holds other static application’s assets which will be deployed onto deviceAndroidManifest.xml – application manifest file describing the application being built and what components—activities, services, etc.—are being supplied by that application Res folder can hold additional directories such as menu, raw, xml with XML-based specifications of various parts of the application.