Mobile Software Engineering Crash Course - C03 Android
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Mobile Software Engineering Crash Course - C03 Android

on

  • 1,744 views

 

Statistics

Views

Total Views
1,744
Views on SlideShare
1,744
Embed Views
0

Actions

Likes
1
Downloads
154
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Mobile Software Engineering Crash Course - C03 Android Presentation Transcript

  • 1. Mobile Software EngineeringL03 – Android Mohammad Shaker FIT of Damascus - AI dept. MohammadShakerGtr@gmail.com Mobile SE – August 2012
  • 2. Android Developerhttp://developer.android.com
  • 3. SDK Downloadhttp://developer.android.com/sdk/index.html
  • 4. eclipse Android plugininstructions @ http://developer.android.com/tools/sdk/eclipse-adt.html
  • 5. Crazy Stuffhttp://www.xda-developers.com/
  • 6. Constraints• No support for placing or receiving actual phone calls.• You can simulate phone calls (placed and received)through the emulator console, however.• No support for USB connections• No support for camera/video capture (input).• No support for device-attached headphones• No support for determining connected state• No support for determining battery charge level and ACcharging state• No support for determining SD card insert/eject• No support for Bluetooth
  • 7. Tools• android - Android SDK manager. Create/delete/view Android Virtual Devices and update the SDK with new platforms/add-ons.• ddms - Dalvik Debug Monitor Server. Screen caps, thread/heap info, process/state info, ..• emulator - The application responsible for opening AVDs instances.• sqlite3 - manage SQLite databases.
  • 8. SDK – Cont.• # adb - Android Debug Bridge. A client/server program that manages the state of an emulated device.• # aapt - Android Asset Packaging Tool.• # dx - The converter; converts .class files to Android bytecode.
  • 9. First sight
  • 10. First sight
  • 11. Activity Life Cyclehttp://developer.android.com/reference/android/app/Activity.html
  • 12. Basic Components
  • 13. Layouts• FrameLayout• Gallery• GridView• LinearLayout• ListView• RelativeLayout• ScrollView• Spinner• SurfaceView• TabHost• TableLayout• ViewFlipper• ViewSwitcher
  • 14. Create Your First Android App
  • 15. Get Started – Create Project witheclipse• Follow instructions @ – http://developer.android.com/training/basics/firstapp/creating- project.html• Build SDK is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK.• Minimum Required SDK is the lowest version of Android that your app supports
  • 16. Running on the fly
  • 17. Emulator
  • 18. Run on a Real Devicehttp://developer.android.com/training/basics/firstapp/running-app.html
  • 19. Setting Real Android Device Connectionhttp://developer.android.com/tools/extras/oem-usb.html#Drivers
  • 20. Capturing Screen from Real Devicehttp://www.butterscotch.com/tutorial/How-To-Display-Your-Android-Screen-On-Your-Desktop
  • 21. Live from ARC :P
  • 22. Live from ARC :P
  • 23. activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="@string/hello_world" tools:context=".MainActivity" /></RelativeLayout>
  • 24. XML Namespace - xmlns http://www.w3.org/TR/REC-xml-names/
  • 25. Adding your first button Designer VS Code
  • 26. Adding your first button<Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/textView1" android:layout_centerHorizontal="true" android:layout_marginBottom="18dp" android:text=“Button" />
  • 27. Adding your first button• res > values > strings• Add toggle_message to strings• And in the activity_main.xml file<Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/textView1" android:layout_centerHorizontal="true" android:layout_marginBottom="18dp" android:text="@string/toggle_message" />
  • 28. Events• activity_main.xml file<Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/textView1" android:layout_centerHorizontal="true" android:layout_marginBottom="18dp" android:text="@string/toggle_message“ android:onClick="toggleMessageOnClick" />
  • 29. Events• MainActivity.java filepublic void toggleMessageOnClick(View view) { // Do something in response to button TextView textView = (TextView)findViewById(R.id.textView1); textView.setText("Bonjour Monde!");}
  • 30. Congrats! Run and see!Project (HelloWorld) is attached in case u wanna look at it