SlideShare a Scribd company logo
Application Development
Overview on Android OS
Kanak & Pankaj
Overview/Design Guidelines
• A Mobile Operating System
• Uses a modified version of the Linux kernel
• Allows developers to write code in java language
• Third party application can be built using java and
android framework
Android 2.1 & Above
With
Eclipse IDE
Overview/Design Guidelines
What's in an App
Starting with the Project
Layouts & Screen Sizes
• FrameLayout
Layout that acts as a view frame to display a single object.
• LinearLayout
A layout that organizes its children into a single horizontal or vertical row. It creates
a scrollbar if the length of the window exceeds the length of the screen.
• RelativeLayout
Enables you to specify the location of child objects relative to each other (child A
to the left of child B) or to the parent (aligned to the top of the parent).
• ListView
Displays a scrolling single column list.
Common Layouts
• ScrollView
A vertically scrolling column of elements. Spinner Displays a single item at a time
from a bound list, inside a one-row textbox. Rather like a one-row
• TabHost
It provides a tab selection list that monitors clicks and enables the application to
change the screen whenever a tab is clicked.
• TableLayout
A tabular layout with an arbitrary number of rows and columns, each cell holding
the widget of your choice. The rows resize to fit the largest column. The cell
borders are not visible.
Layouts & Screen Sizes
Common Layouts
Layouts & Screen Sizes
Screen Sizes
Android runs on a variety of devices that offer different
screen sizes and densities
• xlarge screens are at least 960dp x 720dp
• large screens are at least 640dp x 480dp
• normal screens are at least 470dp x 320dp
• small screens are at least 426dp x 320dp
To support multiple screen size
• Explicitly declare in the manifest which screen sizes your application
supports
• Provide different layouts for different screen sizes
• Provide different bitmap drawables for different screen densities
Layouts & Screen Sizes
Screen Sizes
Manifest parameters for Screen sizes
<supports-screens android:resizeable=["true"| "false"]
android:smallScreens=["true" | "false"]
android:normalScreens=["true" | "false"]
android:largeScreens=["true" | "false"]
android:xlargeScreens=["true" | "false"]
android:anyDensity=["true" | "false"]
android:requiresSmallestWidthDp="integer"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>
Challenges faced while building
Naukri App
• Installing SDK for different Version of Android
• Choosing right IDE for development
• Using Spinner to choose value from the dropdown on runtime and from
set of array
• Calling spinner on clicking ImageView
• Choosing right layout to build XML
• Optimizing layout and making it re-usable
• Saving preferences
• Implementing multiple clicks on single activity
• Calling multiple activity for result on single activity
• Creating complete view on runtime
• Finishing activities correctly
Setting Up an Activity to set
background image and music
Background can contain image as well as music. Their time out can be handled
using simple threads in java.
Permissions Required –
<uses-permission android:name="android.permission.SET_WALLPAPER"></uses-
permission>
Setting up the Content View –
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.amazing);
}
Introduction to Media Player and Sound Pool –
MediaPlayer theSong = MediaPlayer.create(this, R.raw.uninvited);
theSong.start();
theSong.release();
Setting Up an Activity to set
background image and music
On pause Activity –
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
//theSong.stop(); // ---- this is same as Mediaplayer.release() the only
differnece is release method releases the other objects related to it and stop
method abruptly stops the object
theSong.release();
finish();
}
Creating a LIST/MENU and referencing
the selected Item
Extending ListActivity instead of Activity
Setting List –
ArrayAdapter<String> adapter = new ArrayAdapter<String>(MenuApp.this,
android.R.layout.simple_list_item_1, classes);
setListAdapter(adapter);
OnListItemClick()
Setting MenuKey –
MenuInflater blowUp = getMenuInflater();
blowUp.inflate(R.menu.cool_menu, menu);
OnOptionsItemSelected()
Setting Up buttons and text views
Button add = (Button) findViewById(R.id.bAdd);
Button sub = (Button) findViewById(R.id.bSub);
TextView display = (TextView) findViewById(R.id.tvDisplay);
Setting onClickListeners() for button clicks –
add.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
counter++;
display.setText("Your Total is: " + counter);
//display.setText(Integer.toString(counter));
}
});
Setting Up buttons and text views
sub.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
counter--;
display.setText("Your total is : " + counter);
}
});
SETTING UP A FORM WITH EDITBOXES
AND TOGGLE BUTTON AND
SIMPLE BUTTONS
final ToggleButton passTog = (ToggleButton) findViewById(R.id.tbPassword);
final EditText Name = (EditText) findViewById(R.id.etName);
final EditText MobNum = (EditText) findViewById(R.id.etMobileNumber);
final EditText EmailId = (EditText) findViewById(R.id.etEmailID);
final EditText Password = (EditText) findViewById(R.id.etPassword);
SETTING UP A FORM WITH EDITBOXES AND
TOGGLE BUTTON AND SIMPLE BUTTONS
Setting the input type for password field on the basis of toggle button-
passTog.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
if(passTog.isChecked()){
Password.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);
}else{
Password.setInputType(InputType.TYPE_CLASS_TEXT);
}
}
});
SETTING UP A FORM WITH EDITBOXES AND
TOGGLE BUTTON AND SIMPLE BUTTONS
Setting Alert Boxes –
new AlertDialog.Builder(TextActs.this)
.setMessage("Please fill in the valid email address,
mobile number and password should be minimum 6 characters long")
.setTitle("Validation Error")
.setCancelable(true)
.setNeutralButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton){}
})
.show();
SENDING AN EMAIL FROM APPLICATION
Permission Required –
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Setting Up Email intent –
String emailaddress[] = { emailAdd };
String message = “Some MEssage";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emailaddress);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "I hate you!");
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);
startActivity(emailIntent);
SAVING PREFERENCES
Preferences in Androids are like cookies on browsers which are saved in
the phone memory and can be accessed any time during the application.
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference android:title="Edit Text”android:key="name"
android:summary="Enter your name” />
<CheckBoxPreference android:title="Music” android:defaultValue="true"
android:key="checkbox” android:summary="for the start screen">
</CheckBoxPreference>
<ListPreference android:title="list” android:key="list” android:summary="Choose from”
android:entries="@array/list” android:entryValues="@array/lValues"
></ListPreference>
</PreferenceScreen>
Questions/Comments
?

