SlideShare a Scribd company logo
1 of 26
Developing Android Apps
FOR FUN!
CLAIRE HYUNJUNG LEE
Contens
 Getting Started
 Activity and Fragment
 Start Your Own Project
 Bug and Trouble Shooting
Getting Started
 Installing Android Studio and SDK
https://developer.android.com/sdk/index.html
Getting Started
 Installing JDK
http://www.oracle.com/technetwork/jav
a/javase/downloads/jdk7-downloads-
1880260.html
Getting Started
 Create New Project
 Let’s start your own project
Getting Started
 Create New Project
 Target your application to devices and Download SDK
 http://developer.android.com/about/dashboards/index.html?utm_source=ud
acity&utm_medium=mooc&utm_term=android&utm_content=platform_distribu
tion&utm_campaign=training
Getting Started
 Create New Project
 What is Activity?
 What is Fragment?
Activity & Fragment
 What is Activity?
http://developer.android.com/reference/
android/app/Activity.html
 Activity Lifecycle
Activity & Fragment
 What is Activity?
http://developer.android.com/reference/
android/app/Activity.html
 Activity Lifecycle
public class Activity extends ApplicationContext {
protected void onCreate(Bundle savedInstanceState);
protected void onStart();
protected void onRestart();
protected void onResume();
protected void onPause();
protected void onStop();
protected void onDestroy();
}
Activity & Fragment
 What is Activity?
http://developer.android.com/reference/
android/app/Activity.html
 Starting Activities and Getting Results
public class MyActivity extends Activity {
...
static final int PICK_CONTACT_REQUEST = 0;
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
// When the user center presses, let them pick a contact.
startActivityForResult(
new Intent(Intent.ACTION_PICK,
new Uri("content://contacts")),
PICK_CONTACT_REQUEST);
return true;
}
return false;
}
protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (requestCode == PICK_CONTACT_REQUEST) {
if (resultCode == RESULT_OK) {
// A contact was picked. Here we will just display it
// to the user.
startActivity(new Intent(Intent.ACTION_VIEW, data));
}
}
}
}
Activity & Fragment
 What is Fragment?
http://developer.android.com/guide/components/fragments.html
Activity & Fragment
 What is Fragment?
http://developer.androi
d.com/guide/compon
ents/fragments.html
Activity & Fragment
 What is Fragment?
http://developer.android.com/guide/components/fragments.html
 For example, here's a subclass of Fragment that loads a layout from the example_fragment.xml file:
public static class ExampleFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.example_fragment, container, false);
}
}
Activity & Fragment
 What is Fragment?
http://developer.android.co
m/guide/components/fragm
ents.html
 Declare the fragment inside
the activity’s layout file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:name="com.example.news.ArticleListFragment"
android:id="@+id/list"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent" />
<fragment
android:name="com.example.news.ArticleReaderFragment"
android:id="@+id/viewer"
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="match_parent" />
</LinearLayout>
Activity & Fragment
 What is Fragment? http://developer.android.com/guide/components/fragments.html
 Or, programmatically add the fragment to an existing ViewGroup
 To make fragment transactions in your activity (such as add, remove, or replace a fragment),
you must use APIs from FragmentTransaction. You can get an instance
of FragmentTransaction from your Activitylike this:
 You can then add a fragment using the add() method, specifying the fragment to add and the
view in which to insert it. For example:
FragmentManager fragmentManager = getFragmentManager()
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
ExampleFragment fragment = new ExampleFragment();
fragmentTransaction.add(R.id.fragment_container, fragment);
fragmentTransaction.commit();
Activity & Fragment
 What is Fragment? http://developer.android.com/guide/components/fragments.html
Start your own project
 You have your own project!
Bug & Trouble Shooting
 Problems Installing HAXM
Bug & Trouble Shooting
 How to Solve
 Here’s some cases that you can solve this problem on Intel website
 https://software.intel.com/en-us/android/articles/installation-instructions-for-
