Friday, November 8, 2019

Android Application Development-Backdroid Essays

Android Application Development-Backdroid Essays Android Application Development-Backdroid Essay Android Application Development-Backdroid Essay Software Requirements Specification for Android Application Development Version 1. 0 Prepared by Arpit Parekh Rakesh Bangera Akshay Hire DON BOSCO INSTITUTE OF TECHNOLOGY Mumbai University Revision History |Name |Date |Reason for changes |Version | | | | | | | | | | | ) Abstract Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android is a software platform and operating system for mobile devices based on the Linux kernel and developed by Google. It is also a part of Open Handset Alliance. It allows developers to write managed code in a Java-like language that utilizes Google-developed Java libraries, but does not support programs developed in native code. The unveiling of the Android platform on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom companies devoted to advancing open standards for mobile devices. When released in 2008, most of the Android platform will be made available under the Apache free-software and open-source license. 2) Aim and Objective Aim of our project is to build an application for the Android Platform Mobiles. Many people who use handheld devices, store much volatile and personalized information on the device. They are forced to synchronise this information to their Desktop or the Mainframe from time to time. This is to ensure that even if the device, being used, in some way is unable to retrieve the information stored, there is a backup handy. Our application BackDroid helps create a backup and also place the backup file at a secure location, on the mail server specified. Our objective is to treat the data important over all the other things. Thus, we consider the worst case scenario and design the application. We intend to build a bug free, working application for the purpose specified. 3) Literature Survey 3. What is Android? Android is a 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. 3. 2 Features Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices 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. 3. 3 Application Framework 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. . 4 Android Architecture The following diagram shows the major components of the Android operating system. Each section is described in more detail below. [pic] 3. 5 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: System C library a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries based on PacketVideos 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 Surface Manager manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications LibWebCore a modern web browser engine which powers both the Android browser and an embeddable web view SGL the underlying 2D graphics engine 3D libraries an implementation based on OpenGL ES 1. 0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, ighly optimized 3D software rasterizer FreeType bitmap and vector font rendering SQLite a powerful and lightweight relational database engine available to all applications 4) Existing System The existing system consists of the following UI: [pic] [pic] [pic] This is the Android UI provided by Google. Google also provides with some built in applicati ons to handle the functions like Contacts, Gallery, Browser, Messaging, E-mail client etc. The contacts application provided by Google is not very helpful when it comes to backing up of data. The contacts can be stored with multiple fields using this application. The Gmail contacts also are shown in the contacts. To backup this data our application can be used. Similarly, the application provided to read the messages has a similar difficulty. 5) Problem Statement To develop an application for Android OS which operates on mobile devices. This application should enable the user to make a backup of their personalized data. The data that is taken as backup can be contacts, messages and notes. This backup can be stores in the internal or external memory of the mobile phone. Users should be able to upload this backup file to their mail addresses. Scheduling the backup should also be possible (i. e. daily, weekly, monthly or customised). Application should also provide the facility of remote-backup procedure. The remote procedure should have authentication procedure. Emphasis is given to data above all. Application name: BackDroid. 6) Scope 6. 1 BackDroid 6. 2 Application Features Back-up of messages and contacts. Remote login system. Sending of back-up files through mail. Background running of application. Back-up scheduling can be done. Uploading, Back-up of data is done in the background. It provides the user to work on other applications simultaneously. 7) Proposed System The application is divided into 5 modules, these can be stated as: 1. Backup 2. Restore 3. Upload 4. Remote Login 7. 1 Case Study 7. 1. 1 Case Study 1: Back-up Success and Upload Success: The application is initiated by the user. Then the options menu occurs where user chooses the back-up option. In back-up option the user has to choose the data of which he requires taking back-up of (messages, contacts or notes). After selecting the appropriate option, the back-up process is initiated in the background. At this time the user is free to do whatever he wants to on the device. After the back-up operation is complete the user is notified that the back-up is taken and saved at a specified location on the device by the user. As soon as the back-up operation is completed, the upload process begins. In this process, the back-up file is uploaded over the e-mail address specified by the user. This helps the user to keep a back-up copy safely without using any other application on a reliable databank. 7. 1. 2 Case Study 2: Back-up Success and Upload Failure: The application is initiated by the user. Then the options menu occurs where user chooses the back-up option. In back-up option the user has to choose the data of which he requires to take back-up of (messages, contacts or notes). After selecting the appropriate option, the back-up process is initiated in the background. At this time the user is free to do whatever he wants to on the device. After the back-up operation is complete the user is notified that the back-up is taken and saved at a specified location on the device by the user. Now the application automatically uploads it to the e-mail address specified by the user. But, if the back-up copy cannot be uploaded to the e-mail address for some reason like out of GPRS range or no GPRS settings on the given device then the user will get a pop-up that ‘Upload Process Failed’. In this case, the back-up has to be uploaded manually by the user from the saved location on the device after completing the requirements due to which the upload process was terminated before. Else one copy is stored on the external memory. 7. 2 Detailed Features of BackDroid 7. 2. 1Working in Background One of the features of BackDroid allows user to run the application process in background. This feature of BackDroid helps the user to use different features of the device simultaneously with the application running in background. This feature of BackDroid is possible with the support of Intents in the Android Operating System. This is possible because of the feature of ‘multithreading’. The user is free to work on any process while the backup, upload or restore is in process. 7. 2. 2 Upload Procedure The upload feature allows user to upload the back-up to the specified e-mail address given by the user. This feature is useful as it allows the user to keep a back-up copy over the internet securely. This feature requires a GPRS connection to upload the back-up. This application also uses intents as the upload operation is initiated automatically after the back-up operation. This operation is also run in the background. 7. 2. 3 Remote login, Scheduling and Backup-Upload Intent is a simple message-passing framework. Using Intents, user 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 specified in its programming. Intents are applied to enable scheduling, remote login, and calling of other modules on some occurrences is made possible. 8) Methodology 8. 1 Developing Android applications Using Ellipse: The Android Development Tools (ADT) plug-in for Eclipse adds powerful extensions to the Eclipse integrated development environment. It allows you to create and debug Android applications easier and faster. If you use Eclipse, the ADT plug-in gives you an incredible boost in developing Android applications: It gives you access to other Android development tools from inside the Eclipse IDE. For example, ADT lets you access the many capabilities of the DDMS tool: take screenshots, manage port-forwarding, set breakpoints, and view thread and process information directly from Eclipse. It provides a New Project Wizard, which helps you quickly create and set up all of the basic files youll need for a new Android application. It automates and simplifies the process of building your Android application. It provides an Android code editor that helps you write valid XML for your Android manifest and resource files. It will even export your project into a signed APK, which can be distributed to users. 8. 2 Testing Overview Android includes powerful tools for setting up and running test applications. Whether you are working in Eclipse with ADT or working from the command line, these tools help you set up and run your tests within an emulator or the device you are targeting. The documents listed below explain how to work with the tools in your development environment. If you arent yet familiar with the Android testing framework, please read the topic Testing and Instrumentation before you get started. For a step-by-step introduction to Android testing, try the Hello, Testing tutorial, which introduces basic testing concepts and procedures. For a more advanced tutorial, try Activity Testing, which guides you through a more complex testing scenario. Testing in Eclipse, with ADT The ADT plugin lets you quickly set up and manage test projects directly in the Eclipse UI. Once you have written your tests, you can build and run them and then see the results in the Eclipse JUnit view. You can also use the SDK command-line tools to execute your tests if needed. The following diagram summarizes the Android testing environment: [pic] To run a test in Eclipse, you have two choices: 1. Run a test just as you run an application, by selecting Run As gt; Android JUnit Test from the projects context menu or from the main menus Run item. 2. Create an Eclipse run configuration for your test project. This is useful if you want multiple test suites, each consisting of selected tests from the project. To run a test suite, you run the test configuration. 8. 2. 1 Creating the Test Project In the Hello World tutorial you created Android applic ation project called HelloAndroid. A test of an Android application is also an Android application, and you create it within an Eclipse project. The Eclipse with ADT New Android Test Project dialog creates a new test project and the framework of a new test application at the same time. To create the test project and test application framework in Eclipse with ADT, follow these steps 1. In Eclipse, select New ; Project ; Android ; Android Test Project. [pic] The New Android Test Project dialog appears. 2. Set the following values: o Test Project Name: HelloAndroidTest o Test Target: Set An existing Android project, click Browse, and then select HelloAndroid from the list of projects. o Build Target: Set a target whose platform is Android 1. or above. o Application name: HelloAndroidTest o Package name: com. example. helloandroid. test The dialog should now look like this: [pic] 3. Click Finish. The new project appears in the Package Explorer. 8. 2. 2 Adding the test case class file To add the Java file for the test case class, follow these steps In Eclipse, open the HelloAndroidTest project if it is not already open. 1. Within HelloAndroidTest, expand the src/ folder and then find the package icon for com. example. helloandroid. test. Right-click on the package icon and select New ; Class: [pic] The New Java Class dialog appears. 2. In the dialog, enter the following: o Name: HelloAndroidTest. This becomes the name of your test class. o Superclass: android. test. ActivityInstrumentationTestCase2. The superclass is parameterized by an Activity class name. The dialog should now look like this: [pic] 3. Do not change any of the other settings. Click Finish. 4. You now have a new file HelloAndroidTest. java in the project. This file contains the class HelloAndroidTest, which extends the Activity test case class ActivityInstrumentationTestCase2. You parameterize the class with HelloAndroid, which is the class name of the activity under test. . Open HelloAndroidTest. java. It should look like this: package com. example. helloandroid. test; import android. test. ActivityInstrumentationTestCase2; public class HelloAndroidTest extends ActivityInstrumentationTestCase2 { } 6. The test case class depends on the HelloAndroid class, which is not yet imported. To import the class, add the following line just before the current import statement: import com. example. helloandroid. HelloAndroid; 8. 2. 3 Running the Tests and Seeing the Results You can now run the tests youve created against the Hello, Android application. In Eclipse with ADT, you run a test application as an Android JUnit test rather than a regular Android application. To run the test application as an Android JUnit test, in the Package Explorer right-click the HelloAndroidTest project and select Run As Android JUnit Test [pic] The ADT plugin then launches the test application and the application under test on a the target emulator or device. When both applications are running, the testing framework runs the tests and reports the results in the JUnit view of Eclipse, which appears by default as a tab next to the Package Explorer. As shown below, the JUnit view shows test results in two separate panes: an upper pane summarizes the tests that were run and a lower pane reports the failure traces for the tests. In this case, the tests in this example have run successfully, so there is no failure reported in the view: [pic] The upper pane summarizes the test: Finished after x seconds: How long the test took to run. Runs: The number of tests run. Errors:: The number of program errors and exceptions encountered during the test run. Failures:: The number of assertion failures encountered during the test run. A progress bar. The progress bar extends from left to right as the tests run. If all the tests succeed, the bar remains green. If a test fails, the bar turns from green to red. A test method summary. Below the bar, you see a line for each class in the test application, labelled by its fully-qualified class name. To look at the results for the individual methods in a test case class, click the arrow at the le ft of the class to expand the line. You see the name of each test method. To the right of the method name, you see the time needed to run that method. You can look at the methods code by double-clicking its name. The lower pane contains the failure trace. If all the tests are successful, this pane is empty. If some tests fail, then if you select a failed test in the upper pane, the lower view contains a stack trace for the test. 9) Analysis According to the mobile users, data kept on their mobile device is volatile. Also if the device memory is damaged, the personalized data is damaged too. Even when the device does not fail, there is a need of portability or the data from one device to other. If the user wants to switch between two or more devices, user has a need to synchronise the data in each devices. Also the user hardly can check on the last date when the data has been taken as Backup. Thus, there is a need to provide with the scheduling or auto backup facility. When the backup process is carried out, the user can hardly manage to use other functions of the device. In our application, we provide possibility to backup the data in the background. This is possible using the â€Å"intents† feature provided by the Android OS. Intents usually communicate between the modules of the same modules or between two different applications. Moreover, Android is a virtual implementation on the Linux kernel, making it a multithreaded process handling OS. This also enables the user to increase the number of tasks carried out at once. The connectivity and protocols support provided by Android OS is wide, which we have utilised to implement in the Remote login part of the program. Any authorised person can call the application process, running in the background of the device, remotely. This will enable the remote person to access the application and create the backup whenever he is assigned to do so. The remote procedure can be only called by the person who has the application installed and has the authorised access keys. Thus the security of the data is taken care of. Procedure is same via Bluetooth connection. 10) Hardware and Software Details 10. 1 Hardware requirement: Android compatible device Min. 250MHz processor Min. 64Mb RAM and 32Mb ROM 10. 2 Software Requirement: Android Development Toolkit (ADT). Ellipse – Java based Editing software. Windows / Linux / MacOS platform. Emulator or a Android Development Device. 10. 3 For Application: 11) Design Details 1. Use Case Diagram [pic] 2. Activity Diagrams 11. 2. 1 Backup: In this module the function carried out is creating of the backup package/file. This module has the following steps: [pic] 2. Restore: This module carries out, restoring of the data from an earlier backup file. The module has follo wing activities: [pic] 3. Upload: This module handles the uploading of the backup data from the user’s handheld device to the mail server specified by the user. The module has following set of activities: [pic] 2. Sequence Diagram 11. 3. 1 Restore [pic] 2. Backup [pic] 3. Upload Sequence [pic] 12) Implementation for the Next Semester In the next semester, we will be implementing the application BackDroid as planned by us in this document. And after implementing the suggested application, if time prevails we would also like to implement an application on ‘Compression of Data’. This application can be used as a feature of BackDroid and also be used independently for other types of files present in the device. Compression can be useful for reducing the bandwidth usage while uploading data on servers. As the GPRS rates are high and also low space gives the user easier portability. Appendix: I References: Books: Professional Guide to Android 2 Application Development- Reto Meir . Web Resource: http://developer. android. com http://droiddraw. com wrox. com http://anddev. com stackoverflow. com/questions/tagged/android/ Appendix: II Project Output: The output after finishing this project is a fully functional BackDroid application. This application would be licensed by Google Android Market. Backdroid will be available for the user to be run on an Android OS.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.