More Related Content

What's hot

Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Five android architecture
Five android architectureFive android architecture
Five android architecture
Tomislav Homan
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
Ted Chien
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Raman Pandey
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Android application-component
Android application-componentAndroid application-component
Android application-component
Ly Haza
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
Vijay Rastogi
 
Training android
Training androidTraining android
Training android
University of Technology
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
Vyara Georgieva
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
Bhavya Siddappa
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
Vibrant Technologies & Computers
 
01 what is android
01 what is android01 what is android
01 what is android
C.o. Nieto
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
C.o. Nieto
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
Marko Gargenta
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
Fun2Do Labs
 
Android components
Android componentsAndroid components
Android components
NAVEENA ESWARAN
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tabSiva Kumar reddy Vasipally
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
Michael Angelo Rivera
 

What's hot (20)

Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Five android architecture
Five android architectureFive android architecture
Five android architecture
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
android layouts
android layoutsandroid layouts
android layouts
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
Training android
Training androidTraining android
Training android
 
Android studio 2.0: default project structure
Android studio 2.0: default project structureAndroid studio 2.0: default project structure
Android studio 2.0: default project structure
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
 
01 what is android
01 what is android01 what is android
01 what is android
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Android components
Android componentsAndroid components
Android components
 
01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tab
 
Android application development for TresmaxAsia
Android application development for TresmaxAsiaAndroid application development for TresmaxAsia
Android application development for TresmaxAsia
 

