androids Flashcards
what is the linux kernel used for
core OS services, multi threading, memory management
what libary does android runtime use
Java libary
How do android apps run their process
they use the dalvik virtual machine that executes files in the dalvik executable (.dex). Optimised for low memory footprint
Library use:C/C++
exposed through android application framework
Library use:System C
tuned for imbedded linux based devices
Library use:LibWebCore
Web browser engine which powers android browser and embedded web view
Library use:3d libraries
hardware 3d acceleration
What is application framework and what is it used for
Provides access to device hardware, location information, background services(alarms etc). Designed for component reuse and interplay between apps
Views?
used to build apps, eg lists grids text boxes, buttons
content providers
enable apps to interchange info between each other
resource manager
provides access to non code resources such as localised strings , images and layout files
activity manager
manages app lifecycle and navigation
how are applications bundled
in .apk files which are used to distribute and install apps on mobile devices
Activities
Represents a single screen with user interfance, in short it performs activities on the screen
what are the states of an activity after onCreate()
onStart() and then onResume()
what happens after a new activity comes after an activity is running
the original activity goes into onPause() state and then goes back to onResume() or onStop
what can an activity do in the onStop() state
it can be killed and go to onCreate() if apps need memory, it can go to onRestart() and then onStart() if user navigates to that activity or can be destroyed through the onDestroy() state
Services:
run in the background and support long-running operations like downloading media or remote processes like email client
broadcast receivers
listen for and respond to events, like messaging app
content providers
supplies data from one application to others on request
True or false: manifests, java, res and gradle scripts are part of an app structure
True
what does the Res contain
the XML file which contains the app layout
what does the manifests contain
the manifest file, vital for declaring the app’s components, permissions and other core configs
what is an intent
description of operation to be performed. It is used to request an action from another app component
whats the difference between an explicit and implicit intent
explicit is an activity in your own application, implicit is when you ask the system to find a suitable activity
what 3 parameters do android toasts take
first method needs a Context object which is obtained by calling getApplicationContext(). second is the text in the toast, third is the length the toast should be displayed