Mobile InnovationsProf. Erwin M. Globio, MSIT
APP–Market FitPLATFORM (Android, Bada, Java, Symbian, Maemo, Blackberry; phone exclusive or open)PHONE BRAND (Samsung, Nokia, Sony, LG, BB, ?)PHONE TYPE (Feature phone, Smartphone)TELCOPLANS (variability of cost structures: voice ; text; data per-kb, per-hr)USERS (who, using which phone, on which telco or plan?)
Criteria for Good AppsWell-defined target market; (link to intangible qualities)Functionality: runs successfully and with ease on Android mobile phones, does what it’s supposed to do; Uniqueness in its application; doing something out of the common Creativity in design and in the use of available technologies( UI, graphics, etc)Usefulness in addressing users’ needs and problems, with high potential for adoption by customers Usability, interface and navigation designed for ease and comfort of userPlatform and modular design.
Intangible Qualities of Good ProductsWhat is its magnet – why will it attract the user?What is its anchor – what will hold the user to it?Does it have a profit engine for the user – will it make the relationship pay?How is it spiced it up to make for a satisfying customer experience?
Business ModelsSale of appShare of telco billings (voice, text, data)Subscription (per-use, per month)% of salesSponsorship or ads(Paid web hosting – service provider or cloud)
Introduction to Android DevelopmentFull of potential to be utilized
Topics to be discussed...Introduction to the Android PlatformOverview of the Android SDK in EclipseWorking with the User InterfaceWorking with Data StorageSharing information between applicationsNetworkingAdvance phone featuresPublishing applicationsBest Practices
Topics to be discussed...Introduction to the Android PlatformOverview of the Android SDK in EclipseWorking with the User Interface
What is Android?Android is a software stack for mobile devices  that includes an operating system, middleware and key applications.
What are the features of Android?Application frameworkDalvik virtual machineIntegrated browserOptimized graphicsSQLiteMedia supportGSM TelephonyBluetooth, EDGE, 3G, and WiFiCamera, GPS, compass, and accelerometerRich development environment
Android Architecture
Working with Android Development Tools (ADT)The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment. It gives you access to other Android development tools from inside the Eclipse IDE. It provides a New Project Wizard It automates and simplifies the process of building your Android application. It provides an Android code editor that helps you write valid XML for your Android manifest and resource files. It will even export your project into a signed APK, which can be distributed to users.
Installing ADTTo install in Eclipse 3.5 (Galileo)Start Eclipse, then select Help> Install New SoftwareIn the Available Software dialog, click Add....In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.Enter location https://dl-ssl.google.com/android/eclipse/Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Nextto read and accept the license agreement and install any dependencies, then click Finish. Restart Eclipse.
What do you get?
Working with Eclipse (New Project)
Working with Eclipse (New Project)
Working with Eclipse (New AVD)
Application Fundamentals Applications are written using Java The Android Asset Packaging Tool generates apk (Android Package) files containing the code and any data and resources needed Each application runs in its own Linux process Each application has its own VM Each application has its own user id, permissions are set accordingly
Application Components A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it) Android applications don't have a single entry point for everything in the application (no main() function, for example) They have essential components that the system can instantiate and run as needed
Application ComponentsActivities - An activity presents a visual user interface for one focused endeavor the user can undertake. Services - A service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time. Broadcast Receivers - A broadcast receiver is a component that does nothing but receive and react to broadcast announcements Content Providers - A content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. Intent - An intent is an Intent object that holds the content of the message
Let’s create our first application
The Application Manifest
The Application Manifest
The Application Manifest
The Application Manifest
The Application Manifest
Looking at the project (Strings.xml)
Looking at the project Layout(main.xml)
Looking at the project (main.java)
Starting with an ActivityThe main starting point of most applicationsThere is no concept of “main” programEach activity can be executed or invoked at any timeOne application can have multiple “activities”An example of acrivity would be “Searching for an application in the store”An Activity can have several “Views” or “View Groups” to define its user inteface.
Activity Lifecycle
Activity Sourcepackage org.feueac.android;import android.app.Activity;import android.os.Bundle;publicclass Main extends Activity {	@Overridepublicvoid onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);        setContentView(R.layout.main);    }}
What is R.layout.main?<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    ><TextView      android:layout_width="fill_parent"    android:layout_height="wrap_content"    android:text="@string/hello"    /></LinearLayout>
Views in an ActivityThe user interface is built using View  and ViewGroup objectsBasic units of user interface expression on the Android platform View class serves as the base for subclasses ViewGroupclass serves as the base for subclasses called "layouts"
View HierarchyActivity must call the setContentView()
The different layoutsLinear LayoutRelative LayoutTable LayoutGrid ViewTab LayoutList View
Handling Events in an Activitypublic class main extends Activity implements OnClickListenerButton myButton = (Button) findViewById(R.id.hello_button);myButton.setOnClickListener(this);@Overridepublic void onClick(View v) {}

