SlideShare a Scribd company logo
Google AndroidFafadia TechRohanBomle(rohan@fafadia-tech.com)
AndroidWhat is Android?A software platform and operating system for mobile devices
Based on the Linux kernel
Developed by Google and later the Open Handset Alliance (OHA)
Allows writing managed code in the Java language
C/C++ also possible but not supportedIDE and ToolsAndroid SDKClass Library
Developer Tools
dx – Dalvik Cross-Assembler
aapt – Android Asset Packaging Tool
adb – Android Debug Bridge
ddms – Dalvik Debug Monitor Service
Emulator and System Images
Documentation and Sample CodeEclipse IDE + ADT (Android Development Tools)Reduces Development and Testing Time
Makes User Interface-Creation easier
Makes Application Description EasierHow to install ADT in EclipseStart Eclipse, then select Help > Software Updates > Find and Install.... In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/. Press OK.You should now see the new site added to the search list (and checked). Press Finish.In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next. Press Finish.The ADT plugin is not signed; you can accept the installation anyway by pressing Install All. Restart Eclipse.
Android applications have common structureActivity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activityIntents specify what specific action should be performedServices run in the background and have no UI for the user – they will update data, and trigger events
There is a common file structure for applicationscodeAutogenerated resource listfilesimagesUI layoutsconstants
Standard components form building blocks for Android appsNotificationsHas life-cycleActivityscreenViewsApp to handle contentIntentsBackground appLike music playerServicemanifestContentProvidersOther applications
Simple Android Application (java program)package com.google.android.helloactivity;import android.app.Activity;import android.os.Bundle;public class HelloActivity extends Activity {    public HelloActivity() {    }	@Override    public void onCreate(Bundle icicle) {super.onCreate(icicle);setContentView(R.layout.hello_activity);    }}
The AndroidManifest lists application details<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"    package="com.my_domain.app.helloactivity">    <application android:label="@string/app_name">        <activity android:name=".HelloActivity">            <intent-filter>                <action android:name="android.intent.action.MAIN"/>                <category android:name="android.intent.category.LAUNCHER"/>            </intent-filter>        </activity>    </application>
main.xml <?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:background="#000044"><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello"/></LinearLayout>
Creating and Running simple HelloWorld applicationTo create a new project:	1. Start Eclipse	2. Select File > New > Project.	3. Select Android > Android Project,	    and click Next.	4. Enter Project name: HelloWorld.	5. Select Target Android 1.5.	6. Application name: Hello.	7. Package name: fafadia.tech.	8. Create Activity: HelloWorld.	9. Min SDK Version: 3.	10. Click Finish.
Creating HelloWorld.javapackage matos.demo;import android.app.Activity;import android.widget.Toast;public class HelloWorldextends Activity {	/** Called when the activity is first created. */	@Override	public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);Toast.makeText(getBaseContext(),“Wlecome to Hello				World”,Toast.LENGTH_SHORT).show();		}}

More Related Content

What's hot (20)

PDF
Android L08 - Google Maps and Utilities
Mohammad Shaker
 
PDF
TDC2016SP - Trilha Android
tdc-globalcode
 
ODP
Android training day 2
Vivek Bhusal
 
ODP
Android training day 5
Vivek Bhusal
 
ODP
Android training day 4
Vivek Bhusal
 
PDF
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
wesley chun
 
PDF
KOIN for dependency Injection
Kirill Rozov
 
PDF
Angular2: Quick overview with 2do app example
Alexey Frolov
 
PDF
Angular 2 introduction
Christoffer Noring
 
PDF
Android L02 - Activities and Adapters
Mohammad Shaker
 
PDF
Sharper Better Faster Dagger ‡ - Droidcon SF
Pierre-Yves Ricau
 
PPTX
Android chapter02-setup1-sdk
Tran Le Hoan
 
PPTX
Angular mix chrisnoring
Christoffer Noring
 
PPT
Getting started with android dev and test perspective
Gunjan Kumar
 
PDF
My way to clean android v2 English DroidCon Spain
Christian Panadero
 
PDF
20110525[Taipei GTUG] titanium mobile簡介
Justin Lee
 
PPTX
Android Tutorials - Powering with Selection Widget
Prajyot Mainkar
 
PPT
Google Web Toolkit
Christos Stathis
 
PPT
Dojo and Adobe AIR
Nikolai Onken
 
PDF
My way to clean android V2
Christian Panadero
 
Android L08 - Google Maps and Utilities
Mohammad Shaker
 
TDC2016SP - Trilha Android
tdc-globalcode
 
Android training day 2
Vivek Bhusal
 
