SlideShare a Scribd company logo
Workshop on Android Application Development




              +                     =
 Narendran Thangarajan,        Ganesh Babu,
 IV Yr, BE, CSE,               IV Yr, BE, CSE,
 SSN College of Engineering,   SSN College of Engineering,
 Chennai                       Chennai
Why are we here?
   The Mobile OS family
   Why Android
   Android Architecture
   Dalvik Virtual Machine
   Setting up the environment
   Views, Activities and Intents
   Hands on sessions
   Switching between Activities
   The Legendary ”Hello World” App
   Using SQLite DB
   StickPad – Notes application
   Oauth
   JustTweet – A simple Twitter Client
Why Mobile phones?
   The increasing importance of mobile devices due to
    the lowering prices and flamboyant features.


   The inception of the iPhone, Apple started this mobile
    OS revolution. (Jan 9, 2007)


   In November 2007, Google formed the Open Handset
    Alliance to bring out the Android OS.


   Then slowly Nokia, RIM and Microsoft made their way
    into the Mobile OS domain.
Mobile OS family

 12




 10




 8


                                      Column 1
 6                                    Column 2
                                      Column 3



 4




 2




 0
      Row 1   Row 2   Row 3   Row 4
Why Android?

   Because its cool! :P
   Ok.. just kidding..
   MultiTasking is more advanced
   Android App market is much bigger
   Android allows you to choose the hardware
   Android allows you to choose your carrier
   And Android has a huge community base..
Android dominance in the market

   Android clearly holds
    the lead with 43%
    market share.


   The main reason is
    Android being open
    source.
Android Architecture
Android Applications - Gist

   Written in Java
   Compiled to bytecode
   Tool named dx converts bytecode to .dex code
    (Dalvik Executables)
   Dex files are executed by Dalvik
   Happily everafter :)
Dalvik Virtual Machine

   A register-based process virtual machine
    designed and written by Dan Bornstein
   Usually called the JVM - #EpicFail
   Dalvik operates on Dex code and not Java
    bytecode.
   Aim of Dalvik is that it should run on
       Slow CPU
       Little RAM
       OS without swap space
       While powered by a battery
Setting up the environment
SQLite DB

   What is SQLite?
       SQL +Lite → 275 kb C Source code
       Self Contained → Doesn't need external libraries
       Serverless → Doesn't run as a separate process
       Zero Configuration → SQLite Just works
       Transactional → Satisfies ACID rules
                   http://www.sqlite.org/atomiccommit.html
       Powers – Firefox, iPhones, Skype, Symbian
       OPEN SOURCE :)
                   http://www.sqlite.org/download.html
SQLite Queries and Datatypes
   Queries (Demo)
       Create
       Read
       Update
       Delete
   DataTypes - Five
       NULL
       INTEGER
       REAL
       TEXT
       BLOB
The Major differences

 No GRANT and REVOKE
 No ALTER TABLE
 No editable VIEWS
 No JOIN operation
SQLite on Android
   SQLiteOpenHelper
       override the methods
                   onCreate() to create the database
                   OnUpgrade() to change the schema
       provides the methods
                   DB Based
                            getReadableDatabase()
                            getWriteableDatabase()
                   Querying
                            rawQuery()
                            Query()
                   Cursor-based
                            getCount()
                            moveToFirst()
                            moveToNext()
SQLiteDatabase - Demo
   Schema → namelist [ id | name ]
   Create & Upgrade
       db.execSQL()
   Insert, Update, Delete
       db.insert()
       db.update()
       db.delete()
   Read
       db.rawQuery()
Stick Pad
Using APIs - OAuth

   Social Networking sites are ruling us!
   We use lots of third-party applications – are we
    secure?
   OAuth to the rescue!
   Oauth provides a method for users to grant
    third-party access to their resources without
    sharing the passwords.
   Inspired from Google AuthSub,Yahoo BBAuth
    and Flickr API
OAuth

          Logging into an application without the
         application knowing your username and
                        password.
    TERMINOLOGY
   Oauth's Love Triangle
       Client
       Server
       Resource Owner
Traditional Authentication




     Client uses its credential to access its
        resources hosted on the server.
Oauth Authentication




   The Resource Owner is the person using the
    web application.
   Client is the Web Application itself
Oauth Authentication




   The client is split into Front-end and Back-end
Oauth Specification

    http://hueniverse.com/oauth/guide/workflow/

   Resource Owner – Jane
   Client – Beppa
   Server - Faji
