Exam Content Flashcards
What are the Android Emulator limitations?
No USB support No Bluetooth support No Headphone support No SD support No NFC support
What is a task?
A task is a stack of activities
How do you get intent data from an intent
Use the getIntent(), getData(), getExtra() methods
How do you get a result from another activity?
Create an intent going from one intent to another Add any required data/extras to intent Call startActivityForResult(intent) Do whatever processing is required in Activity B Call setResult(code, inent) in Activity B Call finish() in Activity B Implement onActivityResult() in Activity A
What is the Activity lifecycle?
onCreate() onStart() onResume() onPause() onStop() onDestroy()
What is the task backstack?
The task backstack is the stack containing all active Activities, activities are pushed to it when startActivity() is called and popped when the user goes back - i.e. finish() is called.
How do you send and receive an implicit intent?
(Make sure activity has an intent filter)
Create an intent object with an action parameter
Add data/extra info to the intent
Resolve intent activity - otherwise will crash
Send the intent with startActivity()
Use the getIntent(), getData() and getExtras() methods to receieve an intent
What are the differences between SavedInstanceState and SharedPreferences?
SavedInstanceState does not persist across user sessions, SharedPreferences does
SharedPreferences stores user preferences, SavedInstanceState recreates the state after a screen rotation
Both save small amounts of private data
What are the main features of an SQLite database?
Lightweight, local, no config., no server, easily backedup, store any-type of value
What are retreival queries?
Essentially an SQL select statement, can be achieved via a rawQuery() or just a simple query()
What are action queries?
Queries that manage the database, eg. table creation, column insertion etc. Use execSQL() for this task
What parameter do simple queries take?
Tablename, Columns, WHERE, WHERE_ARGS, groupBy, Having, Order_by)
How do you implement a drag gesture?
Implement view.onDragListener Implement onDrag(view, event)
What are the phases of a drag?
Started, Continuing, Dropped and Ended
How do you implement an AsyncTaskLoader?
Initialise loader ID
In onCreate() initialise a loader with (id, null, this)
Create a loader manager and get the loader with specific loaderID
Implement all required methods for interface: onCreateLoader(), onLoadFinished(), onLoaderReset()