Android Programming Fundamentals

Android Apps are written in Java programing language.

Java classes are compiled.

Every App run its own process.

Each App is assigned a unique ID.

Android Application Components

Activity

An activity is usually a single screen that the user sees on the device at one time.

It is the most visible part of the android application.

It use Views and Fragments to create user interfaces and to interact with the user.

Service

service is an application component that can perform long-running operations in the background and does not provide any user interface.

Broadcast Receiver

It receive and react to broadcast announcements.

Example:

Announcement like the time zone has changed.

Intent

It holds the content of a message.

Example:

Convey a request for an activity to present an image to the user or let the user edit some text.

Android Application Framework

Content Provider

These are the standard interfaces that connect data in one process with code running in another process.

Resource Manager

Provides access to non-code resources.

Manages the storing of strings and      layout files and bitmaps.

Notification Manager

Enables all applications to display alerts in the status bar.

Activity Manager

Manages the lifecycle of applications.

Dalvik Virtual Machine

A specialized virtual machine designed specifically for Android app.

Provides environment on which every Android application runs.

Each Android application runs in its own process, with its own instance of the Dalvik VM.

Dalvik code has been written so that a device can run multiple VMs efficiently.

Executing the Dalvik Executable (.dex) format.

Android Software Development Kit (SDK)

Android SDK includes a comprehensive set of development tools such as:

Debugger

Libraries

Documentation

Sample code

These tools are accessed through an Eclipse plugin called ADT (Android Development Tools) or from command line.

Developing with Eclipse IDE is mostly preferred.

Essential Android command line tools

When developing in IDEs or editors other than Eclipse, be familiar with all of the tools below.

Android

Android is an important development tool.

It helps create, delete, and view Android Virtual Devices (AVDs)

Android Emulator

It runs Android applications on an emulated Android platform.

Android Debug Bridge (ADB)

Interface with emulator or connected device.

In addition to the above tools that are included with the SDK, we need following open source and third-party tools:

Ant

To compile and build Android project into an installable .apk file.

Key tool

To generate the key store and a private key which are used to sign in the .apk file.

Key tool is part of the JDK.

Jarsigner (or similar signing tool)

To sign .apk file with a private key generated by key tool.

Jarsigner is part of the JDK.

Android Security

Android relies on Linux version 2.6 for core system services such as:

Security

Memory management

Process management

Network stack

Driver model

Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications.

Android APK Format

The APK file is consist of all programming code like the AndroidManifest.xml file, application code (.dex files), resource files, and other files etc.

A project is compiled into a single. apk file.


Translate

CR Zaman. Powered by Blogger.

Recent Posts

Popular Posts