Three credentials

   Client Credentials
       Created when the Application was originally created
   Temporary Credentials
       Created when the Resource Owner has to
        authenticate himself to the server.
       Server will say that the client is requesting access
        to private files.
   Access Credentials
       Used by client to access the private resources in
        the server.

More Related Content

PDF
Routing basics
PDF
Basic terminologies for a developer
PPTX
Quiz KU 1073 - Introduction to Information Technology
PDF
A primer on network devices
PPTX
IT QUIZ(KOZHIKODE SUB DISTRICT UP LEVEL)
PPTX
Technical Quiz (Basic concepts of computers)
PPTX
IT Quiz Prelims
PPTX
Computer Quiz (August 2013)
Routing basics
Basic terminologies for a developer
Quiz KU 1073 - Introduction to Information Technology
A primer on network devices
IT QUIZ(KOZHIKODE SUB DISTRICT UP LEVEL)
Technical Quiz (Basic concepts of computers)
IT Quiz Prelims
Computer Quiz (August 2013)

Viewers also liked (7)

PPTX
Tech Quiz
PPTX
Quiz ppt
PPT
PPTX
Computer quiz for primary classes
PDF
Technology Quiz
PPT
Biz-Tech Quiz - Grand Finale
PPT
Tech Quiz Finals
Tech Quiz
Quiz ppt
Computer quiz for primary classes
Technology Quiz
Biz-Tech Quiz - Grand Finale
Tech Quiz Finals

Similar to Android application development (20)

PPT
ArcReady - Architecting For The Cloud
PDF
End to End .NET Development on Mac
PPTX
Building Social Enterprise with Ruby and Salesforce
PPTX
Social Photos - My presentation at Microsoft Tech Day
PDF
iOS Development - Offline Class for Jasakomer
PPTX
The web as it should be
PPTX
Microsoft Azure
PPTX
Google Developer Group(GDG) DevFest Event 2012 Android talk
PPTX
Docker Training - June 2015
PPTX
DreamFactory Essentials Webinar
PDF
Docker and Containers overview - Docker Workshop
PPTX
Docker and containers - For Boston Docker Meetup Workshop in March 2015
PDF
Azure Camp Bandung
PDF
Android dev o_auth
PPT
Android Introduction
PDF
Front-end. Global domination
PDF
Frontend. Global domination.
PDF
Android Deep Dive
PDF
Building Cross-Platform Mobile Apps
PDF
Drupal 8 and iOS - an Open Source App
ArcReady - Architecting For The Cloud
End to End .NET Development on Mac
Building Social Enterprise with Ruby and Salesforce
Social Photos - My presentation at Microsoft Tech Day
iOS Development - Offline Class for Jasakomer
The web as it should be
Microsoft Azure
Google Developer Group(GDG) DevFest Event 2012 Android talk
Docker Training - June 2015
DreamFactory Essentials Webinar
Docker and Containers overview - Docker Workshop
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Azure Camp Bandung
Android dev o_auth
Android Introduction
Front-end. Global domination
Frontend. Global domination.
Android Deep Dive
Building Cross-Platform Mobile Apps
Drupal 8 and iOS - an Open Source App

More from UC San Diego (16)

PDF
Datacenter traffic demand characterization
PDF
Smart Homes, Buildings and Internet-of-things
PDF
Social Networks analysis to characterize HIV at-risk populations - Progress a...
PDF
eyeTalk - A system for helping people affected by motor neuron problems
PDF
Pirc net poster
PDF
Ajaxism
PDF
Fields in computer science
PDF
Understanding computer networks
PDF
FOSS Introduction
PDF
Network Programming with Umit project
PDF
Introduction to Python
PDF
Airline reservation system db design
PDF
Workshop on Network Security
PPTX
Socket programming in Java (PPTX)
PDF
Socket programming using java
PDF
Pervasive Web Application Architecture
Datacenter traffic demand characterization
Smart Homes, Buildings and Internet-of-things
Social Networks analysis to characterize HIV at-risk populations - Progress a...
eyeTalk - A system for helping people affected by motor neuron problems
Pirc net poster
Ajaxism
Fields in computer science
Understanding computer networks
FOSS Introduction
Network Programming with Umit project
Introduction to Python
Airline reservation system db design
Workshop on Network Security
Socket programming in Java (PPTX)
Socket programming using java
Pervasive Web Application Architecture

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PPTX
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
A Presentation on Artificial Intelligence