intel-hardware-accelerated-execution-manager-windows
 In this case, Execute Disable was disabled in the system BIOS.
Bug & Trouble Shooting
 Problem Resizing Android Emulator on
Windows 8.1
 AVD is out of view on Windows
Bug & Trouble Shooting
 How to Solve It on Android Studio
 Click Run
 Edit Configurations
 General Tab
 Choose Emulator and AVD
Bug & Trouble Shooting
 How to Solve It on Android Studio
 Click Emulator Tab
 Write –scale 0.x ( In this case, 0.4
was suitable )
Bug & Trouble Shooting
 How to Solve It by Using Telnet
 Click Control Panel
 Go to Programs
 Turn Windows features on or off
Bug & Trouble Shooting
 How to Solve it by Using Telnet
 Run your application on Android Virtual
Device
 Run CMD in Windows
 Write cd/ to go back to C drive directory
 Use the command ‘telnet localhost
5554’ to connect Android Emulator
Bug & Trouble Shooting
 How to Solve it by Using Telnet
 Use the command ‘help’ to see the
Android console command list
 Use the command ‘window scale 0.x’
To be Continue
AUGUST 2015

More Related Content

What's hot

Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Daniel Knott
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile wayAshwin Raghav
 
Utilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidUtilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidEduardo Carrara de Araujo
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGapDoncho Minkov
 
Testing Android App Bundle with Appium
Testing Android App Bundle with AppiumTesting Android App Bundle with Appium
Testing Android App Bundle with AppiumMasayuki Wakizaka
 
Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Johnny Sung
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studioParinita03
 
Instrumentation 101
Instrumentation 101Instrumentation 101
Instrumentation 101Apkudo
 
Being Epic: Best Practices for Android Development
Being Epic: Best Practices for Android DevelopmentBeing Epic: Best Practices for Android Development
Being Epic: Best Practices for Android DevelopmentReto Meier
 
Ayw app inventor
Ayw app inventorAyw app inventor
Ayw app inventorpbeerak
 
Testing Sucks, But It Doesn't Have To
Testing Sucks, But It Doesn't Have ToTesting Sucks, But It Doesn't Have To
Testing Sucks, But It Doesn't Have ToApkudo
 
Daniel Neumann Project Experience
Daniel Neumann Project ExperienceDaniel Neumann Project Experience
Daniel Neumann Project ExperienceDaniel Neumann, PhD
 
Rapid Android Development for Hackathon
Rapid Android Development for HackathonRapid Android Development for Hackathon
Rapid Android Development for HackathonCodePolitan
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingSarah Elson
 
Startup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and runningStartup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and runningLance Nanek
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Svetlin Nakov
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialmaster760
 

What's hot (20)

Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile way
 
techSocAndroid1
techSocAndroid1techSocAndroid1
techSocAndroid1
 
Utilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps AndroidUtilizando Espresso e UIAutomator no Teste de Apps Android
Utilizando Espresso e UIAutomator no Teste de Apps Android
 
Summary Of Polycom Cast App
Summary Of Polycom Cast AppSummary Of Polycom Cast App
Summary Of Polycom Cast App
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGap
 
Testing Android App Bundle with Appium
Testing Android App Bundle with AppiumTesting Android App Bundle with Appium
Testing Android App Bundle with Appium
 
Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Instrumentation 101
Instrumentation 101Instrumentation 101
Instrumentation 101
 
Being Epic: Best Practices for Android Development
Being Epic: Best Practices for Android DevelopmentBeing Epic: Best Practices for Android Development
Being Epic: Best Practices for Android Development
 
Ayw app inventor
Ayw app inventorAyw app inventor
Ayw app inventor
 
Testing Sucks, But It Doesn't Have To
Testing Sucks, But It Doesn't Have ToTesting Sucks, But It Doesn't Have To
Testing Sucks, But It Doesn't Have To
 
Daniel Neumann Project Experience
Daniel Neumann Project ExperienceDaniel Neumann Project Experience
Daniel Neumann Project Experience
 