Introduction to Android Development

  • 1.
  • 2.
    APP–Market FitPLATFORM (Android,Bada, Java, Symbian, Maemo, Blackberry; phone exclusive or open)PHONE BRAND (Samsung, Nokia, Sony, LG, BB, ?)PHONE TYPE (Feature phone, Smartphone)TELCOPLANS (variability of cost structures: voice ; text; data per-kb, per-hr)USERS (who, using which phone, on which telco or plan?)
  • 3.
    Criteria for GoodAppsWell-defined target market; (link to intangible qualities)Functionality: runs successfully and with ease on Android mobile phones, does what it’s supposed to do; Uniqueness in its application; doing something out of the common Creativity in design and in the use of available technologies( UI, graphics, etc)Usefulness in addressing users’ needs and problems, with high potential for adoption by customers Usability, interface and navigation designed for ease and comfort of userPlatform and modular design.
  • 4.
    Intangible Qualities ofGood ProductsWhat is its magnet – why will it attract the user?What is its anchor – what will hold the user to it?Does it have a profit engine for the user – will it make the relationship pay?How is it spiced it up to make for a satisfying customer experience?
  • 5.
    Business ModelsSale ofappShare of telco billings (voice, text, data)Subscription (per-use, per month)% of salesSponsorship or ads(Paid web hosting – service provider or cloud)
  • 6.
    Introduction to AndroidDevelopmentFull of potential to be utilized
  • 7.
    Topics to bediscussed...Introduction to the Android PlatformOverview of the Android SDK in EclipseWorking with the User InterfaceWorking with Data StorageSharing information between applicationsNetworkingAdvance phone featuresPublishing applicationsBest Practices
  • 8.
    Topics to bediscussed...Introduction to the Android PlatformOverview of the Android SDK in EclipseWorking with the User Interface
  • 9.
    What is Android?Androidis a software stack for mobile devices that includes an operating system, middleware and key applications.
  • 10.
    What are thefeatures of Android?Application frameworkDalvik virtual machineIntegrated browserOptimized graphicsSQLiteMedia supportGSM TelephonyBluetooth, EDGE, 3G, and WiFiCamera, GPS, compass, and accelerometerRich development environment
  • 11.
  • 12.
    Working with AndroidDevelopment Tools (ADT)The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment. It gives you access to other Android development tools from inside the Eclipse IDE. It provides a New Project Wizard It automates and simplifies the process of building your Android application. It provides an Android code editor that helps you write valid XML for your Android manifest and resource files. It will even export your project into a signed APK, which can be distributed to users.
  • 13.
    Installing ADTTo installin Eclipse 3.5 (Galileo)Start Eclipse, then select Help> Install New SoftwareIn the Available Software dialog, click Add....In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.Enter location https://dl-ssl.google.com/android/eclipse/Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Nextto read and accept the license agreement and install any dependencies, then click Finish. Restart Eclipse.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
    Application Fundamentals Applicationsare written using Java The Android Asset Packaging Tool generates apk (Android Package) files containing the code and any data and resources needed Each application runs in its own Linux process Each application has its own VM Each application has its own user id, permissions are set accordingly
  • 19.
    Application Components Acentral feature of Android is that one application can make use of elements of other applications (provided those applications permit it) Android applications don't have a single entry point for everything in the application (no main() function, for example) They have essential components that the system can instantiate and run as needed
  • 20.
    Application ComponentsActivities -An activity presents a visual user interface for one focused endeavor the user can undertake. Services - A service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time. Broadcast Receivers - A broadcast receiver is a component that does nothing but receive and react to broadcast announcements Content Providers - A content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. Intent - An intent is an Intent object that holds the content of the message
  • 21.
    Let’s create ourfirst application
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
    Looking at theproject (Strings.xml)
  • 28.
    Looking at theproject Layout(main.xml)
  • 29.
    Looking at theproject (main.java)
  • 30.
    Starting with anActivityThe main starting point of most applicationsThere is no concept of “main” programEach activity can be executed or invoked at any timeOne application can have multiple “activities”An example of acrivity would be “Searching for an application in the store”An Activity can have several “Views” or “View Groups” to define its user inteface.
  • 31.
  • 32.
    Activity Sourcepackage org.feueac.android;importandroid.app.Activity;import android.os.Bundle;publicclass Main extends Activity { @Overridepublicvoid onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState); setContentView(R.layout.main); }}
  • 33.
    What is R.layout.main?<?xmlversion="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" ><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
  • 34.
    Views in anActivityThe user interface is built using View and ViewGroup objectsBasic units of user interface expression on the Android platform View class serves as the base for subclasses ViewGroupclass serves as the base for subclasses called "layouts"
  • 35.
    View HierarchyActivity mustcall the setContentView()
  • 36.
    The different layoutsLinearLayoutRelative LayoutTable LayoutGrid ViewTab LayoutList View
  • 37.
    Handling Events inan Activitypublic class main extends Activity implements OnClickListenerButton myButton = (Button) findViewById(R.id.hello_button);myButton.setOnClickListener(this);@Overridepublic void onClick(View v) {}