Android training day 5
Vivek Bhusal
 
Android training day 4
Vivek Bhusal
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
wesley chun
 
KOIN for dependency Injection
Kirill Rozov
 
Angular2: Quick overview with 2do app example
Alexey Frolov
 
Angular 2 introduction
Christoffer Noring
 
Android L02 - Activities and Adapters
Mohammad Shaker
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Pierre-Yves Ricau
 
Android chapter02-setup1-sdk
Tran Le Hoan
 
Angular mix chrisnoring
Christoffer Noring
 
Getting started with android dev and test perspective
Gunjan Kumar
 
My way to clean android v2 English DroidCon Spain
Christian Panadero
 
20110525[Taipei GTUG] titanium mobile簡介
Justin Lee
 
Android Tutorials - Powering with Selection Widget
Prajyot Mainkar
 
Google Web Toolkit
Christos Stathis
 
Dojo and Adobe AIR
Nikolai Onken
 
My way to clean android V2
Christian Panadero
 

Similar to Introduction To Google Android (Ft Rohan Bomle) (20)

PPT
21 android2 updated
GhanaGTUG
 
ODP
Geekcamp Android
Hean Hong Leong
 
PPT
Android Tutorial
Fun2Do Labs
 
PPTX
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Jim Tochterman
 
PPT
Intro to Android Programming
Peter van der Linden
 
PPT
Industrial Training in Android Application
Arcadian Learning
 
PPTX
Android
Keshan Sodimana
 
PPT
Android activity, service, and broadcast recievers
Utkarsh Mankad
 
PPTX
Mobile App Development: Primi passi con NativeScript e Angular 2
Filippo Matteo Riggio
 
KEY
Android Workshop
Junda Ong
 
PPT
Android classes in mumbai
Vibrant Technologies & Computers
 
PPTX
Android Tutorials : Basic widgets
Prajyot Mainkar
 
PDF
Android Intro
Justin Grammens
 
PPT
Developing in android
Christopher Decker
 
PDF
android level 3
DevMix
 
PPTX
Android OS & SDK - Getting Started
Hemant Chhapoliya
 
PDF
Android tutorial
Abid Khan
 
PPT
Android
Jesus_Aguirre
 
PPT
Synapseindia android apps intro to android development
Synapseindiappsdevelopment
 
PPT
Android tutorial
katayoon_bz
 
21 android2 updated
GhanaGTUG
 
Geekcamp Android
Hean Hong Leong
 
Android Tutorial
Fun2Do Labs
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Jim Tochterman
 
Intro to Android Programming
Peter van der Linden
 
Industrial Training in Android Application
Arcadian Learning
 
Android activity, service, and broadcast recievers
Utkarsh Mankad
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Filippo Matteo Riggio
 
Android Workshop
Junda Ong
 
Android classes in mumbai
Vibrant Technologies & Computers
 
Android Tutorials : Basic widgets
Prajyot Mainkar
 
Android Intro
Justin Grammens
 
Developing in android
Christopher Decker
 
android level 3
DevMix
 
Android OS & SDK - Getting Started
Hemant Chhapoliya
 
Android tutorial
Abid Khan
 
Android
Jesus_Aguirre
 
Synapseindia android apps intro to android development
Synapseindiappsdevelopment
 
Android tutorial
katayoon_bz
 
Ad

Recently uploaded (20)

PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
The Future of Artificial Intelligence (AI)
Mukul
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Ad

