Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Algonquin College CST 2335 Quiz 2: 1)Which function gets called first in the Android Lifecycle: onStart b

Algonquin College CST 2335 Quiz 2: 1)Which function gets called first in the Android Lifecycle: onStart b

Communications

Algonquin College

CST 2335

Quiz 2:

1)Which function gets called first in the Android Lifecycle:

    1. onStart

b.            onCreate

c.             onResume

 

 

  1. Which function gets called last in the Android Lifecycle:
    1. onPause
    2. onStop

c.             onDestroy

 

  1. When is the bundle parameter for the onCreate(Bundle savedInstance) null?

a.            When the application is loaded for the first time

b.            When onSaveInstance was called previously

 

 

  1. If the bundle parameter for the onCreate(Bundle savedInstance) is not null, which function gets called automatically?

a.            onRestoreInstanceState(Bundle savedInstanceState)

b.            onSaveInstanceState(Bundle outState)

 

  1. What does the first parameter in getSharedPreferences("a_string", Context.MODE_PRIVATE)?
    1. The string to retrieve

b.            The file name

c.             The string to save

 

  1. When you call putString("string_one", "string_two"), which string that represents the value (not name)?
    1. "string_one"

b.            "string_two"

c.             Unknown

 

  1. Which function must you call to retrieve the saved string from the sharedPreferences call: putString("string_one", "string_two")

a.            getString("string_one", "string_three")

b.            getString("string_two", "string_three")

 

  1. Which function must you call to start an activity when you want to get data back?
    1. startActivity()
    2. startActivityForData()

c.             startActivityForResult()

 

  1. What function must you call to end an Activity?
    1. endActivity()

b.            finish()

c.             finishActivity()

 

  1. If you call setResult(Activity.RESULT_OK), what will be the value of the request code parameter in onActivityResult(int request, int result, Intent data)?
    1. RESULT_OK
    2. 5

c.             Unknown

 

  1. What is the proper format for creating a Toast message?

a.            Toast.makeText(getApplicationContext(), "The message", Toast.LENGTH_SHORT);

  1. Toast.makeText("The message", getApplicationContext(), Toast.LENGTH_SHORT);
  2. Toast.makeText(Toast.LENGTH_SHORT, "The message", getApplicationContext());

 

  1. What design pattern is used when chaining many function calls for creating an AlertDialog: dialog.setMessage().setTitle().setPositiveButton().setNegativeButton().show();?

a.            The alert pattern

b.            The builder pattern

c.             The command pattern

 

  1. Which Log function should I call to show warning information?
  1. Log.d()
  2. Log.i()

c.             Log.w()

 

 

 

 

 

Option 1

Low Cost Option
Download this past answer in few clicks

2.83 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions