Fdroidlocatordoc 140102212324 Phpapp01
Fdroidlocatordoc 140102212324 Phpapp01
Page 1
Page 2
Page 3
Page 4
Characteristics of Java The target of Java is to write a program once and then run this program on multiple operating systems. Java has the following properties: Platform independent: Java programs use the Java virtual machine as abstraction and do not access the operating system directly. This makes Java programs highly portable. A Java program (which is standard complaint and follows certain rules) can run unmodified on all supported platforms, e.g. Windows or Linux. Object-orientated programming language: Except the primitive data types, all elements in Java are objects. Strongly-typed programming language: Java is strongly-typed, e.g. the types of the used variables must be pre-defined and conversion to other objects is relatively strict, e.g. must be done in most cases by the programmer. Interpreted and compiled language: Java source code is transferred into the byte code format which does not depend on the target platform. These byte code instructions will be interpreted by the Java Virtual machine (JVM). The JVM contains a so called Hotspot-Compiler which translates performance critical byte code instructions into native code instructions. Automatic memory management: Java manages the memory allocation and de-allocation for creating new objects. The program does not have direct access to the memory. The so-called garbage collector deletes automatically objects to which no active pointer exists. 2.3.2 Android Android is a software platform and operating system for mobile devices. Android is available as open source. It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries.
Page 5
2.3.2.1 Architecture of Android OS The skeleton of Android framework and its constituents are shown in the following figure:
Page 6
Page 7
Figure 2.2: Structure of Android Components Activity An Activity is, fundamentally, an object that has a lifecycle. An Activity is a chunk of code that does some work; if necessary, that work can include displaying a UI to the user. It doesn't have to, though-some Activities never display UIs. Typically, we will designate one of our application's Activities as the entry point to our application. Broadcast Receiver Broadcast Receiver is yet another type of componentthat can receive and respond to any broadcast announcements. Service A Service is a body of code that runs in the background. It can run in its own process, or in the context of another application's process, dependingon its needs. Other components "bind" to a Service and invoke methods on it via remote procedure calls. An example of a Service is a media player; even when the user quits the media-selection UI, she probably still intends for her music to keep playing. A Service keeps the music going even when the UI has completed. Content Provider Content Provider is a data storehouse that providesaccess to data on the device; the classic example is the Content Provider that's used to access the user's list of contacts. Our application can access data that other applications have exposed via a Content Provider, and we can also define our own Content Providers to expose data of our own.
2.3.2.3 Location based Services in Android [Department of MCA, MIT Mysore] Page 8
LOCATION_SERVICE using the get System Service() method. Current Location can be fetched using two ways: 1. GPS (Global Positioning System) 2. Network Service Location
GPS (Global Positioning System) The Global Positioning System (GPS) uses a constellation of 24 satellites orbiting the earth. GPS finds the user position by calculating differences in the times the signals, from different satellites, take to reach the receiver. GPS signals are decoded, so the smart phone must have in-built GPS receiver. To get access to GPS hardware of android we request using following statement LocationManager.GPS_PROVIDER;
Geocoding and Reverse Geocoding Geocoding lets us translate between street addresses and longitude/latitude map coordinates. This can give us a recognizable context for the locations and coordinates used in location-based services and map-based activities. The Geocoding lookups are done on the server, so our applications will require us to include an Internet uses-permission in our manifest. The Geocoder class provides access to two geocoding functions: Forward Geocoding Forward Geocoding converts the address into latitude and longitude. Reverse Geocoding Reverse Geocoding converts latitude and longitude to corresponding address
Page 10
Page 11
Location Tracking of Android Device Based on SMS CHAPTER 3 SOFTWARE DEVELOPMENT LIFE CYCLE
3.1 V-MODEL
Fig 3.1: V-Model The V-model represents a software development process (also applicable to hardware development) which may be considered an extension of the waterfall model. Instead of moving down in a linear way, the process steps are bent upwards after the coding phase, to form the typical V shape. The V-Model demonstrates the relationships between each phase of the development life cycle and its associated phase of testing. The horizontal and vertical axes represents time or project completeness (left-to-right) and level of abstraction (coarsest-grain abstraction uppermost), respectively.
Page 12
Requirements Analysis The user requirements document will typically describe the systems functional, interface, performance, data, security, etc. requirements as expected by the user. It is used by business analysts to communicate their understanding of the system to the users. The users carefully review this document as this document would serve as the guideline for the system designers in the system design phase. System Design Systems design is the phase where system engineers analyze and understand the business of the proposed system by studying the user requirements document. They figure out possibilities and techniques by which the user requirements can be implemented. If any of the requirements are not feasible, the user is informed of the issue. A resolution is found and the user requirement document is edited accordingly. Architecture Design
The phase of the design of computer architecture and software architecture can also be referred to as highlevel design. The baseline in selecting the architecture is that it should realize all which typically consists of the list of modules, brief functionality of each module, their interface relationships, dependencies, database tables, architecture diagrams, technology details etc. The integration testing design is carried out in the particular phase.
Module Design The module design phase can also be referred to as low-level design. The designed system is broken up into smaller units or modules and each of them is explained so that the programmer can start coding directly. The low level design document or program specifications will contain a detailed functional logic of the module, in pseudo code:
Page 13
Database tables, with all elements, including their type and size. All interface details with complete API references. All dependency issues. Error message listings. Complete input and outputs for a module.
Integration testing
Try to detect if all these functions are accessible in our application and they are properly integrated. System Testing System testing checks if the integrated product meets the specified requirements. Acceptance Testing Acceptance testing is the phase of testing used to determine whether a system satisfies the requirements specified in the requirements analysis phase. The acceptance test design is derived from the requirements document. The acceptance test phase is the phase used by the customer to determine whether to accept the system or not.
Page 14
Location Tracking of Android Device Based on SMS CHAPTER 4 SOFTWARE REQUIREMENT SPECIFICATION
4.1 INTRODUCTION
Software Requirement Specification (SRS) is the starting point of the software development activity. It is a complete description of the behavior of a system which is to be developed. The SRS document enlists all necessary requirements for project development. To derive the requirements we need to have clear and thorough understanding of the product which is to be developed. This is prepared after detailed communication with project team and the customer. A SRS is a comprehensive description of the intended purpose and environment for software under development. The SRS fully describes what the software will do and how it will be expected to perform. An SRS minimizes the time and effort required by developers to achieve desired goals and also minimizes the development cost. A good SRS defines how an application will interact with system hardware, other programs and human users in a wide variety of real-world situations. Characteristics of SRS: Correct - An SRS is correct if, and only if, every requirement stated therein is one that the software shall meet. Traceability makes this procedure easier and less prone to error. Unambiguous - An SRS is unambiguous if, and only if, every requirement stated therein has only one interpretation. As a minimum, this requires that each characteristic of the final product be described using a single unique term. Verifiable It is verifiable if there exists some finite cost-effective process with which a person or machine check whether software product meets requirements. Consistent - Consistency refers to internal consistency. If an SRS does not agree with some higher-level document, such as a system requirements specification, then it is not
Page 15
4.2 FUNCTIONAL REQUIREMENTS Modules: This application contains two important modules. Ringer Location Tracker
1. Ringer Be able to recognize the attention word received through SMS. Be able to handle the phone state to ring automatically. Be able to send phone state through SMS.
2. Location Tracking Be able to detect the current location of Android device. Be able to retrieve the device, SIM card & location details. Be able to send retrieved details through SMS.
Page 16
SOFTWARE REQUIREMENTS Development Kit: Languages IDE : Platform : : Android SDK 2.3, Java JDK 1.6. Java.
Page 18
The components included in it are as follows: Actor - Actors represent classes of users, organizations, and external systems that interact with your system. Use Cases - Use cases represent the activities that actors perform with the help of your system.
Page 19
Page 20
Fig 5.1: Illustration of3-Tier Architecture with Diagram. [Department of MCA, MIT Mysore] Page 21
Fig 4.2: State Diagram 5.2.2 Activity Diagram Activity Diagram shows the sequence of steps that make up complex process. It shows the flow of control, similar to sequence but focuses on operation rather than on objects. The components used in this are as follows: o Rounded Rectangle o Arrow [Department of MCA, MIT Mysore] It indicates the process. It indicates transition line. Page 22
5.2.3 Sequence Diagram A Sequence diagram shows how a set of objects communicate with each other to perform a complex task. This type of diagram allows the other developer to verify that the interaction is correct.
Page 23
5.2.3 Class Diagram In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects. In the diagram, classes are represented with boxes which contain three parts:
The top part contains the name of the class The middle part contains the attributes of the class The bottom part gives the methods or operations the class can take or undertake
Page 24
Page 25
IMPLEMENTATION
6.1 INTRODUCTION:
After designing the new system, the whole system is required to be converted into computer understanding language. Codingthe new system into computer programming language does this. It is an important stage where the defined procedures are transformed into control specifications by the help of a computer language. This is also called the programming phase in which the programmer converts the program specifications into computer instructions, which we refer as programs. The programs coordinate the data movements and control the entire process in a system. It is generally felt that the programs must be modular in nature. This helps in fast development, maintenance and future change, if required. The validity and proper functionality of all the modules of the developed application is assured during the process of implementation. Implementation is the process of assuring that the information system is operational and then allowing user to take over its operation for use and evaluation. Implementation is the stage in the project where the theoretical design is turned into a working system. The implementation phase constructs, installs and operated the new system. The most crucial stage in achieving a new successful system is that it works effectively and efficiently.
6.2 MODULES
1. Send attention word text: Perform predefined action according to alert word and abort broadcasting. 2. Send text other than attention word: Allow broadcasting [Department of MCA, MIT Mysore] Page 26
6.2.1 IMPLEMENTATION OF MODULES 6.2.1.1 Broadcast receiver that alerts application when each new SMS arrived.
This module decides which action has to perform when attention word matches with the keyword ringmydevice. If it is matched then it starts activity which enables device ringing. If attention word matches with the keyword getlocation then it starts activity which retrieves location of device and sends information to the sender of SMS. At the same time it aborts message broadcasting so that message cant be reached to inbox of native messaging application.
If attention word is not matched with the specified key word than it simply allow broadcasting so that message can be reached to inbox of native messaging application.
Step 1: START Step 2:SMS received. Step 3:Checks attention word. Step 4:If attention word matches with ringmydevice then starts ringing activity and abort broadcasting. Step 5:If attention word matches with getlocation then starts ringing activity and abort broadcasting. Step 6: If attention word not matched then allow broadcasting. Step 7:End
Page 27
6.2.1.2 Enable device ringing and acknowledges the user. Received attention word text is ringmydevice: In this module we provide the functionality of making device ringing by sending an attention word to android device. DroidLocator recognizes the keyword ringmydevice and makes device ringing no matter it is in silent or vibrate mode. So user can locate his phone. Step 1: START Step 2:Checks device it in silent or vibrate mode. Step 3:If it is in silent or vibrate mode than set device to ringing mode. Step 4: Enable device ringing. Step 5:Acknowledges user that device ringing by sending device status information to user. Step 6: If user found phone and clicks phone found button then stop ringing. Step 7:End 6.2.1.3 Get location And Acknowledges user. Received attention word text is getlocation. In this module we provide the functionality of getting location details of device and the same will be sent to user. DroidLocator recognizes the keyword getlocation, retrieves latitude and longitude of device, creates a Google map link and the same will be sent to sender of SMS. So user can locate his phone. Step 1: START Step 2:Checks that internet is available. Step 3:If internet is available then get location details from Network Provider. Step 4:If internet is not available then Checks is GPS turned on. Step 5:If GPS is available then get location details. Step 6:Send location information to user. Step 7:End
Page 28
TESTING
The chapter which is presented below deals with the various tests that have been made to the developed software so as to detect the failures it may have. Along this chapter there will be carried out two types of tests: unit tests and integration tests. 1. Unit tests Try to detect if all application functions work correct individually. 2. Integration tests Try to detect if all these functions are accessible in our application and they are properly integrated.
SIN 1
SCENARIOS Install DroidLoactor.apk file on Android phone Check whether UI Is Displaying On screen Send SMS From Application Receive SMS Inside Application Read Contents Of SMS Make Device Ring Retrieve Latitude And Longitude
STATUS Success
Display UI SMS Sent SMS Received Contents Read Device Ringing Latitude And Longitude
Display UI SMS Sent SMS Received Contents Read Device Ringing Latitude And Longitude
3 4 5 6 7
Page 29
Page 30
DEPLOYMENT
In IT context, deployment encompasses all the processes involved in getting new software or hardware up and running properly in its environment, including installation, configuration, running, testing, and making necessary changes. Software deployment is all of the activities that make a software system available for use. Android application can be deployed multiple ways: 1. If you don't use eclipse, you can use adb tool. adb -d install PATH_TO_YOUR_APK_FILE 2. If you use eclipse, you can click run application in eclipse's launch menu. If this doesn't work, make sure you have "USB Debugging Mode" checked on your android phone. It's in the application menu. 3. You can export your package and sign it! And then browse to it to install.
Page 31
Page 32
ANNEXTURE
10.1 SNAPSHOTS
Fig 10.4 GPS keyword Screen [Department of MCA, MIT Mysore] Page 34
Page 35
Page 36
Page 37
Page 38