Introduction To Google Android (Ft Rohan Bomle)

  • 2. AndroidWhat is Android?A software platform and operating system for mobile devices
  • 3. Based on the Linux kernel
  • 4. Developed by Google and later the Open Handset Alliance (OHA)
  • 5. Allows writing managed code in the Java language
  • 6. C/C++ also possible but not supportedIDE and ToolsAndroid SDKClass Library
  • 8. dx – Dalvik Cross-Assembler
  • 9. aapt – Android Asset Packaging Tool
  • 10. adb – Android Debug Bridge
  • 11. ddms – Dalvik Debug Monitor Service
  • 13. Documentation and Sample CodeEclipse IDE + ADT (Android Development Tools)Reduces Development and Testing Time
  • 15. Makes Application Description EasierHow to install ADT in EclipseStart Eclipse, then select Help > Software Updates > Find and Install.... In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/. Press OK.You should now see the new site added to the search list (and checked). Press Finish.In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next. Press Finish.The ADT plugin is not signed; you can accept the installation anyway by pressing Install All. Restart Eclipse.
  • 16. Android applications have common structureActivity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activityIntents specify what specific action should be performedServices run in the background and have no UI for the user – they will update data, and trigger events
  • 17. There is a common file structure for applicationscodeAutogenerated resource listfilesimagesUI layoutsconstants
  • 18. Standard components form building blocks for Android appsNotificationsHas life-cycleActivityscreenViewsApp to handle contentIntentsBackground appLike music playerServicemanifestContentProvidersOther applications
  • 19. Simple Android Application (java program)package com.google.android.helloactivity;import android.app.Activity;import android.os.Bundle;public class HelloActivity extends Activity { public HelloActivity() { } @Override public void onCreate(Bundle icicle) {super.onCreate(icicle);setContentView(R.layout.hello_activity); }}
  • 20. The AndroidManifest lists application details<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my_domain.app.helloactivity"> <application android:label="@string/app_name"> <activity android:name=".HelloActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application>
  • 21. main.xml <?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:background="#000044"><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello"/></LinearLayout>
  • 22. Creating and Running simple HelloWorld applicationTo create a new project: 1. Start Eclipse 2. Select File > New > Project. 3. Select Android > Android Project, and click Next. 4. Enter Project name: HelloWorld. 5. Select Target Android 1.5. 6. Application name: Hello. 7. Package name: fafadia.tech. 8. Create Activity: HelloWorld. 9. Min SDK Version: 3. 10. Click Finish.
  • 23. Creating HelloWorld.javapackage matos.demo;import android.app.Activity;import android.widget.Toast;public class HelloWorldextends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);Toast.makeText(getBaseContext(),“Wlecome to Hello World”,Toast.LENGTH_SHORT).show(); }}
  • 24. Run HelloWorld applicationTo run android application 1.Run 2.Run > Select Android Application 3. Press ok
  • 25. Adding more UI components to your applicationThere are to ways to add your UI componentsThrough coding (java code)Or defining in main.xmlXml codeJava codeTextViewtv = new TextView();Tv.setText(“Hello”);<TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" />
  • 26. Lets create a same application with UI componentspackage org.HelloWorld.com;import android.app.Activity;import android.os.Bundle;import android.widget.LinearLayout;import android.widget.ScrollView;public class HelloWorld extends Activity {public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);// setContentView(R.layout.main);ScrollViewsv = new ScrollView(this);LinearLayoutll = new LinearLayout(this);ll.setOrientation(LinearLayout.VERTICAL);sv.addView(ll);this.setContentView(sv); }}
  • 27. Adding components to Layoutfinal TextViewtv = new TextView(this);tv.setText(“Text Box");tv.setTextSize(20);tv.setTextColor(Color.BLACK);ll.addView(tv);Button b1 = new Button(this); b1.setText("Submit"); b1.setTextSize(15);ll.addView(b1); b1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {tv.setText(“Submit button Clicked”); });
  • 29. Creating simple database applicationFirst we create a simple class which create a database, table. And the we perform insert and select query on table.Android uses SQLite for its database needs. SQLite is a very fast and lightweight database.Create New Project as MYDatabase and in that create new file named it as create_database.java.Import two files import android.database.Cursor;importandroid.database.sqlite.SQLiteDatabase;
  • 30. Create_database filepackage org.example.mydatabase;import android.app.Activity;import android.database.Cursor;import android.database.sqlite.SQLiteDatabase;import android.os.Bundle;import android.util.Log;import android.widget.TextView;public class create_database extends Activity { public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);super.onCreate(savedInstanceState);SQLiteDatabasemyDB= null; String TableName = "myTable"; String Data="";
  • 31. /* Create a Database. */ try {myDB = this.openOrCreateDatabase("DatabaseName", MODE_PRIVATE, null); /* Create a Table in the Database. */myDB.execSQL("CREATE TABLE IF NOT EXISTS “+ TableName + " (Field1 VARCHAR, Field2 INT(3));"); /* Insert data to a Table*/myDB.execSQL("INSERT INTO “ + TableName+ " (Field1, Field2)" + " VALUES ('katrina', 25);"); /*retrieve data from database */ Cursor c = myDB.rawQuery("SELECT * FROM " + TableName , null);int Column1 = c.getColumnIndex("Field1");int Column2 = c.getColumnIndex("Field2"); // Check if our result was valid.c.moveToFirst();
  • 32. if (c != null) { // Loop through all Results do { String Name = c.getString(Column1);int Age = c.getInt(Column2); Data =Data +Name+"/"+Age+"\n"; }while(c.moveToNext());}TextViewtv = new TextView(this);tv.setText(Data);setContentView(tv); }//end trycatch(Exception e) { System.out.println("Error", "Error", e);} finally { if (myDB != null) myDB.close(); } }}