Android application development

  • 1. Workshop on Android Application Development + = Narendran Thangarajan, Ganesh Babu, IV Yr, BE, CSE, IV Yr, BE, CSE, SSN College of Engineering, SSN College of Engineering, Chennai Chennai
  • 2. Why are we here?  The Mobile OS family  Why Android  Android Architecture  Dalvik Virtual Machine  Setting up the environment  Views, Activities and Intents  Hands on sessions  Switching between Activities  The Legendary ”Hello World” App  Using SQLite DB  StickPad – Notes application  Oauth  JustTweet – A simple Twitter Client
  • 3. Why Mobile phones?  The increasing importance of mobile devices due to the lowering prices and flamboyant features.  The inception of the iPhone, Apple started this mobile OS revolution. (Jan 9, 2007)  In November 2007, Google formed the Open Handset Alliance to bring out the Android OS.  Then slowly Nokia, RIM and Microsoft made their way into the Mobile OS domain.
  • 4. Mobile OS family 12 10 8 Column 1 6 Column 2 Column 3 4 2 0 Row 1 Row 2 Row 3 Row 4
  • 5. Why Android?  Because its cool! :P  Ok.. just kidding..  MultiTasking is more advanced  Android App market is much bigger  Android allows you to choose the hardware  Android allows you to choose your carrier  And Android has a huge community base..
  • 6. Android dominance in the market  Android clearly holds the lead with 43% market share.  The main reason is Android being open source.
  • 8. Android Applications - Gist  Written in Java  Compiled to bytecode  Tool named dx converts bytecode to .dex code (Dalvik Executables)  Dex files are executed by Dalvik  Happily everafter :)
  • 9. Dalvik Virtual Machine  A register-based process virtual machine designed and written by Dan Bornstein  Usually called the JVM - #EpicFail  Dalvik operates on Dex code and not Java bytecode.  Aim of Dalvik is that it should run on  Slow CPU  Little RAM  OS without swap space  While powered by a battery
  • 10. Setting up the environment
  • 11. SQLite DB  What is SQLite?  SQL +Lite → 275 kb C Source code  Self Contained → Doesn't need external libraries  Serverless → Doesn't run as a separate process  Zero Configuration → SQLite Just works  Transactional → Satisfies ACID rules  http://www.sqlite.org/atomiccommit.html  Powers – Firefox, iPhones, Skype, Symbian  OPEN SOURCE :)  http://www.sqlite.org/download.html
  • 12. SQLite Queries and Datatypes  Queries (Demo)  Create  Read  Update  Delete  DataTypes - Five  NULL  INTEGER  REAL  TEXT  BLOB
  • 13. The Major differences No GRANT and REVOKE No ALTER TABLE No editable VIEWS No JOIN operation
  • 14. SQLite on Android  SQLiteOpenHelper  override the methods  onCreate() to create the database  OnUpgrade() to change the schema  provides the methods  DB Based  getReadableDatabase()  getWriteableDatabase()  Querying  rawQuery()  Query()  Cursor-based  getCount()  moveToFirst()  moveToNext()
  • 15. SQLiteDatabase - Demo  Schema → namelist [ id | name ]  Create & Upgrade  db.execSQL()  Insert, Update, Delete  db.insert()  db.update()  db.delete()  Read  db.rawQuery()
  • 17. Using APIs - OAuth  Social Networking sites are ruling us!  We use lots of third-party applications – are we secure?  OAuth to the rescue!  Oauth provides a method for users to grant third-party access to their resources without sharing the passwords.  Inspired from Google AuthSub,Yahoo BBAuth and Flickr API
  • 18. OAuth Logging into an application without the application knowing your username and password. TERMINOLOGY  Oauth's Love Triangle  Client  Server  Resource Owner
  • 19. Traditional Authentication Client uses its credential to access its resources hosted on the server.
  • 20. Oauth Authentication  The Resource Owner is the person using the web application.  Client is the Web Application itself
  • 21. Oauth Authentication  The client is split into Front-end and Back-end
  • 22. Oauth Specification http://hueniverse.com/oauth/guide/workflow/  Resource Owner – Jane  Client – Beppa  Server - Faji
  • 23. Three credentials  Client Credentials  Created when the Application was originally created  Temporary Credentials  Created when the Resource Owner has to authenticate himself to the server.  Server will say that the client is requesting access to private files.  Access Credentials  Used by client to access the private resources in the server.