memory are limited compared with what are available on desktops and servers. While developing apps you need to make sure that the CPU is not tied up to that extent that calls can’t be received. The phone’s operating system does not get crashed by leaking lots of memory The mobile app does not fade into the background when calls/messages come or need to be sent. Challenges in Smart Phone Programming
in Palo Alto , California, United States in October,2003 (Originally intended for camera but shifted to smartphones later because of low market for camera only) • On 17th August, 2005 Google Acquired Android Inc . • Goal of Android Project was to create a successful real-world product that improves the mobile experience for end users. • OHA was formed (led by google) in 2007 to advance open standards, • provide services and deploy handsets using the Android Platform. • Android is Open Source and anyone can customize as per their own requirements
mobile devices that includes an operating system, middleware and key applications. • Android OS is a Linux Based operating system • The Android SDK provides the tools and APIs necessary to begin developing applications using the Java programming language. It supports most of the Java SE except for the AWT and Swing. • Android offers its own optimized JVM to run the compiled Java class files in order to counter the handheld device limitations such as memory ,processor speed and power. • Application framework enabling reuse and replacement of components. • Integrated browser(based on the open source WebKit engine), Optimized graphics powered by a custom 2D/3D Graphics library and also supported with OpenGL ES 1.0 – 3.0
in its own process and also has its own virtual machine (VM). Each Application is assigned a unique Linux user ID. • Dalvik VM takes the generated Java class files and combines them into one or more Dalvik Executable (.dex) files .It reuses the duplicate information from multiple class files , effectively reducing the space requirement by half from a traditional .jar file . • Dalvik VM relies on the Linux Kernel for underlying functionality such as threading and low- level memory management. Registers are used as the primary units of data storage instead of the stack. • Unlike applications on most other systems, Android applications don’t have a single entry point for everything in the application. Rather they have essential components that the system can instantiate and run as required.
application may have one or any number of activities . One of the activities is marked as the first one that should be presented when the application starts. • It is like a frame in AWT or an Android analogue of window in a desktop application. • The visual content of the window of an activity is provided by a hierarchy of views - objects derived from the base View class. • VIEW HIERARCHY IS PLACED WITHIN AN ACTIVITY’S WINDOW by the Activity.setContentView() method
visual user interface, but rather runs in the background for an indefinite period of time as per the requirement. CONTENT-PROVIDERS provides a level of abstraction for any data stored on the device that is accessible by multiple applications. The System, or applications will send out broadcasts from time to time , for everything from the battery getting low , to when the screen turns off , to when connectivity changes from Wi-Fi to mobile data. A BROADCAST RECEIVER can arrange to listen for these broadcasts and respond accordingly.
which allow application components to request functionality from other Android components. • Intents allow you to interact with components from their own and other applications. For example an activity can start an external activity for taking a picture • It is mainly used to: Start the service Launch an activity Display a web page Display a list of contacts Broadcast a message Dial a phone call etc.
about the application to the Android system, information the system must have before it can run any of the application’s code. • It is also used for naming any libraries the application needs to be linked against and identifying any permission the application needs to be granted. • It mainly includes: Elements Attributes Application Icon name APIS and Versions supported Ability to support multiple screens. Intent Filters
devices that offer different screen sizes and densities. • There are four dominant “form factors” : Phones Tablets The Television The Wearable (smart watches, Google glass ,etc.) Cars/Automobiles, Air-plane seat-back entertainment centers. • Using Configuration qualifiers: res/layout/my-layout.xml // layout for normal screen size (“default”) res/layout-small/my-layout.xml // layout for small screen size res/layout-large/my-layout.xml // layout for large screen size res/layout-xlarge/my-layout.xml // layout for extra large screen size
on screen densities) xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp • Best Mechanisms to support Multiple Screen Sizes: Explicitly declare in the manifest which screen sizes your app supports. Designing alternative layouts and drawables. Using Fragments.
source code and a basket of resources, the Android build tools will give you an application as a result . The application comes in the form of an APK file . It is the APK file that you will upload to the Play Store or distribute by other means.