Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Welcome to Java!
The official language for Android development is Java. Large parts of Android
are written in Java and its APIs are designed to be called primarily from Java.
How does it work?
This is how simple java code looks like. But the code for apps is much more complex.
To create android apps Android Software Development Kit (SDK). The Android SDK
provides all the API libraries and tools you need build an Android app.You need to understand how
the Android UI is constructed (using XML), and how to access the different Android subsystems.
How
is it
done?
Conversion to Dalvik
bytecodes:
The .class files contain Java byte-codes. But
Android devices use byte-code format called
Dalvik. Dalvik byte-codes, like Oracle JVM
byte-codes, are machine-code instructions .
The compilation process needs to convert the
.class files, and any .jar libraries into a
singleclasses.dex file containing Dalvik bytecodes done using dx command.The dx
command stitches all of the .class and .jar
files together into a single classes.dex file
written in Dalvik byte-code format.
deployed
The adb server starts if its
not already running
The app will be deployed to
an Android device using the
Android Debug Bridge. This
involves running an adb
server process on your
development client and a
similar adb inside the
Android device. If the adb
process is not running on
your machine, the adb
command will start it.
SECURITY:
Androids security architecture ensures no application, by default, has permission to
perform any operations that would adversely impact other applications, the operating
system, or the user. This includes reading or writing the user's private data (such as
contacts or e-mails), reading or writing another application's files, performing network
access, keeping the device awake, etc.14
These features are implemented across the operating system (OS) level and framework
level of Android and not within the Dalvik VM. As mentioned previously, each application
is run within its own instance of the VM, which itself is running in its own OS process. Each
process is assigned its own user ID that can only access a limited set of features within the
system and can only access its own data.Therefore, an application cannot interfere with
other applications. If additional security permissions are required, the application can
request them through its Manifest file. These permissions are verified at application
installation time by the framework and are enforced by the OS at runtime.s, Dalvik shares
core, read-only libraries between VM processes. The sharing is done securely by giving
the VM processes permission to read the code but not edit it.
Since it is not possible for applications to interfere with each other based on the OS level
security and Dalvik VMs are confined to a single OS process, Dalvik itself is not concerned
with runtime security.