Similar to Application Development - Overview on Android OS

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
Siva Kumar reddy Vasipally
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
Jussi Pohjolainen
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
Yasin Yildirim
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
Ted Chien
 
Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptx
ABHIKKUMARDE
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_Engineering
ShivanshSeth6
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
Vivek Bhusal
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
angelicaurio
 
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
Vijay Rastogi
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
Joemarie Amparo
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
Junda Ong
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design
Rakesh Jha
 
Android classes in mumbai
Android classes in mumbaiAndroid classes in mumbai
Android classes in mumbai
Vibrant Technologies & Computers
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
anistar sung
 
Android programming basics
Android programming basicsAndroid programming basics
Android programming basics
Egerton University
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
Gil Irizarry
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfacesShih-Hsiang Lin
 
Chapter 5 - Layouts
Chapter 5 - LayoutsChapter 5 - Layouts
Chapter 5 - Layouts
Sittiphol Phanvilai
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developers
Darryl Bayliss
 

Similar to Application Development - Overview on Android OS (20)

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
 
Android
AndroidAndroid
Android
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptx
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_Engineering
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
 
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 Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
User experience and interactions design
User experience and interactions design User experience and interactions design
User experience and interactions design
 
Android classes in mumbai
Android classes in mumbaiAndroid classes in mumbai
Android classes in mumbai
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Android programming basics
Android programming basicsAndroid programming basics
Android programming basics
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
 
Chapter 5 - Layouts
Chapter 5 - LayoutsChapter 5 - Layouts
Chapter 5 - Layouts
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developers
 

Recently uploaded

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 

Recently uploaded (16)

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 