Rapid Android Development for Hackathon
Rapid Android Development for HackathonRapid Android Development for Hackathon
Rapid Android Development for Hackathon
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testing
 
Startup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and runningStartup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and running
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021
 
Android studio
Android studioAndroid studio
Android studio
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 

Viewers also liked

Research paper on "Android 4.1 Jellybean OS"
Research paper on "Android 4.1 Jellybean OS"Research paper on "Android 4.1 Jellybean OS"
Research paper on "Android 4.1 Jellybean OS"Bijaya Litigoner
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar reportdgpune
 
Udacity 2105, pdf
Udacity 2105, pdfUdacity 2105, pdf
Udacity 2105, pdfSIQI LI
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating systemSalma Begum
 
Android College Application Project Report
Android College Application Project ReportAndroid College Application Project Report
Android College Application Project Reportstalin george
 

Viewers also liked (9)

Research paper on "Android 4.1 Jellybean OS"
Research paper on "Android 4.1 Jellybean OS"Research paper on "Android 4.1 Jellybean OS"
Research paper on "Android 4.1 Jellybean OS"
 
Android 4.1 Jellybean OS
Android 4.1 Jellybean OSAndroid 4.1 Jellybean OS
Android 4.1 Jellybean OS
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar report
 
Udacity 2105, pdf
Udacity 2105, pdfUdacity 2105, pdf
Udacity 2105, pdf
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating system
 
Android College Application Project Report
Android College Application Project ReportAndroid College Application Project Report
Android College Application Project Report
 
Android report
Android reportAndroid report
Android report
 

Similar to Developing Android Apps

Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011sullis
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial pptRehna Renu
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android ApplicationArcadian Learning
 
Methods to set up android app development environment
Methods to set up android app development environmentMethods to set up android app development environment
Methods to set up android app development environmentastoria0128
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialDanish_k
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxlancelotlaytan1996
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hourssjmarsh
 
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
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCPwhbath
 
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Joke Puts
 

Similar to Developing Android Apps (20)

Android
AndroidAndroid
Android
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 
Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial ppt
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Industrial Training in Android Application
Industrial Training in Android ApplicationIndustrial Training in Android Application
Industrial Training in Android Application
 
Methods to set up android app development environment
Methods to set up android app development environmentMethods to set up android app development environment
Methods to set up android app development environment
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Module-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptxModule-I_Introduction-to-Android.pptx
Module-I_Introduction-to-Android.pptx
 
Google Android
Google AndroidGoogle Android
Google Android
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
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
 
Android Stsucture
Android StsuctureAndroid Stsucture
Android Stsucture
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCP
 
Build Your First Android App
Build Your First Android AppBuild Your First Android App
Build Your First Android App
 
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
 
Android wear notes
Android wear notesAndroid wear notes
Android wear notes
 
