The platform is adaptable to larger, VGA, 2D graphics library, 3D graphics library based on
OpenGL ES 2.0 specifications, and traditional smartphone layouts.
Storage SQLite, a lightweight relational database, is used for data storage purposes. Connectivity Android supports connectivity technologies including GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and WiMAX. Messaging SMS and MMS are available forms of messaging, including threaded text messaging and now Android Cloud To Device Messaging (C2DM) is also a part of Android Push Messaging service. Multiple language support Android supports multiple languages. Web browser The web browser available in Android is based on the open-source WebKit layout engine, coupled with Chrome's V8 JavaScript engine. The browser scores 100/100 on the Acid3 test on Android 4.0. Java support While most Android applications are written in Java, there is no Java Virtual Machine in the platform and Java byte code is not executed. Java classes are compiled into Dalvik executables and run on Dalvik, a specialized virtual machine designed specifically for Android and optimized for battery-powered mobile devices with limited memory and CPU. J2ME support can be provided via third-party applications.
Media support Android supports the following audio/video/still media formats: WebM, H.263, H.264 (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, FLAC, WAV, JPEG, PNG, GIF, BMP.
Streaming media support RTP/RTSP streaming (3GPP PSS, ISMA), HTML progressive download (HTML5 <video> tag). Adobe Flash Streaming (RTMP) and HTTP Dynamic Streaming are supported by the Flash plugin. Apple HTTP Live Streaming is supported by RealPlayer for Android, and by the operating system in Android 3.0 (Honeycomb). Additional hardware support Android can use video/still cameras, touchscreens, GPS, accelerometers, gyroscopes, barometers, magnetometers, dedicated gaming controls, proximity and pressure sensors, thermometers, accelerated 2D bit blits (with hardware orientation, scaling, pixel format conversion) and accelerated 3D graphics. Multi-touch Android has native support for multi-touch which was initially made available in handsets such as the HTC Hero. The feature was originally disabled at the kernel level (possibly to avoid infringing Apple's patents on touch-screen technology at the time). Google has since released an update for the Nexus One and the Motorola Droid which enables multi-touch natively.
Bluetooth Supports A2DP, AVRCP, sending files (OPP), accessing the phone book (PBAP), voice dialing and sending contacts between phones. Keyboard, mouse and joystick (HID) support is available in Android 3.1+, and in earlier versions through manufacturer customizations and third- party applications. Video calling Android does not support native video calling, but some handsets have a customized version of the operating system that supports it, either via the UMTS network (like the Samsung Galaxy S) or over IP. Video calling through Google Talk is available in Android 2.3.4 and later. Gingerbread allows Nexus S to place Internet calls with a SIP account. This allows for enhanced VoIP dialing to other SIP accounts and even phone numbers. Skype 2.1 offers video calling in Android 2.3, including front camera support.
Multitasking Multitasking of applications is available. Voice based features
Google search through voice has been available since initial release. Voice actions for calling, texting, navigation, etc. are supported on Android 2.2 onwards. Tethering Android supports tethering, which allows a phone to be used as a wireless/wired Wi-Fi hotspot. Before Android 2.2 this was supported by third-party applications or manufacturer customizations. Screen capture Android supports capturing a screenshot by pressing the power and volume-down buttons at the same time. Prior to Android 4.0, the only methods of capturing a screenshot were through manufacturer and third-party customizations or otherwise by using a PC connection (DDMS developer's tool). These alternative methods are still available with the latest Android. External storage Most Android devices include microSD slot and can read microSD cards formatted with FAT32, Ext3fs or Ext4fs file system. To allow use of high-capacity storage media such as USB flash drives and USB HDDs, many Android tablets also include USB 'A' receptacle. Storage formatted with FAT32 is handled by Linux Kernel VFAT driver, while 3rd party solutions are required to handle other popular file systems such as NTFS, HFS Plus and exFAT.
1.3: GSM GSM (Global System for Mobile Communications, originally Groupe Spcial Mobile), is a standard set developed by the European Telecommunications Standards Institute (ETSI) to describe technologies for second generation (2G) digital cellular networks. Developed as a replacement for first generation (1G) analog cellular networks, the GSM standard originally described a digital, circuit switched network optimized for full duplex voice telephony. The standard was expanded over time to include first circuit switched data transport, then packet data transport via GPRS (General Packet Radio Services). Packet data transmission speeds were later increased via EDGE (Enhanced Data rates for GSM Evolution) referred as EGPRS. The GSM standard is more improved after the development of third generation (3G) UMTS standard developed by the 3GPP. GSM networks will evolve further as they begin to incorporate fourth generation (4G) LTE Advanced standards. "GSM" is a trademark owned by the GSM Association. 1.3.1: Technical details.
GSM is a cellular network, which means that cell phones connect to it by searching for cells in the immediate vicinity. There are five different cell sizes in a GSM networkmacro, micro, pico, femto and umbrella cells. The coverage area of each cell varies according to the implementation environment. Macro cells can be regarded as cells where the base station antenna is installed on a mast or a building above average roof top level. Micro cells are cells whose antenna height is under average roof top level; they are typically used in urban areas. Picocells are small cells whose coverage diameter is a few dozen metres; they are mainly used indoors. Femtocells are cells designed for use in residential or small business environments and connect to the service providers network via a broadband internet connection. Umbrella cells are used to cover shadowed regions of smaller cells and fill in gaps in coverage between those cells.
Cell horizontal radius varies depending on antenna height, antenna gain and propagation conditions from a couple of hundred metres to several tens of kilometres. The longest distance the GSM specification supports in practical use is 35 kilometres (22 mi). There are also several implementations of the concept of an extended cell, where the cell radius could be double or even more, depending on the antenna system, the type of terrain and the timing advance.
Indoor coverage is also supported by GSM and may be achieved by using an indoor picocell base station, or an indoor repeater with distributed indoor antennas fed through power splitters, to deliver the radio signals from an antenna outdoors to the separate indoor distributed antenna system. These are typically deployed when a lot of call capacity is needed indoors; for example, in shopping centers or airports. However, this is not a prerequisite, since indoor coverage is also provided by in-building penetration of the radio signals from any nearby cell.
The modulation used in GSM is Gaussian minimum-shift keying (GMSK), a kind of continuous- phase frequency shift keying. In GMSK, the signal to be modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator, which greatly reduces the interference to neighboring channels (adjacent-channel interference).
1.3.2: Network structure. The network is structured into a number of discrete sections:
The Base Station Subsystem (the base stations and their controllers).
The Network and Switching Subsystem (the part of the network most similar to a fixed network). This is sometimes also just called the core network. The GPRS Core Network (the optional part which allows packet based Internet connections). The Operations support system (OSS) for maintenance of the network.
1.3.3: Subscriber I dentity Module. One of the key features of GSM is the Subscriber Identity Module, commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phone book. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking.
SIM CARD
1.4: ECLIPSE Eclipse is an open-source community that develops open platforms and products. The community says its projects "are focused on building an open development platform consisting of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle". The Eclipse Foundation is a non-profit corporation which acts as the steward of the Eclipse community.
However, as the Eclipse community states, "Eclipse means a lot of different things to different people. To some Eclipse is a [...] Java development environment. To others, Eclipse is a flexible environment to experiment with new computer languages or extensions to existing languages. [...]" In the software world, a simple mention of "Eclipse" usually refers to the Eclipse software development kit (SDK). The Eclipse SDK consists of the Eclipse Platform, Java development tools and the Plug-in Development Environment. The Eclipse Platform is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. By means of various plug-ins, it can be used to develop applications in various programming languages including Ada, C, C++, COBOL, Erlang, Java, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy and Scheme. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.
The initial codebase originated from VisualAge. The Eclipse SDK (which includes the Java development tools) is meant for Java developers. Users can extend its abilities by installing plug- ins written for the Eclipse Platform, such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.
1.4.1: Versions.
Since 2006, the Foundation has coordinated an annual Simultaneous Release. Each release includes the Eclipse Platform as well as a number of other Eclipse projects. So far, each Simultaneous Release has occurred on the fourth Wednesday of June. Codename Date Platform version Projects ? 21 June 2004 3.0
? 28 June 2005 3.1
Callisto 30 June 2006 3.2 Callisto projects Europa 29 June 2007 3.3 Europa projects Ganymede 25 June 2008 3.4 Ganymede projects Galileo 24 June 2009 3.5 Galileo projects Helios 23 June 2010 3.6 Helios projects Indigo 22 June 2011 3.7 Indigo projects Juno 27 June 2012 3.8 and 4.2 Juno projects Kepler June 2013 (planned) 4.xx Kepler projects
1.4.1: Architecture
The Eclipse Platform uses plug-ins to provide all functionality within and on top of the runtime system, in contrast to some other applications, in which functionality is hard coded. The Eclipse Platform's runtime system is based on Equinox, an implementation of the OSGi core framework specification.
This plug-in mechanism is a lightweight software componentry framework. In addition to allowing the Eclipse Platform to be extended using other programming languages such as C and Python, the plug-in framework allows the Eclipse Platform to work with typesetting languages like LaTeX,[13] networking applications such as telnet and database management systems. The plug-in architecture supports writing any desired extension to the environment, such as for configuration management. Java and CVS support is provided in the Eclipse SDK, with support for other version control systems provided by third-party plug-ins.
With the exception of a small run-time kernel, everything in Eclipse is a plug-in. This means that every plug-in developed integrates with Eclipse in exactly the same way as other plug-ins; in this respect, all features are "created equal".[citation needed] Eclipse provides plug-ins for a wide variety of features, some of which are through third parties using both free and commercial models. Examples of plug-ins include a UML plug-in for Sequence and other UML diagrams, a plug-in for DB Explorer, and many others.
The Eclipse SDK includes the Eclipse Java development tools (JDT), offering an IDE with a built-in incremental Java compiler and a full model of the Java source files. This allows for advanced refactoring techniques and code analysis. The IDE also makes use of a workspace, in this case a set of metadata over a flat filespace allowing external file modifications as long as the corresponding workspace "resource" is refreshed afterwards.
Eclipse implements widgets through a widget toolkit for Java called SWT, unlike most Java applications, which use the Java standard Abstract Window Toolkit (AWT) or Swing. Eclipse's user interface also uses an intermediate graphical user interface layer called JFace, which simplifies the construction of applications based on SWT.
Language packs provide translations into over a dozen natural languages.
CHAPTER TWO: AIM & SCOPE OF ANDROID BASED ALARM SYSTEM
2.1: Industrial Hazards and Safety Hazard is a term associated with a substance that is likely to cause an injury in a given environment or situation. A hazard is something that can cause harm if not controlled. Industrial hazard may be defined as any condition produced by industries that may cause injury or death to personnel or loss of product or property. Safety in simple terms means freedom from the occurrence of risk or injury or loss. Industrial safety refers to the protection of workers from the danger of industrial accidents. Occupational health and safety has come a long way from its beginnings in the heavy industry sector. It now has an impact on every worker, in every work place, and those charged with managing health and safety are having more and more tasks added to their portfolio. The most significant responsibility is environmental protection. The skills required to manage occupational health and safety are compatible with environmental protection, which is why these responsibilities are so often bolted onto the workplace health and safety professional. Hazard analysis or hazard assessment is a process in which individual hazards of the workplace are identified, assessed and controlled/eliminated as close to source (location of the hazard) as reasonable and possible. As technology, resources, social expectation or regulatory requirements change, hazard analysis focuses controls more closely toward the source of the hazard. Thus hazard control is a dynamic program of prevention. Hazard-based programs also have the advantage of not assigning or implying there are "acceptable risks" in the workplace. A hazard- based program may not be able to eliminate all risks, but neither does it accept "satisfactory" -- but still riskyoutcomes. And as those who calculate and manage the risk are usually managers while those exposed to the risks are a different group, workers, a hazard-based approach can by- pass conflict inherent in a risk-based approach. In this system, the analyzed hazard data is sent immediately to the android device from the processing database, thus ensuring prompt correct or prevention from the hazard manager. During the last several decades there has been a growing awareness of the expanding risks and consequences of major industrial disasters. This is reflected in official statistics, mass media reports, and the appearance of new public institutions that address the problem. The growth of industrial accident prevention companies and the blossoming of literature on industrial risk assessment are other expressions of the same. Industrial disasters are not simply safety problems that need to be resolved; they also have a wider significance because they offer important opportunities to learn about the "goodness of fit" between society, technology, and environment and about how that fit can be strengthened or weakened by unexpected events. This is the kind of information that will be invaluable to humanity during an era of deep and far-reaching societal and environmental change. However, if we are to make optimal use of such opportunities it may be necessary to modify the way we think about industrial disasters.
It is customary to view industrial disasters as "extreme events" that are different mainly in degree from more mundane disruptions to which industries and society have become adjusted. This chapter asserts that it is time to make a clear distinction between two types of industrial disasters - "routine" disasters and "surprises". As defined here, routine disasters are well understood by experts and susceptible to management using long-established principles and practices. They constitute the great majority of threats to human populations. Successful management of routine disasters mainly requires that society put into practice the ample stocks of knowledge and experience about them that already exist. Surprises, which confound both expert and lay expectations, are quite different and much less understood. They include disasters like Bhopal and Chernobyl and Minamata events or their consequences or both - that lie outside the realm of previous experience. These are the sort of disasters we are looking to avoid. It is advantageous to think of surprises as a coherent class of events that cuts across all types of hazards, rather than as extreme events that lie at the tails of different sets of statistical distributions. Since surprises appear to be increasing, it is important to develop better ways of responding to them. Because surprises are unprecedented events, it is difficult to design specific anticipatory measures of the kind that have proved successful in reducing routine hazards. Improving reactive responses to surprises may offer better opportunities for coping with surprises, at least in the short run. Communities that have been affected by surprises should learn from each other's experience and disseminate that knowledge widely. By so doing, it may be possible to identify responses that are robust and flexible across a range of different surprises and therefore worthy of encouragement and emulation in communities elsewhere.
2.1.1: The nature of industrial disasters Industrial hazards are threats to people and life-support systems that arise from the mass production of goods and services. When these threats exceed human coping capabilities or the absorptive capacities of environmental systems they give rise to industrial disasters. Industrial hazards can occur at any stage in the production process, including extraction, processing, manufacture, transportation, storage, use, and disposal. Losses generally involve the release of damaging substances (e.g. chemicals, radioactivity, and genetic materials) or damaging levels of energy from industrial facilities or equipment into surrounding environments. This usually occurs in the form of explosions, fires, spills, leaks, or wastes. Releases may occur because of factors that are internal to the industrial system (e.g. engineering flaws) or they may occur because of external factors (e.g. extremes of nature). Releases may be sudden and intensive, as in a power-plant explosion, or gradual and extensive, as in the build-up of ozone-destroying chemicals in the stratosphere or the progressive leakage of improperly disposed toxic wastes.
In a narrow sense the causes of industrial hazards and disasters are malfunctions, failures, or unanticipated side-effects of technological systems. But this is a misleading oversimplification. Many other factors are involved. The calculus of industrial hazard is a blend of industrial systems, people, and environments (fig. 2.1). These combine in different ways to create a specific hazard. For example, faulty equipment, operator error, and a south-westerly air flow all helped to shape the events that occurred at Three Mile Island nuclear power station. The Challenger space shuttle disaster involved, among others, a vulnerable fluid seal, cold weather, and an impatient launch team - although the official inquiry blamed only the seal.
Fig. 2.1 Components of industrial hazards
The fact that most communities survive industrial disasters testifies to the resilience of people and the effectiveness of their responses to catastrophe. Indeed, over the long term, humans have demonstrated impressive abilities to cope with most industrial disasters, first by ameliorating their effects and then by finding effective ways to avoid, prevent, or control them by precautionary actions. Boiler explosions provide a good illustration. At one time in the early industrialization of Great Britain and the United States, boiler explosions were perhaps the most common industrial disaster. They often led to catastrophic fires on board ships and trains as well as in factories, apartment buildings, and other places. Now the problem of boiler explosions is much reduced as a consequence of improvements in industrial design, construction standards, worker safety, occupational health, and other factors. Similar improvements have reduced the hazard of fires caused by faulty electrical equipment and the number of collapses of high-rise buildings. Another more recent example has come to light in the wake of hurricane Andrew, the most disastrous storm ever to have affected the United States. Despite Andrew's size, intensity, and general destructiveness on land, it destroyed or damaged very few offshore oil and gas platforms. This positive outcome continues a long-term trend of improvement in platform survivability that has come about because of advances in knowledge about marine environments, design standards, building materials and construction practices, platform siting and installation procedures, and improved operation and maintenance actions. As these examples show, though they may be long lived, industrial hazards are neither permanent nor unchanging. The mix of hazard is always in flux. New hazards arise as a consequence of technological innovations, while existing hazards are reduced or eliminated by effective human responses. Through time, whole classes of hazard may be added to or dropped from the public agenda. Kirk Smith, a researcher at the East-West Center in Hawaii, argues that this process of change might be labeled "risk transition" and that it is comparable in importance to the so called "demographic transition" that accompanied rapid economic development in many countries during the past century. So-called "man-made catastrophes" occur with considerable frequency throughout the world every year (fig 2.2). But sprinkled here and there throughout the record is another kind of event, one that brings to light new and troubling dimensions of disaster. These can be labeled "surprises". Surprises are events that confound our expectations .In the context of this subject they are also events that announce unprecedented hazards. In the lists of major disasters there may be only a few surprises each year but they are among the most important events. Progress in understanding - let alone managing - surprises is slow and limited.
Fig 2.2: Global trends in industrial accidents
Surprises arise from two interacting sources: firstly, the events that we experience, and secondly, the metaphors and concepts that we use to understand those events. In other words, surprises not only have unexpected practical consequences but also challenge us to devise new interpretive paradigms. Thus, surprises raise fundamental issues about the nature and roles of uncertainty and indeterminacy in human thought. It is important to realize that the underlying thrust of this chapter is not about simply reclassifying events as surprises and routine hazards; it is about asking us to change the way we think about hazardous events and eventually to change the ways we seek to manage them. Surprises can be classified in terms of the degree to which they connect with or depart from expectations. For example, it is possible to divide them into three general groups: i) Unique events, ii) Precursor events, iii) Superlative events.
Some surprises are unprecedented because they are one of a kind. For example, Kyshtym appears to be the only significant example of a nuclear waste storage disaster; perhaps there will never be another like it. Other surprises are unprecedented because they are the first of a kind, each the precursor of what later turns out to be a sequence of related events. The destruction in flight of the world's first commercial jet airliner - the British Comet - is an example: a series of apparently mysterious Comet crashes occurred at intervals until a lengthy investigation disclosed that metal fatigue was an unexpectedly serious problem in these aircraft. The sinking of the Torrey Canyon off the United Kingdom in the early 1970s was the first in a series of supertanker oil spills that brought increasingly greater damage to maritime ecosystems. Within a few years, much larger cargoes of oil were fetching up on vulnerable shores. A third type of surprise gains notoriety from being a worst of a kind event. Chernobyl stands as the worst in a series of nuclear power station accidents that includes earlier events like the Wind scale incident (1957) and the accident at Three Mile Island (1979). Although it is currently the worst event of its kind, there is potential for others. A recent US General Accounting Office report indicates that 40 old Soviet-designed nuclear reactors without basic safety features are still operating in Russia and Eastern Europe. Ten of these are of special concern. It is also possible to classify surprises in terms of the degree to which they are susceptible to prediction and control. Here, three groups of hazards stand out: i) Unsuspected hazards, ii) Improperly managed hazards, iii) Instrumental hazards. Unsuspected hazards involve substances or activities that were regarded as harmless or benign until scientific evidence or human experience showed otherwise. DDT, asbestos, and chemical chlorofluorocarbons are representative examples. Improperly managed hazards involve failures of various kinds of hazard control systems. Most major industrial accidents are of this type. Well-known management failures have taken place at nuclear facilities (e.g. Windscale, Three Mile Island, Chernobyl), chemical plants (e.g. Seveso, Basle, Bhopal), and transportation systems (e.g. Challenger, Exxon Valdez), as well as in storage and disposal sites for toxic materials (e.g. Kyshtym, Times Beach, Love Canal, Minamata). Instrumental hazards are intended to cause harm and are consciously employed towards that end. They include sabotage, arson, and warfare. Military industrial technologies belong to this group (e.g. nuclear, biological, and chemical weapons such as defoliants and nerve agents; deliberate oil spills and oilfield conflagrations). The mismanaged wastes of military industrial technology are also an important form of improperly managed hazards.
Although instrumental hazards lie entirely within the domain of human control they have never been easy to prevent, control, or reduce. Certain military industrial technologies have been subject to controls (e.g. nuclear test ban treaty, SALT treaty) but many others are not controlled. There are strong pressures to continue to develop, test, and maintain most innovative weapons systems. Improperly managed hazards are outcomes of failed controls. They pose problems that might be ultimately solvable, but we have yet to find and adopt appropriate solutions. Unsuspected hazards are effectively unknown, at least until disaster strikes or are imminent. They lie at the outer limits of our awareness but, once identified, may be susceptible to control. Some of the more complex surprises are blends of industrial hazard and natural hazard. For example, river floods provided the means by which a hazardous chemical - dioxin was spread through the community of Times Beach, Missouri, leading to its eventual abandonment. Experts worry that rising sea levels may soon allow sea water to leach nuclear wastes that are buried on Pacific atolls, thereby bringing about serious, perhaps unprecedented, results. A further characteristic of recent industrial surprises deserves comment. Unlike previous industrial hazards, whose effects were mostly confined to people in close contact with the industries, many of the new surprises have demonstrated the potential to inflict delayed catastrophic losses on people and life-support systems often far removed from the industries themselves. Some of them can reach across space and time to affect vast numbers. The spread of radiation associated with the Chernobyl nuclear power station fire (1986) is an appropriate example. Although communities in the (then) USSR and Eastern Europe received most of the contamination, smaller levels of fallout circulated as far afield as the Alps, the British Isles, and Scandinavia. Today an area of at least 13,000 square kilometers is officially classified as being heavily affected by radiation, but some of the worst contamination is known to lie outside this designated zone. Apart from those who died at the time of the accident, a minimum of one million people mainly in Belarus and the Ukraine - live with the possibility of impaired health and truncated lives. They include an unknown number of former employees of the Chernobyl power station; an additional 600,000 people who took part in extinguishing the fire, building the concrete "sarcophagus" that entombs the stricken reactor, and decontaminating the vicinity; 135,000 evacuees from the so-called "exclusion zone" that was established after the fire; and 272,000 inhabitants of the surrounding "zone of strict control." The lives of others who live further afield have also been affected, by such measures as restrictions on food supplies that were exposed to fallout and changes in national energy policies that de-emphasized the use of nuclear power. The effects may be felt for generations.
2.2: Why use Android? Android is an absolutely open source software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. A number of Integrated Development Environments(IDE) are available to code, compile or test any desired software on the Android platform.
Fig 2.3: Android Architecture As shown in the architecture diagram, each component of the android architecture build is available to a programmer to use, reuse, or modify. All applications are written using the Java programming language. By providing an open development platform, Android offers developers the ability to build extremely rich and innovative applications. Developers are free to take advantage of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much, much more. Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities
and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. Underlying all applications is a set of services and systems, including: i) A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser ii) Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data iii) A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files iv) A Notification Manager that enables all applications to display custom alerts in the status bar v) An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack
Libraries
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below: i) System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices ii) Media Libraries - based on PacketVideo's OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG iii) Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications iv) LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view v) SGL - the underlying 2D graphics engine vi) 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer vii) FreeType - bitmap and vector font rendering viii) SQLite - a powerful and lightweight relational database engine available to all applications
Android Runtime Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.
Linux Kernel Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.
Dalvik Dalvik is the process virtual machine (VM) in Google's Android operating system. It is the software that runs the apps on Android devices. Dalvik is thus an integral part of Android, which is typically used on mobile devices such as mobile phones and tablet computers. Programs are commonly written in a dialect of Java and compiled to byte code. Then they are converted from Java Virtual Machine-compatible .class files to Dalvik-compatible .dex (Dalvik Executable) files before installation on a device. The compact Dalvik Executable format is designed to be suitable for systems that are constrained in terms of memory and processor speed.
Application Fundamentals Android applications are written in the Java programming language. The Android SDK tools compile the code, along with any data and resource files, into an Android package, an archive file with an .apk suffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.
Once installed on a device, each Android application lives in its own security sandbox. The Android operating system is a multi-user Linux system in which each application is a different user. By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them. Each process has its own virtual machine (VM), so an application's code runs in isolation from other appplications. By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications. In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission. However, there are ways for an application to share data with other applications and for an application to access system services: It's possible to arrange for two applications to share the same Linux user ID, in which case they are able to access each other's files. To conserve system resources, applications with the same user ID can also arrange to run in the same Linux process and share the same VM (the applications must also be signed with the same certificate). An application can request permission to access device data such as the user's contacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. All application permissions must be granted by the user at install time. This is the basics regarding how an Android application exists within the system. The core framework components that define an application i) The manifest file in which you declare components and required device features for your application. ii) Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of device configurations.
Application Components Application components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role. In other words, each one is a unique building block that helps define your application's overall behavior. There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed. Here are the four types of application components: Activities An activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture. An activity is implemented as a subclass of Activity. Services A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it. A service is implemented as a subclass of Service. Content providers A content provider manages a shared set of application data. You can store the data in the file system, a SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such as ContactsContract.Data) to read and write information about a particular person.
Content providers are also useful for reading and writing data that is private to your application and not shared. A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. Broadcast receivers A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the systemfor example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcastsfor example, to let other applications know that some data has been downloaded to the device and is available for them to use. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.
A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object. A unique aspect of the Android system design is that any application can start another applications component. For example, if you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. When complete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application. When the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera application that captures a photo, that activity runs in the process that belongs to the camera application, not in your application's process. Therefore, unlike applications on most other systems, Android applications don't have a single entry point (there's no main() function, for example).
Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.
Activating Components Three of the four component typesactivities, services, and broadcast receiversare activated by an asynchronous message called an intent. Intents bind individual components to each other at runtime (you can think of them as the messengers that request an action from other components), whether the component belongs to your application or another. An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of componentan intent can be either explicit or implicit, respectively. For activities and services, an intent defines the action to perform (for example, to "view" or "send" something) and may specify the URI of the data to act on (among other things that the component being started might need to know). For example, an intent might convey a request for an activity to show an image or to open a web page. In some cases, you can start an activity to receive a result, in which case, the activity also returns the result in an Intent (for example, you can issue an intent to let the user pick a personal contact and have it returned to youthe return intent includes a URI pointing to the chosen contact).
For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").
The other component type, content provider, is not activated by intents. Rather, it is activated when targeted by a request from a ContentResolver. The content resolver handles all direct transactions with the content provider so that the component that's performing transactions with the provider doesn't need to and instead calls methods on the ContentResolver object. This leaves a layer of abstraction between the content provider and the component requesting information (for security).
There are separate methods for activating each type of component: i) You can start an activity (or give it something new to do) by passing an Intent to startActivity() or startActivityForResult() (when you want the activity to return a result). ii) You can start a service (or give new instructions to an ongoing service) by passing an Intent to startService(). Or you can bind to the service by passing an Intent to bindService(). iii) You can initiate a broadcast by passing an Intent to methods like sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast(). iv) You can perform a query to a content provider by calling query() on a ContentResolver.
The Manifest File Before the Android system can start an application component, the system must know that the component exists by reading the application's AndroidManifest.xml file (the "manifest" file). Your application must declare all its components in this file, which must be at the root of the application project directory.
The manifest does a number of things in addition to declaring the application's components, such as: i) Identify any user permissions the application requires, such as Internet access or read- access to the user's contacts. ii) Declare the minimum API Level required by the application, based on which APIs the application uses. iii) Declare hardware and software features used or required by the application, such as a camera, bluetooth services, or a multitouch screen. iv) API libraries the application needs to be linked against (other than the Android framework APIs), such as the Google Maps library.
2.3: Basic Implementation of the Alarm System Currently, the future personal computing environment is expected to be led by virtualization- based cloud computing and smartphone-based mobile computing. This development of cloud computing is helping in realizing SoD(System on Demand).SoD integrates virtual computing environments with ubiquitous devices, such as an android phone, which we are using here. Also, more and more dependence on mobile devices is demanding the creation of various virtual application based computing environments. Here, we create such an environment, synching it with an android phone, to sense breaches and errors in industries that apply potentially dangerous machinery. We are trying to achieve an application that would sense, transmit through a remote connection, and alert a person using the prescribed android phone, in the case of a breach/error in a given set of machinery.