Saturday, January 25, 2020
An Android Application Development
An Android Application Development This paper talks briefly about developing applications on the android mobile platform using the Java Programming language. The overview includes introduction to the android platform features, architecture, APIs, application framework and the android SDK. A Hello World application walks you through the development process to understand the concepts of the android software stack and the tools involved. In late 2007, a group of industry leaders came together around the Android Platform to form the Open Handset Alliance (http://www.openhandsetalliance.com). Some of the alliances prominent members include:à à ¢Ã¢â ¬Ã ¢ Sprint Nextel à ¢Ã¢â ¬Ã ¢ T-Mobileà à ¢Ã¢â ¬Ã ¢ Motorola à ¢Ã¢â ¬Ã ¢ Samsungà à ¢Ã¢â ¬Ã ¢ Sony Ericsson à ¢Ã¢â ¬Ã ¢ Toshibaà à ¢Ã¢â ¬Ã ¢ Vodafoneà à ¢Ã¢â ¬Ã ¢ Googleà à ¢Ã¢â ¬Ã ¢ Intelà à ¢Ã¢â ¬Ã ¢ Texas Instruments.à Android was designed to serve the needs of mobile operators, handset manufacturers, and application developers [3]. Android is: A software stack for mobile devices that includes an operating system (Linux Kernel version 2.6), 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 [1]. The Figure1: Android Architecture diagram gives a good overview of what constitutes the android platform. Android includes a set of C/C++ libraries (indicated green in Figure1) used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Android Platform Features: The following is an explanation of the building blocks of the platform as indicated in Figure1. Application framework: Developers have full access to the same framework APIs used by the core applications (refer Figure1) written in Java. An application can publish its capabilities and any other application may then make use of those capabilities. Underlying all applications is a set of services and systems, including: 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 Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files A Notification Manager that enables all applications to display custom alerts in the status bar An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack Dalvik virtual machine optimized for mobile devices, executes files in the Dalvik Executable (.dex) format. The dx tool included in the SDK converts .class files into .dex files. Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structured data storage Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE Application Fundamentals: Android applications are written in the Java programming language. The compiled Java code along with any data and resource files required by the application is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; its the file users download to their devices. All the code in a single .apk file is considered to be one application. By default, every application runs in its own Linux process, with a unique linux user id. Each process has its own virtual machine (VM). Application Components: Android applications consist of loosely coupled components, bound using a project manifest that describes each component and how they interact. There are six components that provide the building blocks for your applications: 1) Activities: Your applications presentation layer. Every screen in your application will be an extension of the Activity class. Activities use Views to form graphical user interfaces that displays information and respond to user actions. In terms of desktop development, an Activity is equivalent to a Form. 2) Services: Services are the invisible workers of your application. Service components run invisibly, updating your data sources and visible Activities and triggering Notifi cations. Theyre used to perform regular processing that needs to continue even when your applications Activities arent active or visible. 3) Content Providers: Are a shareable data store. Content Providers are used to manage and share application databases. Content Providers are the preferred way of sharing data across application boundaries. This means that you can confi gure your own Content Providers to permit access from other applications and use Content Providers exposed by others to access their stored data. Android devices include several native Content Providers that expose useful databases like contact information. 4) Intents: They are simple message-passing framework. Using Intents, you can broadcast messages system-wide or to a target Activity or Service, stating your intention to have an action performed. The system will then determine the target(s) that will perform any actions as appropriate. 5) Broadcast Receivers: By creating and registering a Broadcast Receiver, your application can listen for broadcast Intents that match specific filter criteria. Broadcast Receivers will automatically start your application to respond to an incoming Intent, making them ideal for event-driven applications. 6) Notifications: They are user notification framework. Notifi cations let you signal users without stealing focus or interrupting their current Activities. They are the preferred technique for getting a users attention from within a Service or Broadcast Receiver. For example, when a device receives a text message or an incoming call, it alerts you by fl ashing lights, making sounds, displaying icons, or showing dialog messages. You can trigger these same events from your own applications using Notifications. By decoupling the dependencies between application components, you can share and interchange individual pieces, such as Content Providers or Services, with other applications both your own and those of third parties. The manifest file: The AndroidManifest.xml file is where your global settings are made. If you are an ASP.NET developer, you can think of AndroidManifest.xml as Web.config and Global.asax rolled into one. (If you are not an ASP.NET developer, this means that AndroidManifest.xml is a place for storing settings.) AndroidManifest.xml will include such settings as application permissions, Activities, and intent filters. [4] Please refer to Code 1: Manifest file Building Hello World Application: We will write the first android application, Hello World, using the eclipse IDE. Make sure that you have a suitable version of Eclipse(3.5 or 3.6 recommended) installed on your computer. Download the windows .zip file for the SDK starter package. Unpack the SDK files into a directory named android-sdk- in a safe location on your computer. Next, install the Eclipse(3.5 or 3.6) ADT plug-in for Android as follows: Start Eclipse, then select Help > Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter ADT Plugin for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/ In Available Software dialog, select checkbox next to Developer Tools, click Next In the next window, youll see a list of the tools to be downloaded. Click Next. Read and accept the license agreements, then click Finish. When the installation completes, restart Eclipse. Then, configure ADT by doing following steps: Select Window > Preferences to open the Preferences panel Select Android from the left panel. For the SDK Location in the main panel, click Browse and locate your downloaded SDK directory. Click Apply, then OK. Now, to install a platform in Eclipse: In the Android SDK and AVD Manager, choose Available Packages in the left panel. Click the repository site checkbox to display the components available for installation. Select at least one platform to install, and click Install Selected. If you arent sure which platform to install, use the latest version. Go on, and create an AVD: In Eclipse, choose Window > Android SDK and AVD Manager. Select Virtual Devices in the left panel. Click New. (The Create New AVD dialog appears.) Type the name of the AVD, such as my_avd. Choose a target. The target is the platform (that is, the version of the Android SDK, such as 2.1) you want to run on the emulator. You can ignore the rest of the fields for now. Click Create AVD. Create a New Android Project: After youve created an AVD, the next step is to start a new Android project in Eclipse. Please refer to Figure 12: New Android Project and also follow the steps below. Fill in the project details with the following values: Project name: HelloAndroid Application name: Hello, Android Package name: com.example.helloandroid (or your own private namespace) Create Activity: HelloAndroid Click Finish. Here is a description of each field: Project Name: The name of the directory that will contain the project files. Application Name: This is the human-readable title for your application the name that will appear on the Android device. Package Name: This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity will be generated. Your package name must be unique across all packages installed on the Android system; for this reason, its important to use a standard domain-style package for your applications. The example above uses the com.example namespace, which is a namespace reserved for example documentation when you develop your own applications, you should use a namespace thats appropriate to your organization or entity. Create Activity This is the name for the class stub that will be generated by the plugin. This will be a subclass of Androids Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesnt need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application. Min SDK Version: This value specifies the minimum API Level required by your application. For more information, see Android API Levels. Other fields: The checkbox for Use default location allows you to change the location on disk where the projects files will be generated and stored. Build Target is the platform target that your application will be compiled against (this should be selected automatically, based on your Min SDK Version). Notice that the Build Target youve selected uses the Android 1.1 platform. This means that your application will be compiled against the Android 1.1 platform library. If you recall, the AVD created above runs on the Android 1.5 platform. These dont have to match; Android applications are forward-compatible, so an application built against the 1.1 platform library will run normally on the 1.5 platform. The reverse is not true. Your Android project is now ready. It should be visible in the Package Explorer on the left. Open the HelloAndroid.java file, located inside HelloAndroid > src > com.example.helloandroid). Please refer to Code2: HelloAndroid. Notice that the class is based on the Activity class. An Activity is a single application entity that is used to perform actions. An application may have many separate activities, but the user interacts with them one at a time. The onCreate() method will be called by the Android system when your Activity starts it is where you should perform all initialization and UI setup. An activity is not required to have a user interface, but usually will. Now lets modify some code! Construct the UI Please refer to Code 3: Construct UI An Android user interface is composed of hierarchies of objects called Views. A View is a drawable object used as an element in your UI layout, such as a button, image, or (in this case) a text label. Each of these objects is a subclass of the View class and the subclass that handles text is TextView. In this change, you create a TextView with the class constructor, which accepts an Android Context instance as its parameter. A Context is a handle to the system; it provides services like resolving resources, obtaining access to databases and preferences, and so on. The Activity class inherits from Context, and because your HelloAndroid class is a subclass of Activity, it is also a Context. So, you can pass this as your Context reference to the TextView. Next, you define the text content with setText(). Finally, you pass the TextView to setContentView() in order to display it as the content for the Activity UI. If your Activity doesnt call this method, then no UI is present and the system will display a blank screen. There it is Hello, World in Android! The next step, of course, is to see it running. Run the Application: The Eclipse plugin makes it easy to run your applications: Select Run > Run. Select Android Application. The Eclipse plugin automatically creates a new run configuration for your project and then launches the Android Emulator. Depending on your environment, the Android emulator might take several minutes to boot fully, so please be patient. When the emulator is booted, the Eclipse plugin installs your application and launches the default Activity. You should now see something like this: Please refer to Figure 4: Hello Android. The Hello, Android you see in the grey bar is actually the application title. The Eclipse plugin creates this automatically (the string is defined in the res/values/strings.xml file and referenced by your AndroidManifest.xml file). The text below the title is the actual text that you have created in the TextView object. Conclusion: That concludes the basic Hello World tutorial. Refer to http://developer.android.com/index.html for more information. To do that, android offers a number of APIs for developing your applications. The following list of core APIs that provide an insight into whats available; all Android devices will offer support for at least these Java APIs[2]: android.util: The core utility package contains low-level classes like specialized containers, string formatters, and XML parsing utilities. com.google.android.maps: A high-level API that provides access to native map controls that you can use within your application. Includes the MapView control as well as the overlay and MapController classes used to annotate and control your embedded maps. android.text: The text processing tools for displaying and parsing text. android.database: low-level classes required for working with databases. Figures: Figure 1: Android Architecture Diagram Figure2: New Android Project Figure3: New Android Project Figure 4: Hello Android Code 1: Manifest File android:icon=@drawable/small_pic.png android:label=@string/freneticLabel . . . > . . . Code 2: HelloAndroid package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } Code 3: Construct UI package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText(Hello, Android); setContentView(tv); } }
Friday, January 17, 2020
Working in a group Essay
As noted in the lead groupââ¬â¢s forum, ââ¬Å"through observation, [Florence Nightingale] collected empirical evidence that supported her environmental theory and used it to develop evidence-based guidelines that other nurses faced with similar circumstances might find usefulâ⬠(Selanders, 2010). Nightingale, in essence, was a pioneer to evidence-based nursing practice. She focused on the patientââ¬â¢s symptoms and examined possible environmental causes of these symptoms to steer the care given. McCurry, Revell, and Roy (2009) state that ââ¬Å"nursing as a profession has a social mandate to contribute to the good of society through knowledge-based practiceâ⬠(p. 42). No moves, however, can be made without a vision, or a formulation of what is wanted as the end result. This vision starts the process of producing a thought, or a philosophy; which can advance to a theory. Silva (1977) examines the research process by exploring the relationships among philosophy, science and theory. As a result of this analysis, she suggests that all nursing theory and research derives from our leads, or data, to philosophy. Silva also argues that information gleaned from philosophical introspection and intuition should be valued as much as that provided by scientific experimentation. Silva proposes that philosophical intuition is gained by having a thorough understanding of a subject; it is not simply a belief or idea without evidence. This is supported by advances in other fields, such as mathematics, that rely on reasoning, experience and logic and not solely on observation or experimentation. As a result, philosophical intuition can complement the scientific method and serve as another valid and promising means to obtain nursing knowledge. These steps are all intertwined to form future nursing care. Knowledge is built upon theories, for as Lauden (1984) noted, ââ¬Å"problems constitute the questions of science, but theories constitute the answersâ⬠(McCurry et. al 2009, pg. 42). Theories are based on a hypothesis, data and research, as well as formulated models, or in essence paradigms. Whall and Hicks (2002) assert that for the discipline of nursing to maximize its research potential, multiple paradigms should be considered. Recognition of the value of philosophy in nursing is an important first step, after which the choice of how to use philosophical paradigms to frame research efforts can be made. As argued by the authors, the current generation of nursing students is integral in affecting change from a rigid either/or approach to positivist and postmodern influence in research to a more applicable both/and approach. Nursing affords researchers and clinicians the opportunity to appreciate the positivist medical model- A leads to B leads to C- while maintaining that each situation is subject to circumstance, culture, and an endless array of nuances, and these variables must be considered in research. Thus, the most appropriate approach is flexibility and utilization of both positivist and postmodernist philosophies, which will yield the most pertinent scientific results to apply to clinical settings. Experience in clinical settings will then inform philosophical approaches and theory development to facilitate best practice research. Despite the inarguable necessity of implementing well-researched, knowledge-based evidence in clinical practice, these readings suggest the importance of maintaining the holistic approach that defines nursing care throughout the process. References McCurry, M. K., Hunter Revell, S. M., Callista Roy, S. (2009). Knowledge for the good of the individual and society: linking philosophy, disciplinary goals, theory, and practice. Nursing Philosophy, 11(1), 42-52. Selanders, L. C. (2010). The power of the environmental adaptation: Florence Nightingaleââ¬â¢s original theory for nursing practice. Journal of Holistic Nursing, 28(1), 81-88. Silva, M. (1977). Philosophy, science, theory: Interrelationships and implications for nursing research. Image, Journal of Nursing Scholarship, 29(3), 210-3. Whall, A.L., & Hicks, F.D. (2002). The unrecognized paradigm shift within nursing: implications, problems, and possibilities. Nursing Outlook, 50(2), 72-6.
Thursday, January 9, 2020
Understand the Context of Supporting Individuals with...
UNDERSTAND THE CONTEXT OF SUPPORTiNG INDIVIDUALS WITH LEARNING DISABILITIES OUTCOME 1 1. There are various pieces of legislation in place to promote equality and reduce discrimination. These include: * The Disability Discrimination Act 2005 * The Special Educational Needs and Disability Act 2001 * The Race Relations (Amendment) Act 2000 * Convention on the Rights of the Child (UN, 1989) * The Human Rights Act 1998 * The Sex Discrimination Act 1975 (as amended) * Employment Equality Regulations 2003 2. The Disability Discrimination Act 2005 The Act prohibits discrimination against disabled people in a range of circumstances, covering employment and occupation, education, transport, and the provision ofâ⬠¦show more contentâ⬠¦The Act was amended in 1986 to ensure that discrimination within small firms, private households and employment, and at the age of retirement, was abolished. The Sex Discrimination Act 1975 was amended by new Regulations in 2008. The new Regulations include * Discrimination on the ground of pregnancy or maternity leave * Harassment * Liability of employers for failing to protect employees from third party harassment * Exception relating to terms and conditions during maternity leave OUTCOME 2 1. A learning disability affects the way a person learns new things in any area of life, not just at school. It affects the way they understand information and how they communicate. Around 1.5 million people within the UK have one. This means they have a difficulty: * Understanding new or complex information * Learning new skills * Coping independently A learning disability can be mild, moderate or severe. Some people with a mildShow MoreRelatedUnderstand The Context Of Supporting Individuals With Learning Disabilities1394 Words à |à 6 Pagesï » ¿Understand the legislation and policies that support the human rights and inclusion of individuals with learning disabilities. Identify legislation and policies that are designed to promote the human rights, inclusion, equality and citizenship of individuals with learning disabilities. I can identify the polices and legislation designed to promote inclusion, human rights of individuals with learning disabilities and of their citizenship and equal life chances i.e. National Health Service and CommunityRead MoreUnit 245 Understand the Context of Supporting Individuals with Learning Disabilities.1864 Words à |à 8 PagesUnit 245 ââ¬â Understand the context of supporting individuals with learning disabilities. 1.1 a) Human Rights act 1998 b) Equality act 2010 c) Disability discrimination act 1995 d) Mental Capacity act 2005 1.2 a) Improved the standards of care given to individuals with a learning disability, it gave individuals the right to life, right to privacy and the right not to be subjected to degrading or inhuman treatment. b) Protects the rights of individuals and promotesRead MoreUnit 4222-245 Understand the Context of Supporting Individuals with Learning Disabilities2489 Words à |à 10 PagesUnit 4222-245 Understand the context of supporting individuals with learning disabilities Outcome 1 Understand the legislation and policies that support the human rights ind inclusion of individuals with learning disabilities 1.identify legislation and policies that are designed to promote the human rights, inclusion, equal life chances and citizenship of individuals with learning disabilities One of the main causes of discrimination is the fear and lack of understanding of others becauseRead MoreUnit 201 Essay954 Words à |à 4 PagesUnit 4222-245 Understand the context of supporting individuals with learning disabilities (LD 201) OUTCOME 1 Understand the legislation and policies that support the human rights and inclusion of individuals with learning disabilities. 1.1. Identify four legislation and policies that are designed to promote the human rights, inclusion, equal life chances and citizenship of individuals with learning disabilities National Health Service and Community Care Act 1990; Disability DiscriminationRead MoreUnderstanding the Context of Learning Disabilities Essay992 Words à |à 4 PagesUnderstanding the context of supporting individual with learning disabilities.à Unit | Questions | Answer | 1.1 1.2 2.1 2.2 2.3 2.4 2.5 | Identify legislation and policies that are designed to promote the human rights, inclusion, equal life chances and citizenship of individuals with learning disabilities. Explain how this legislation and policies influenceRead MoreEssay on LD 201 Supporting People with LD3456 Words à |à 14 Pagesï » ¿ Understand the context of supporting an individual with learning disabilities 4200-209 4222-245 (LD 201) Level 2 Credits 4 Guided learning hours 35 Assessment document K/601/5315 This Assessment belongs to the following qualifications: Qual: Unit: Award in supporting individuals with learning disabilities 4200-21 209 Certificate in supporting individuals with learning disabilities 4200-22 209 Award in supporting individuals with learning disabilities Read MorePsychosocial Factors Influencing Eric s Health1726 Words à |à 7 Pages Bio-psychosocial factors influencing Ericââ¬â¢s health: By using reactive and proactive assessment it will allow learning disability nurse to identify Ericââ¬â¢s ability and put his need first. His parent knowledge about their son will also be put into consideration in order to deliver holistic care that meet his need. Social model of health will be used to consider broader determinants factors that could contribute to his health and to enabling choice of healthy lifestyle for example his physical, socialRead MoreHealth and social care1434 Words à |à 6 Pageshealth, disability, illness and behaviour in relation to users of health and social care services. 1.2 Learning Outcome Learning outcome Assessment criteria Understand perceptions of health, disability, illness and behaviour 1.1 Analyse the impact of legislation, social policy, society and culture on the ways that services are made available for individuals with specific needs Analyse the care needs of individuals with specific needs 1 Understand 2.1 Read MoreEquality Diversity Inclusion1538 Words à |à 7 Pagesgiven a fair chance and that their individual needs are met. Itââ¬â¢s about giving all sections of the community equal access to employment, education and other services that are provided whilst valuing and respecting them. Recognising that different sections of the community require specific measures to make sure they receive equality. Recognising how and why some groups are underrepresented and knowing what to do about it. Taking positive action to assist individuals where this is appropriate. Diversity Read MoreInclusive Education And Its Implication On All Students Essay1699 Words à |à 7 Pageshave been discussed and analysed to gain the best approaches to teaching and learning of additional needs and culturally diverse background students. It is apparent from the case study scenario that this is a mainstream school catering for a cohort of 370 students from prep to year 6. Students have access to a teacher aid in the prep class and an integration aide for years 1 to 3. The school has available to students a learning resource centre which have special educators in it, as well as a psychologist
Wednesday, January 1, 2020
An Essay on Modernism vs. Traditionalism in the Mayor of...
An Essay on Modernism vs. Traditionalism in The Mayor of Casterbridge During the first half of the 19th century English society was making the difficult transition from a pre-industrial Britain to Ãâmodern Victorian times. In agriculture, most of the transition took place around 1846 with the repeal of the corn laws. This allowed foreign grain to be imported into England for the first time. Consequently, the entire structure and methods of agriculture in Britain were greatly altered. Much of the action in Thomas Hardys novel The Mayor of Casterbridge takes place during the years surrounding 1846. These were the years in which traditionalists took their last stand before being defeated in the name of progress. The contrasts betweenâ⬠¦show more contentâ⬠¦ÃâHe asked me, and he questioned me, and then a wouldnt hear my points! said Abel, to the yard in general. ÃâNow, I shall twitch like a moment-hand all night long to-night for fear o him! (p. 94-95). A traditional form of respect for their employers found Henchards employees fearing him as illustrated though Abel Whittles reaction to Henchards reprimand. Farfrae however, took a more modern approach by instilling respect in Whittle out of justice. Abel was in the wrong to sleep in. However, Henchard was in the wrong to force the man to go to work without his breeches. I dont care what Mr. Henchard said, nor anybody else! ÃâTis simple foolishness to do this. Go and dress yourself instantly, Whittle [said Farfrae] Farfrae resolved the issue efficiently and with justice which is illustrative of his modern attitude toward an employee reprimand. The contrasting views on business ethics held by Henchard and Farfrae are illustrative of the contrasts between tradition and modernization. Similarly, the contrasting attitudes that Henchard and Farfrae take toward modernization and new developments help to illustrate the conflict of tradition versus modernism in Casterbridge society. As a result of technological progress, a new machine had been developed and introduced to the town of Casterbridge. It was the new-fashioned agricultural implement called a horse drill, till then unknown in its modern shape in thisShow MoreRelatedEssay on Modernism vs. Traditionalism in The Mayor of Casterbridge1801 Words à |à 8 Pages An Essay on Modernism vs. Traditionalism in The Mayor of Casterbridge During the first half of the 19th century English society was making the difficult transition from a pre-industrial Britain to ââ¬Ëmodern Victorian times. In agriculture, most of the transition took place around 1846 with the repeal of the corn laws. This allowed foreign grain to be imported into England for the first time. Consequently, the entire structure and methods of agriculture in Britain were greatly altered. Much of the
Subscribe to:
Comments (Atom)