Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mobile App Design - Lab 6 (Android)

7bf2baf0d8d5d7d96e6b67c5d567e3f9?s=47 Caren
October 30, 2018
110

Mobile App Design - Lab 6 (Android)

7bf2baf0d8d5d7d96e6b67c5d567e3f9?s=128

Caren

October 30, 2018
Tweet

Transcript

  1. Mobile App Design Week 6: Android Lab 3

  2. What are things we might need to know in order

    to build a popular Android app? Show data (text, images, videos) Lab 2: Create content and take users through different flows Save data Look nice!
  3. Flashcard App : Lab 2 Concepts covered:
 
 Android’s Intents

    Resources and Drawables EditText Views
  4. Flashcard App : Lab 2 Android uses Intent objects to

    specify what it wants to happen (ie : start a new Activity)
  5. Flashcard App : Lab 2 Android uses Intent objects to

    specify what it wants to happen (ie : start a new Activity) Intent objects can also contain data to be passed to other Activities
  6. Android Intents ActivityA Intent intent = new Intent(ActivityA.this, ActivityB.class); intent.putExtra(“key",

    “some info to send”); startActivity(intent); ActivityB protected void onCreate(Bundle savedInstanceState) { … String data = getIntent().getStringExtra(“key"); // data = “some info to send”
  7. Flashcard App : Lab 2 Android uses Intent objects to

    specify what it wants to happen (ie : start a new Activity) Intent objects can also contain data to be passed to other Activities When you launch a new activity, you can also specify that you want to wait for data to come back when the activity finishes
  8. Flashcard App : Lab 2 Android uses Intent objects to

    specify what it wants to happen (ie : start a new Activity) Intent objects can also contain data to be passed to other Activities When you launch a new activity, you can also specify that you want to wait for data to come back when the activity finishes
 startActivityForResult(intent, 100)
 
 onActivityResult(int requestCode, int resultCode, Intent data)
  9. Questions?

  10. What are things we might need to know in order

    to build a popular Android app? Show data (text, images, videos) Create content and take users through different flows Lab 3 : Save data Look nice!
  11. Flashcard App : Lab 3 Concepts covered:
 
 Databases /

    Room Gradle
  12. Databases Databases are basically structured data stored in “table” form

  13. Databases User(String employeeNumber, String name, int age, String department, int

    salary)
  14. Databases User(String employeeNumber, String name, int age, String department, int

    salary)
  15. Databases Databases are basically structured data stored in “table” form

    Applications can interact with databases to:
 Create data
 Read data
 Update data
 Delete data
  16. Room Room is an Android library that let’s us easily

    interact with our app’s database
  17. Room Room is an Android library that let’s us easily

    interact with our app’s database Usually when interacting with databases, we have to write code like …
 SELECT * FROM Students
 (Students is the name of the table, and this query gets all entries in the Students table)
  18. Room Room is an Android library that let’s us easily

    interact with our app’s database Usually when interacting with databases, we have to write code like …
 SELECT * FROM Students
 (Students is the name of the table, and this query gets all entries in the Students table) With Room, we can write code like …
 database.getAllStudents()
  19. Libraries Developers can save a lot of time by using

    libraries to simplify their code
  20. Libraries Developers can save a lot of time by using

    libraries to simplify their code For example, if we wanted to make network calls to get data from the internet, we can either:
 1) write a ton of code to make the network calls 
 or
 2) use a library that already has all the functions we need!
  21. Gradle Gradle is Android’s build system, meaning it’s how Android

    Studio takes a bunch of files to produce an APK (or app)
  22. Gradle Gradle is Android’s build system, meaning it’s how Android

    Studio takes a bunch of files to produce an APK (or app) Gradle is how Android projects manage their libraries
  23. Gradle Gradle is Android’s build system, meaning it’s how Android

    Studio takes a bunch of files to produce an APK (or app) Gradle is how Android projects manage their libraries Every app has a build.gradle file, and this is where we define the libraries we want to use for our app
  24. Working on Labs Questions?
 1. Ask for help from group

    members
 2. Ask for TA help through the android specific Slack channel Only Required features need to be implemented, but if you have extra time, explore the optionals! Due date for the lab is midnight next Friday (Nov 16)