Android wear notes
Android wear notesAndroid wear notes
Android wear notes
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Developing Android Apps

  • 1. Developing Android Apps FOR FUN! CLAIRE HYUNJUNG LEE
  • 2. Contens  Getting Started  Activity and Fragment  Start Your Own Project  Bug and Trouble Shooting
  • 3. Getting Started  Installing Android Studio and SDK https://developer.android.com/sdk/index.html
  • 4. Getting Started  Installing JDK http://www.oracle.com/technetwork/jav a/javase/downloads/jdk7-downloads- 1880260.html
  • 5. Getting Started  Create New Project  Let’s start your own project
  • 6. Getting Started  Create New Project  Target your application to devices and Download SDK  http://developer.android.com/about/dashboards/index.html?utm_source=ud acity&utm_medium=mooc&utm_term=android&utm_content=platform_distribu tion&utm_campaign=training
  • 7. Getting Started  Create New Project  What is Activity?  What is Fragment?
  • 8. Activity & Fragment  What is Activity? http://developer.android.com/reference/ android/app/Activity.html  Activity Lifecycle
  • 9. Activity & Fragment  What is Activity? http://developer.android.com/reference/ android/app/Activity.html  Activity Lifecycle public class Activity extends ApplicationContext { protected void onCreate(Bundle savedInstanceState); protected void onStart(); protected void onRestart(); protected void onResume(); protected void onPause(); protected void onStop(); protected void onDestroy(); }
  • 10. Activity & Fragment  What is Activity? http://developer.android.com/reference/ android/app/Activity.html  Starting Activities and Getting Results public class MyActivity extends Activity { ... static final int PICK_CONTACT_REQUEST = 0; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { // When the user center presses, let them pick a contact. startActivityForResult( new Intent(Intent.ACTION_PICK, new Uri("content://contacts")), PICK_CONTACT_REQUEST); return true; } return false; } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PICK_CONTACT_REQUEST) { if (resultCode == RESULT_OK) { // A contact was picked. Here we will just display it // to the user. startActivity(new Intent(Intent.ACTION_VIEW, data)); } } } }
  • 11. Activity & Fragment  What is Fragment? http://developer.android.com/guide/components/fragments.html
  • 12. Activity & Fragment  What is Fragment? http://developer.androi d.com/guide/compon ents/fragments.html
  • 13. Activity & Fragment  What is Fragment? http://developer.android.com/guide/components/fragments.html  For example, here's a subclass of Fragment that loads a layout from the example_fragment.xml file: public static class ExampleFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.example_fragment, container, false); } }
  • 14. Activity & Fragment  What is Fragment? http://developer.android.co m/guide/components/fragm ents.html  Declare the fragment inside the activity’s layout file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:name="com.example.news.ArticleListFragment" android:id="@+id/list" android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" /> <fragment android:name="com.example.news.ArticleReaderFragment" android:id="@+id/viewer" android:layout_weight="2" android:layout_width="0dp" android:layout_height="match_parent" /> </LinearLayout>
  • 15. Activity & Fragment  What is Fragment? http://developer.android.com/guide/components/fragments.html  Or, programmatically add the fragment to an existing ViewGroup  To make fragment transactions in your activity (such as add, remove, or replace a fragment), you must use APIs from FragmentTransaction. You can get an instance of FragmentTransaction from your Activitylike this:  You can then add a fragment using the add() method, specifying the fragment to add and the view in which to insert it. For example: FragmentManager fragmentManager = getFragmentManager() FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); ExampleFragment fragment = new ExampleFragment(); fragmentTransaction.add(R.id.fragment_container, fragment); fragmentTransaction.commit();
  • 16. Activity & Fragment  What is Fragment? http://developer.android.com/guide/components/fragments.html
  • 17. Start your own project  You have your own project!
  • 18. Bug & Trouble Shooting  Problems Installing HAXM
  • 19. Bug & Trouble Shooting  How to Solve  Here’s some cases that you can solve this problem on Intel website  https://software.intel.com/en-us/android/articles/installation-instructions-for- intel-hardware-accelerated-execution-manager-windows  In this case, Execute Disable was disabled in the system BIOS.
  • 20. Bug & Trouble Shooting  Problem Resizing Android Emulator on Windows 8.1  AVD is out of view on Windows
  • 21. Bug & Trouble Shooting  How to Solve It on Android Studio  Click Run  Edit Configurations  General Tab  Choose Emulator and AVD
  • 22. Bug & Trouble Shooting  How to Solve It on Android Studio  Click Emulator Tab  Write –scale 0.x ( In this case, 0.4 was suitable )
  • 23. Bug & Trouble Shooting  How to Solve It by Using Telnet  Click Control Panel  Go to Programs  Turn Windows features on or off
  • 24. Bug & Trouble Shooting  How to Solve it by Using Telnet  Run your application on Android Virtual Device  Run CMD in Windows  Write cd/ to go back to C drive directory  Use the command ‘telnet localhost 5554’ to connect Android Emulator
  • 25. Bug & Trouble Shooting  How to Solve it by Using Telnet  Use the command ‘help’ to see the Android console command list  Use the command ‘window scale 0.x’