Application Development - Overview on Android OS

  • 1. Application Development Overview on Android OS Kanak & Pankaj
  • 2. Overview/Design Guidelines • A Mobile Operating System • Uses a modified version of the Linux kernel • Allows developers to write code in java language • Third party application can be built using java and android framework Android 2.1 & Above With Eclipse IDE
  • 5. Layouts & Screen Sizes • FrameLayout Layout that acts as a view frame to display a single object. • LinearLayout A layout that organizes its children into a single horizontal or vertical row. It creates a scrollbar if the length of the window exceeds the length of the screen. • RelativeLayout Enables you to specify the location of child objects relative to each other (child A to the left of child B) or to the parent (aligned to the top of the parent). • ListView Displays a scrolling single column list. Common Layouts
  • 6. • ScrollView A vertically scrolling column of elements. Spinner Displays a single item at a time from a bound list, inside a one-row textbox. Rather like a one-row • TabHost It provides a tab selection list that monitors clicks and enables the application to change the screen whenever a tab is clicked. • TableLayout A tabular layout with an arbitrary number of rows and columns, each cell holding the widget of your choice. The rows resize to fit the largest column. The cell borders are not visible. Layouts & Screen Sizes Common Layouts
  • 7. Layouts & Screen Sizes Screen Sizes Android runs on a variety of devices that offer different screen sizes and densities • xlarge screens are at least 960dp x 720dp • large screens are at least 640dp x 480dp • normal screens are at least 470dp x 320dp • small screens are at least 426dp x 320dp To support multiple screen size • Explicitly declare in the manifest which screen sizes your application supports • Provide different layouts for different screen sizes • Provide different bitmap drawables for different screen densities
  • 8. Layouts & Screen Sizes Screen Sizes Manifest parameters for Screen sizes <supports-screens android:resizeable=["true"| "false"] android:smallScreens=["true" | "false"] android:normalScreens=["true" | "false"] android:largeScreens=["true" | "false"] android:xlargeScreens=["true" | "false"] android:anyDensity=["true" | "false"] android:requiresSmallestWidthDp="integer" android:compatibleWidthLimitDp="integer" android:largestWidthLimitDp="integer"/>
  • 9. Challenges faced while building Naukri App • Installing SDK for different Version of Android • Choosing right IDE for development • Using Spinner to choose value from the dropdown on runtime and from set of array • Calling spinner on clicking ImageView • Choosing right layout to build XML • Optimizing layout and making it re-usable • Saving preferences • Implementing multiple clicks on single activity • Calling multiple activity for result on single activity • Creating complete view on runtime • Finishing activities correctly
  • 10. Setting Up an Activity to set background image and music Background can contain image as well as music. Their time out can be handled using simple threads in java. Permissions Required – <uses-permission android:name="android.permission.SET_WALLPAPER"></uses- permission> Setting up the Content View – protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.amazing); } Introduction to Media Player and Sound Pool – MediaPlayer theSong = MediaPlayer.create(this, R.raw.uninvited); theSong.start(); theSong.release();
  • 11. Setting Up an Activity to set background image and music On pause Activity – @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); //theSong.stop(); // ---- this is same as Mediaplayer.release() the only differnece is release method releases the other objects related to it and stop method abruptly stops the object theSong.release(); finish(); }
  • 12. Creating a LIST/MENU and referencing the selected Item Extending ListActivity instead of Activity Setting List – ArrayAdapter<String> adapter = new ArrayAdapter<String>(MenuApp.this, android.R.layout.simple_list_item_1, classes); setListAdapter(adapter); OnListItemClick() Setting MenuKey – MenuInflater blowUp = getMenuInflater(); blowUp.inflate(R.menu.cool_menu, menu); OnOptionsItemSelected()
  • 13. Setting Up buttons and text views Button add = (Button) findViewById(R.id.bAdd); Button sub = (Button) findViewById(R.id.bSub); TextView display = (TextView) findViewById(R.id.tvDisplay); Setting onClickListeners() for button clicks – add.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub counter++; display.setText("Your Total is: " + counter); //display.setText(Integer.toString(counter)); } });
  • 14. Setting Up buttons and text views sub.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub counter--; display.setText("Your total is : " + counter); } });
  • 15. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS final ToggleButton passTog = (ToggleButton) findViewById(R.id.tbPassword); final EditText Name = (EditText) findViewById(R.id.etName); final EditText MobNum = (EditText) findViewById(R.id.etMobileNumber); final EditText EmailId = (EditText) findViewById(R.id.etEmailID); final EditText Password = (EditText) findViewById(R.id.etPassword);
  • 16. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS Setting the input type for password field on the basis of toggle button- passTog.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub if(passTog.isChecked()){ Password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); }else{ Password.setInputType(InputType.TYPE_CLASS_TEXT); } } });
  • 17. SETTING UP A FORM WITH EDITBOXES AND TOGGLE BUTTON AND SIMPLE BUTTONS Setting Alert Boxes – new AlertDialog.Builder(TextActs.this) .setMessage("Please fill in the valid email address, mobile number and password should be minimum 6 characters long") .setTitle("Validation Error") .setCancelable(true) .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton){} }) .show();
  • 18. SENDING AN EMAIL FROM APPLICATION Permission Required – <uses-permission android:name="android.permission.INTERNET"></uses-permission> Setting Up Email intent – String emailaddress[] = { emailAdd }; String message = “Some MEssage"; Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, emailaddress); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "I hate you!"); emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message); startActivity(emailIntent);
  • 19. SAVING PREFERENCES Preferences in Androids are like cookies on browsers which are saved in the phone memory and can be accessed any time during the application. <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <EditTextPreference android:title="Edit Text”android:key="name" android:summary="Enter your name” /> <CheckBoxPreference android:title="Music” android:defaultValue="true" android:key="checkbox” android:summary="for the start screen"> </CheckBoxPreference> <ListPreference android:title="list” android:key="list” android:summary="Choose from” android:entries="@array/list” android:entryValues="@array/lValues" ></ListPreference> </PreferenceScreen>