Mobile Programming: Engr. Waqar Ahmed
Mobile Programming: Engr. Waqar Ahmed
• The data saved in the previous instance of the activity, is passed to the
new instance via onRestoreInstanceState
Application Resources and Context
• Applications may need to store significant amounts of data to control
their runtime behavior.
• These data are called resources. Together, all this information forms
the context of the application, and Android provides access to it
through the Context class.
Resources
• Android applications place images, icons, and user interface layout
files into a directory named res.
The res directory usually will contain at least four subdirectories, as
follows:
• Layout
– contains Android user interface XML files,
• Drawable
– contains drawing artifacts such as the application icon
Resources
• Raw
– holds files that may be read as streams during execution of a
program.
• Values
– contains values that the application will read during execution,
or string data.
• This is achieved partly through the component life cycle, which enable
s objects to be garbage-collected and recreated, and partly by the VM
itself.
Dalvik VM
• Component life cycles have two purposes: they facilitate efficient use
of each application’s memory, or heap space, and they enable the
state of entire processes to be preserved and restored so that the
Android system can run more applications than can fit in memory.
Android Studio
Software Development Kit (SDK)
• Android SDK Tools is a component for the Android SDK. It includes the
complete set of development and debugging tools for Android. It is
included with Android Studio
Android Virtual Devices (AVD)
• When you installed the SDK or when you set up the ADT plug-in-you
set up one or more Android Virtual Devices (AVDs).
• When you create a new Android project you associate it with one of
the AVDs.