project report on tourist security system

104
INTELLIGENT TOURIST SYSTEM ACKNOWLEGEMENT The success and final outcome of this project required a lot of guidance and assistance. We take this opportunity to express a deep sense of gratitude to Ms Shelja, Trainer Regional Center of Entrepreneurship, for her cordial support, valuable information and guidance, who helped us in completing this task through various stages. We are obliged to staff members of Regional Center of Entrepreneurship, for the valuable information provided by them in their respective fields. We are grateful for their cooperation during the period of our project. We are thankful to all those people who stood by us throughout the training & supported us in our project. Balpreet Singh 1145966 B.Tech (IT) 1 | Page

Upload: ikhlaaskaushal

Post on 09-Nov-2015

6 views

Category:

Documents


0 download

DESCRIPTION

HELLO

TRANSCRIPT

INTELLIGENT TOURIST SYSTEM

ACKNOWLEGEMENTThe success and final outcome of this project required a lot of guidance and assistance. We take this opportunity to express a deep sense of gratitude to Ms Shelja, Trainer Regional Center of Entrepreneurship, for her cordial support, valuable information and guidance, who helped us in completing this task through various stages. We are obliged to staff members of Regional Center of Entrepreneurship, for the valuable information provided by them in their respective fields. We are grateful for their cooperation during the period of our project. We are thankful to all those people who stood by us throughout the training & supported us in our project.

Balpreet Singh1145966B.Tech (IT)

ABOUT THE COMPANY

Alcanttor Information Solutions Pvt. Ltd.The education of a country defines the progressive path it's heading towards. In this age of ever growing competitive technology, Alcanttor acts as a guiding light for you to shape your own career.Alcanttor Information Solutions Pvt. Ltd. Is a leading software company and offers Human-Centered solutions to help businesses thrive in a connected world with huge clientele all over the world.Alcanttor Information Solutions Pvt. Ltd. Having offices at Mississauga, Ontario, Canada and at Jaipur, Rajasthan, India. Alcanttor showcases best of both worlds that India has to offer. It empowers you with knowledge and skill set to become a successful and employable engineer who may pursue his or her own dreams. Be it the aim of getting placed there in giant MNCs or be it the passion of being an independent entrepreneur / freelancer we will have you realize those goals and can achieve them.Alcanttor offers humancentered solutions to help businesses thrive in a connected world. Ever expanding world of software technologies is our domain and we bring the power to our solutions. We deliver what we promise.Alcanttor Information Solutions Pvt. Ltd. is a Software Company majorly focusing on the following: Providing cost-effective and efficient project deliveries to our client. Providing corporate training to Employees of the company on Emerging Technologies. Meeting the day-to-day demands of the Industry for hiring skilled youth. Making the youth available to the companies by their joint participation in our Industry Ready Programs. A group of entrepreneurs across India empowers the Alcanttor Information Solutions Pvt. Ltd. The highly skilled team provides next generation technology services to the world with a vision to proof our country as a giant in workforce and quality of service providers.ALCANTTORS OFFERINGS1. Trainings: We team with the young engineers and technical enthusiasts to provide them training and project guidance in Java, Android, PHP and CMS systems. Trainees will have handson experience for industrial projects which we run as pilot initiations.2. Services:We provide project based services in:a. Staffing Solutionsb. Entrepreneurship Clubc. Certificationsd. Corporate TrainingALCANTTOR VISION AND VALUESVISIONTo be the most admired training company in India.VALUES I H R 3 Integrity In all we do Honesty In all our actions Reliability To get the job done Results Because actions speak louder than words Respect For each other, always

PREFACE

The travel and tourism industry is a global (and a globalization) industry, with very specific features .Travel and tourism represents approx. 11% of the world wide GDP (following the tourism satellite account method of the World Travel & Tourism Council). It represents a cross-sectoral industry, including many related economic sectors such as culture, sport or agriculture.Tourism is vital to the well being of many countries, because of the income generated by the consumption of goods and services by tourists, the taxes levied on businesses in the tourism industry and the opportunity for employment and economic advancement by working in the industry. While travelling main problem faced by tourists is to search the place where they want to go. Our application helps the tourists to search the nearby places so that they could make their plan. Nearby Search is based on current location of person which is detected with the help of GPS technology.

ABSTRACT

ObjectiveTourism is vital to the well being of many countries, because of the income generated by the consumption of goods and services by tourists, the taxes levied on businesses in the tourism industry and the opportunity for employment and economic advancement by working in the industry. While travelling main problem faced by tourists is to search the place where they want to go. Our application helps the tourists to search the nearby places so that they could make their plan visit the spots which they desire. Nearby Search is based on current location of person which is detected with the help of GPS technology. Need to chooseThis project reduces the money and manpower required to do a guide for our travelling. We also dont need to visit different sites on the internet before visiting a place.Material and MethodIn this Project we have used android sdk tools to design our application. Different activity pages have been linked together. In the back end data of the user is maintained in SQLite database. GPS connectivity has been done through Google Api.Industry ApplicationOur application can help in promoting travel & tourism and taxi services. It can help tourists to contact travel and tourism agents and hire taxi services. Travel and tourism agencies can pay to post their ads on our application.

TABLE OF CONTENTS

S.NoCONTENTS

1INTRODUCTION

2TECHNOLOGY USED

3TESTING TOOL

4FEASIBILITY STUDY

5REQUIREMENT ANALYSIS

6MODULAR DESCRIPTION OF JOB

7 DATAFLOW DIAGRAM

8DETAILED ANALYSIS OF INDIVIDUAL MODULE

9SNAPSHOTS

10CONCLUSION AND FUTURE SCOPE

11BIBLIOGRAPHY

INTRODUCTION

1) Intelligent Tourism SystemNow-a-days the necessity of executing things is increasing rapidly in our daily activities. Technology plays a vital role in day to day activities. Similarly, this project Intelligent Tourism System serves the need of the users and tourism management system. Technology reduces the paper work and even a lot of time is saved by using the online app on their smart phones and exploring their favourite touring places at just a single click ahead. We took up the project to develop app, encode in ANDROID for online tourism.

2)Functional ComponentsThere are two functional components in the Intelligent Tourism System namely:- User End Back EndUser End: The project Intelligent Tourism System deals with real time procedure of a user wanting to visit different places. The user when plays the app can search for nearby places he wants to visit to know more about the place. User can save the trip plan like the name of the place where he wants to visit, duration of trip and the things he/she likes to do there.Back End: In the back end data of the user is stored in SQLite database. New users are requested to sign up for the application. User information like name, username, password and security question and answer are stored in database. Trip plan of the user is also stored in the database.

TECHNOLOGY USED1.JavaJava is a programming language. It was first developed byJames GoslingatSun Microsystems, which is now a part ofOracle Corporation. It was released in 1995 as a part of Sun Microsystems'Java platform. The language has developed much of itssyntaxfromCandC++. Javaapplicationsare usuallycompiledtobyte code(class file) that can run on anyJava Virtual Machine(JVM). Java is currently one of the most popular programming languages being used. It has about 10 million users. Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere .We have used java version 1.6 version in our application. Java is anobject-oriented languagesimilar toC++, but simplified to eliminate language features that cause common programming errors. It is basically it is a general purpose programming language with a number of features that make the language well suited for use on the World Wide Web. Javasource codefiles (files with a.javaextension) are compiledinto a format calledbyte code(files with a.class extension), which can then be executed by a Javainterpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (JVMs),exist for mostoperating systems, includingUNIX, theMacintoshOS, andWindows. Byte code can also be converted directly intomachine languageinstructions by a just in time compiler (JIT). Small Java applications are called Javaappletsand can bedownloadedfrom aWeb serverand run on your computer by a Java-compatibleWeb browser, such asNetscape NavigatororMicrosoft Internet Explorer.

ADVANTAGESIt is platform independent.It is simple, small and familiar. It is multithreadedIt is dynamic and extensible.It is robust and secure. Ease of development. Good scalability and performance. It is object oriented. It is portable.

1.ANDROIDThe Androidsoftware development kit(SDK) includes a comprehensive set of development tools.These include adebugger, libraries, a handsetemulatorbased onQEMU, documentation, sample code, and tutorials. Currently supported development platforms include computers runningLinux(any modern desktopLinux distribution),Mac OSX10.5.8 or later, andWindows XPor later. As of March 2015, the SDK is not available on Android itself, but the software development is possible by using specialized Android applications. Until around the end of 2014, the officially supportedintegrated development environment(IDE) wasEclipseusing the Android Development Tools (ADT) Plugin, Net BeansIDE also supports Android development via a plugin. As of 2015,Android Studio, made by Google and powered by IntelliJ, is the official IDE; however, developers are free to use others. Additionally, developers may use any text editor to edit Java and XML files, then usecommand linetools (Java Development KitandApache Antare required) to create, build and debug Android applications as well as control attached Android devices (e.g., triggering a reboot, installing software package(s) remotely).Enhancements to Android's SDK go hand in hand with the overall Android platform development. The SDK also supports older versions of the Android platform in case developers wish to target their applications at older devices. Development tools are downloadable components, so after one has downloaded the latest version and platform, older platforms and tools can also be downloaded for compatibility testing.Android applications are packaged in.apkformat and stored underfolder /data/app on the Android OS (the folder is accessible only to the root user for security reasons). APK package contains .dex files(compiled byte code files calledDalvikexecutables), resource files, etc.

We have used android V4.4.2 in our application with API 19 because android is emerging in this world of upcoming technology very fast. Android is a software bunch comprising not only operating system but also middleware and key applications. With auser interfacebased ondirect manipulation, android a computing platform is designed primarily fortouch screenmobile devices such asSmart phonesandtablet computers, with specialized user interfaces for televisions (Android TV), cars (Android Auto), and wrist watches (Android Wear). It is owned by Google, Inc., which includes an operating system, software, and applications. The OS uses touch inputs that loosely correspond to real-world actions, like swiping, tapping, pinching, and reverse pinching to manipulate on-screen objects, and avirtual keyboard.

Despite being primarily designed for touch screen input, it also has been used ingame consoles,digital cameras, regular PCs and other electronics. The operating system is based on Linux, which provides advanced computer processing. Android technology is maintained and continually developed by the AndroidOpen Source Project (AOSP). After original release there have been number of updates in the original version of Android. Android gives you a world-class platform for creating apps and games for android users everywhere, as well as an open marketplace for distributing to them instantly. Androids openness has made it a favourite for consumers and developers alike, driving strong growth in app consumption. Android users download more than 1.5 billion apps and games from Google Play each month.

With its partners, Android is continuously pushing the boundaries of hardware and software forward to bring new capabilities to users and developers.

For developers, Android innovation lets you build powerful, differentiated applications that use the latest mobile technologies.

Android gives you everything you need to build best-in-class app experiences.

It gives you a single application model that lets you deploy your apps broadly to hundreds of millions of users across a wide range of devices from phones to tablets and beyond.

Android also gives you tools for creating apps that look great and take advantage of the hardware capabilities available on each device. It automatically adapts your UI to look its best on each device, while giving you as much control as you want over your UI on different device types.

To help you develop efficiently, the Android Developer Tools offer a full Java IDE with advanced features for developing, debugging, and packaging Android apps.

Using the IDE, you can develop on any available Android device or create virtual devices that emulate any hardware configuration. Android kitkat gives us android's most innovative, most beautiful and most useful features to more devices everywhere. Android 4.4is designed to run fast, smooth, and responsively on a much broader range of devices than ever before including on millions of entry-level devices around the world. KitKat streamlines every major component to reduce memory use and introduces new APIs and tools to help you create innovative, responsive, memory-efficient applications.Features added in kitkat 4.4.2: Secure Transactions : Itintroduces new platform support for secure NFC-based transactionsthroughHost Card Emulation(HCE), for payments, loyalty programs, card access, transit passes, and other custom services. With HCE, any app on an Android device can emulate an NFC smart card, letting users tap to initiate transactions with an app of their choice no provisioned secure element (SE) inthe device is needed. Apps can also use a new reader modeto act as readers for HCE cards and other NFC-based transactions.

Printing Framework : It gives native support for printing, along with APIs for managing printing an dadding new types of printer support. The platform provides a print manager that mediates between apps requesting printing and installed print services that handle print requests.The manger provides shared services and a system UI for printing, giving users consistent control over printing from any app ensuring the security of content as it's passed across processes, from an app to a print service. Display : It provides screen recording utilitythat lets you start and stop recording on a device that's connected to your Android SDK environment over USB.Better Memory Management:KitKat isdesigned to run on devices with as little as 512MB of RAM. Immersive mode:It hides everything except the app youre using. We can justswipe the edge of the screento bring back your status bar and navigation buttons.

Improved power manager :New version of stamina mode and additional power management tool to set the syncing of background data of apps in intervals rather than simultaneously.

Storage access framework:A newstorage access frameworkmakes it simple for users to browse and open documents, images, and other files across all of their preferred document storage providers. A standard, easy-to-use UI lets users browsefiles and access recent in a consistent way across apps and providers.

Low power sensors:It introduces platform support forhardware sensor batching, a new optimization that can dramatically reduce power consumed by ongoing sensor activities.

Transitions framework for animating scenes:The transitions framework lets you definescenes, typically view hierarchies, and transitions, which describe how to animate or transform the scenes when the user enters or exits them. We can alsoanimate changes to your UI on the fly, without needing to define scenes.

These are the basics of Android applications: Android applications are composed of one or more application components such as activities, services, content providers, and broadcast receivers.

Each component performs a different role in the overall application behaviour, and each one can be activated individually, even by other applications.

The manifest file must declare all components in the application and should also declare all application requirements, such as the minimum version of Android required and any hardware configurations required.

Non-code application resources like images, strings, layout files, etc. should include

alternatives for different device configurations such as different strings for different languages

A software development kit (SDK) used to create applications, including the related tools, plug-ins, and documentation

A run time used to execute and host Android applications, including the Dalvik Virtual Machine (VM) and the core libraries that provide android specic functionality. The run time is designed to be small and efficient for use on mobile devices.

What do we need to develop Android applications? JDK(version 6 or 7 required). Eclipse(version 3.4-Ganymede or 3.5-Galileo, needed only if you want develop using the ADT Plugin). Base Android SDK . Download the Android SDK from the Android homepage. The download contains a zip file which you can extract to any place in your file system, e.g. I placed it under "C:\Program Files\android-sdk-windows. Android Development Tools (ADT). Installing usingEclipse Update Manageras shown in the next section of this tutorial is much easier

I. Eclipse Update Manager for Android Development Tools (ADT)Use the update manager of Eclipse to install all available plugins for the Android Development Tools (ADT). From Eclipse, Help->Install New Software...

Fig 1Type in URL "https://dl-ssl.google.com/android/eclipse/".Then, follow the directions.ConfigurationNext time (after you restart the Eclipse) we open up Eclipse for a new project, we will have "Android"project template as in the picture below.

Fig 2But if you try to open up a new project, you will get error message related to the location of Android SDK.

Fig 3In Eclipse, open the Preferences dialog via Windows -> Preferences.Select Android and type in the installation path of the Android SDK as the picture below

Fig 4Select Window->Android SDK and AVD Manager from the menu.

Fig 5Press "Install selected" and accept all package.

Fig 6After the installation restart Eclipse.

II. Device for Emulation - Android Virtual DevicesFor emulation, we need to define a device.Select Window -> Android SDK and AVD Manager from the menu.

Fig 7Press "New", then you are about to create a New AVD as the picture below.

Fig 8Press "Create AVD" button.Then you will have this message from Android SDK and AVD Manager.

Fig 9You have created AVD.

Fig 10

To test if your setup is correct, select your device and press "Start".

Fig 11Check the "Scale display to real size" at the Launch Options window below.

Fig 12At the Launch button, you will have the device, finally.

Fig 13

III. Android Development ToolsBefore we start a new project, let us get used to our tools.The Android SDK includes several tools and utilities to help us create, test, and debug our projects. ADT plug-in incorporates most of tools into the Eclipse IDE, where you can access them from the DDMS perspective, including: Android SDK and Virtual Device ManagerUsed to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, SD card storage etc. So, you might have several AVDs for different set of hardware. Android EmulatorAn implementation of the Android virtual machine designed to run within a virtual device on our development computer. Dalvik Debug Monitoring Service (DDMS)Use DDMS to monitor and control the Dalvik virtual machines on which we are debugging our applications. Android Asset Packaging Tool (AAPT)Constructs the distributable Android package files. Android Debug Bridge (ADB)A client-server application that provides a link to a running emulator. It lets us copy files, install compiled application package (.apk) and run shell commands.Creating a New ProjectSelect File -> New -> Project... -> Android -> Android Project and create the Android project as in the picture below.

Fig 14 Enter the details for your new project. Project namethe name of your project file Package namespecifies its java package Create Activitylets you specify the name of a class that will be your initial Activity(note) An Activity represents a screen that an application can present to its users. The more complicated an application, the more screens it needs. Application namefriendly name for your application Min SDK Versionthe minimum version of the SDK that your application will run on Press "Finish"You may get the following error message on the Problems tab field which is at the bottom right side of Eclipse IDE when you open a new Android project:The project cannot be built until the build path errors are resolved. The project cannot be built until build path errors are resolved. You can find quite a few solutions from the web. Some of them get around this problem by using dummy libraries and some of them tweaks the /gen folder etc. What I've done was just File->Exit and then fired up Eclipse again. Still, the message showed up and then magically disappeared. Something's going on but do not know what that is.This should see the following directory structure in the Package Explorer.

Fig 15When you create a new Android project, you get several items in the project's root directory: src /A folder that holds the Java source code gen /This is where Android's build tools will place source code that they generate. R.java" is a generated class which contains the text and the UI elements. Android projects come with this free class 'R' which is short for Resource. This is an automatically generated class that we can use to reference resources in our project. We should not try to modify this class manually. assets /A folder that holds other static files you wish packaged with the application for deployment onto the device. res /A folder that holds resources such as icons, graphic user interface (GUI) layouts, etc. that are packaged with the compiled Java in the application. AndroidMainFest.xml/ An XML file describing the application being built and which components (activities, services, and so on) are being supplied by the application. This file is the foundation for any Android application. This is where you declare what is inside your application. You also indicate how these pieces attach themselves to the overall Android systems; for example, you can indicate which activity or activities should appear on the device's main menu (a.k.a. the launcher).When you create your application, a starter manifest will be generated for you automatically. For a simple application, offering a single activity and nothing else, the auto generated manifest will probably work out fine, or perhaps require a few minor modifications. But on the other spectrum, the manifest file for the Android API demo suite is more that 1,000 lines long. Your production applications will probably falls somewhere in the middle.Most of the manifest will be describes detail in later chapters. default. PropertiesProperty files used by the Ant build script. Creating an AVDWe need to run our application in the Android Emulator and before we can launch the emulator, we must create an Android Virtual Device (AVD). An AVD defines the system image and device settings used by the emulator.To create an AVD, use the "android" tool provided in the Android SDK. Open a command prompt or terminal, navigate to the tools/ directory in the SDK package.

Fig 16Then execute:android create avd --target 2 --name my_avd

Fig 17The tool now asks if you would like to create a custom hardware profile. For the time being, press Return to skip it ("no" is the default response). That's it. This configures an AVD named "my_avd" that uses the Android 1.6 platform. The AVD is now ready for use in the emulator.In the above command, the--targetoption is required and specifies the deployment target to run on the emulator. Thename option is also required and defines the name for the new AVDActually, if Android SDK with Android Development Tools (ADT) has been installed, we can use SDK and AVD Manager instead of using the command "android ...."above.Select Window -> Android SDK and AVD Manager from the menu.

Fig 18Then we can see the AVD we've just made. As I said, we could have made it using this AVD manager by clicking the New... button of this window.

Creating and running a New Android projectAfter creating an AVD, the next step is to start a new Android project in Eclipse. From Eclipse, select File > New > Project.If the ADT Plugin for Eclipse has been successfully installed, the resulting dialog should have a folder labeled "Android" which should contain "Android Project". (After you create one or more Android projects, an entry for "Android XML File" will also be available.) Select "Android Project" and click Next. Fig 19

Fill in the project details with the following values: Project name: HelloAndroid Application name: Hello, Android Package name: com.bogotobogo.helloandroid (or your own private namespace) Create Activity: HelloAndroid Min SDK Version: 3

Fig 20Click Finish.Here is a description of each field: Project NameThis is the Eclipse Project name , the name of the directory that will contain the project files. Application NameThis is the human-readable title for your application the name that will appear on the Android device.

Package NameThis 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, it's very 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 that's appropriate to your organization or entity. Create ActivityThis is the name for the class stub that will be generated by the plugin. This will be a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application. Min SDK VersionThis value specifies the minimum API Level required by your application. If the API Level entered here matches the API Level provided by one of the available targets, then that Build Target will be automatically selected (in this case, entering "2" as the API Level will select the Android 1.1 target). With each new version of the Android system image and Android SDK, there have likely been additions or changes made to the APIs. When this occurs, a new API Level is assigned to the system image to regulate which applications are allowed to be run. If an application requires an API Level that is higher than the level supported by the device, then the application will not be installed.

Fig 21 Other fieldsThe checkbox for "Use default location" allows you to change the location on disk where the project's files will be generated and stored. "Build Target" is the platform target that your application Running the ApplicationThe Eclipse plugin makes it very easy to run our applications:SelectRun>Run.Select "Android Application".The Eclipse ADT will automatically create a new run configuration for our project and the Android Emulator will automatically launch. Once the emulator is booted up, our application will appear after a moment. We should now see something like this:

Fig 22The "Hello, Android" you see in the grey bar is actually the application title. The Eclipse plugin creates this automatically (the string is defined in theres/values/strings.xmlfile and referenced by yourAndroidManifest.xmlfile). The text below the title is the actual text that you have created in the TextView object.That concludes the basic "Hello World" tutorial, but you should continue reading for some more valuable information about developing Android applications.

IV. User InterfaceIn an Android application, the user interface is built usingViewand ViewGroupobjects. There are many types of views and view groups, each of which is a descendant of theViewclass. When we look at the documentation, theViewclass is declared as:View:Extend: Objectimplements Drawable.Callback KeyEvent.Callback AccessibilityEventSource And theViewGroupis declared as:ViewGroupextends Viewimplements ViewManager ViewParent View objects are the basic units of user interface expression on the Android platform. The View class serves as the base for subclasses called "widgets," which offer fully implemented UI objects, like text fields and buttons. The ViewGroup class serves as the base for subclasses called "layouts," which offer different kinds of layout architecture, like linear, tabular and relative.A View object is a data structure whose properties store the layout parameters and content for a specific rectangular area of the screen. A View object handles its own measurement, layout, drawing, focus change, scrolling, and key/gesture interactions for the rectangular area of the screen in which it resides. As an object in the user interface, a View is also a point of interaction for the user and the receiver of the interaction events.

Fig 23On the Android platform, you define an Activity's UI using a hierarchy of View and ViewGroup nodes, as shown in the diagram above. This hierarchy tree can be as simple or complex as you need it to be, and you can build it up using Android's set of predefined widgets and layouts, or with custom Views that you create yourself.In order to attach the view hierarchy tree to the screen for rendering, your Activity must call thesetContentView()method and pass a reference to the root node object: to inflate within an Activity, usually within theonCreate()method, assetContentView()method accepts a resource identifier @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }or as in the following example, to assign a user interface to an Activity, we can callsetContentView()method from the onCreate()method of our Activity. In the exampleTextViewis used as the Activity's user interface: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); }The Android system receives this reference and uses it to invalidate, measure, and draw the tree. The root node of the hierarchy requests that its child nodes draw themselves in turn, each view group node is responsible for calling upon each of its own child views to draw themselves. The children may request a size and location within the parent, but the parent object has the final decision on where how big each child can be. Android parses the elements of your layout in-order (from the top of the hierarchy tree), instantiating the Views and adding them to their parent(s). Because these are drawn in-order, if there are elements that overlap positions, the last one to be drawn will lie on top of others previously drawn to that space.

V. WidgetsA widget is a View object that serves as an interface for interaction with the user. Android provides a set of fully implemented widgets, like buttons, checkboxes, and text-entry fields, so we can quickly build our UI. Some widgets provided by Android are more complex, like a date picker, a clock, and zoom controls. But we're not limited to the kinds of widgets provided by the Android platform. If we want to do something more customized and create our own actionable elements, we can, by defining our own View object or by extending and combining existing widgets.VI.LabelsThe simplest widget is the label. Labels are a text that cannot be edited directly by users. Typically, they are used to identify adjacent widgets.We can create a label by creating a TextView instance. Or we can create labels in XML layout files by adding a TextView element to the layout, with an android:text property to set the value of the label itself. If we need to swap labels based on certain criteria, such as internationalization, we may wish to use a resource reference in the XML instead.TextViewhas numerous other properties of relevance for labels:android:typefaceSet the typeface to use for the label (e.g., monospace).android:textStypeIndicates that the typeface should be made bold, italic, or bold. and italic.android:textColorSets the color of the label's text, (e.g., #0000ff for blue).VII.CheckBoxjava.lang.Object -> android.view.View -> android.widget.TextView -> android.widget.Button -> android.widget.CompoundButton -> android.widget.CheckBox.A checkbox is a specific type of two-state button that can be either checked or unchecked. It has following properties: isChecked()Determines if the check box has been checked. setChecked()Forces the check box into a checked or unchecked state. toggle()Toggles the check box as if the user checked it.We can register a listener object (in this case, an instance of OnCheckedChangeListener) to be notified when the state of the check box changes.

Fig 24

VIII.RadioButtonjava.lang.Object -> android.view.View -> android.widget.TextView -> android.widget.Button -> android.widget.CompoundButton -> android.widget.RadioButton.A radio button is a two-states button that can be either checked or unchecked. When the radio button is unchecked, the user can press or click it to check it. However, contrary to a CheckBox, a radio button cannot be unchecked by the user once checked.Radio buttons are normally used together in a RadioGroup. When several radio buttons live inside a radio group, checking one radio button unchecks all the others.IX.OthersThere are other componets like ListView, Gallery, Spinner, ViewFlipper, and the more special-purpose AutoCompleteTextView, ImageSwitcher, QuickContactBadge, date-time pickers, auto-complete input boxes, maps, tab sheets, and TextSwitcher.ListViewA view that shows items in a vertically scrolling list. The items come from the ListAdapter associated with this view.GalleryA view that shows items in a center-locked, horizontally scrolling list. The default values for the Gallery assume you will be using Theme_galleryItemBackground as the background for each View given to the Gallery from the Adapter. If you are not doing this, you may need to adjust some Gallery properties, such as the spacing.Views given to the Gallery should use Gallery. LayoutParams as their layout parameters type.SpinnerA view that displays one child at a time and lets the user pick among them. The items in the Spinner come from the Adapter associated with this view.ViewFlipperA View Group that lets us define a collection of Views as a horizontal row in which only one View is visible at a time, and in which transitions between visible views are animated.AutoCompleteTextViewAn editable text view that shows completion suggestions automatically while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.The drop down can be dismissed at any time by pressing the back key or, if no item is selected in the drop down, by pressing the enter/dpad center key.The list of suggestions is obtained from a data adapter and appears only after a given number of characters defined by the threshold. ImageSwitcherQuickContactBadgeDisplays a badge showing the image icon assigned to a contact we specify using a phone number, name, e-mail address, or URI. Clicking the image will display the quick contact bar, which provides shortcuts for contacting the selected contact - including calling, sending an SMS, e-mail, and IM.TextSwitcherSpecialized ViewSwitcher that contains only children of type TextView. A TextSwitcher is useful to animate a label on screen. Whenever setText(CharSequence) is called, TextSwitcher animates the current text out and animates the new text in.X.Selection WidgetsAndroid adapters provide a common interface to the data model behind the selection widgets. They are responsible for providing the data for a selection widget, as well as for converting individual elements of data into specific views to be displayed inside the widgets.The easies adapter to use isArrayAdapter. All we need to do is wrap around a Java array or java.util. List instance. Then, we have a fully functional adapter:String[] arr = {"My", "first", "Android", "list"};new ArrayAdapter (this,android.R.layout.simple_list_item_1, arr);TheArrayAdapterconstructor takes following three parameters:The Context to use, typically, this will be our activity instance.The resource ID of a view to use, for example, built in resource ID.The actual array or list.TheArrayAdapterwill invoketoString()on the objects in the list and wrap each of those strings in the view designated by the supplied resource.

XI.ToastAtoastis a view containing a quick little message for the user. The toast class helps you create and show those. When the view is shown to the user, appears as a floating view over the application. It will never receive focus. The user will probably be in the middle of typing something else. The idea is to be as unobtrusive as possible, while still showing the user the information you want them to see.

XII.DatePickerA DatePicker is a widget that allows the user to select a month, day and year. java.lang.Object -> android.view.View -> android.view.ViewGroup -> android.widget.FrameLayout -> android.widget.DatePicker.

Fig 25

XIII.TimePickerA TimePicker is a widget that allows the user to select the time by hour, minute and AM or PM.

Fig 26

VI. ClocksDisplaying time is really easy.

Fig. 27

XIV.ChronometerChronometer class that implements a simple timer. We can give it a start time in theelapsedRealtime()timebase, and it counts up from that, or if we don't give it a base time, it will use the time at which we callstart(). By default it will display the current timer value in the form "MM:SS" or "H:MM:SS", or we can usesetFormat(String)to format the timer value into an arbitrary string.

XV.TabWidgetATabWidgetoffers the ability to easily draw an interface that uses tabs to navigate between different views. It displays a list of tab labels representing each page in the parent's tab collection. The container object for this widget isTabHost. When the user selects a tab, this object sends a message to the parent container,TabHost, to tell it to switch the displayed page. We typically won't use many methods directly on this object. The container TabHost is used to add labels, add the callback handler, and manage callbacks. We might call this object to iterate the list of tabs, or to tweak the layout of the tab list, but most methods should be called on the containing TabHost object.

Fig 28XVI.FlipperIn TabWidget examples, the contents of each tab were set to be aView. This is easy and straightforward, but it is not the only option. We can also integrate another activity from our application via an intent.Intent is the way of specifying something we want accomplished, and then telling Android to go find something to accomplish it. Intent is an abstract description of an operation to be performed.It can be used withstartActivityto launch an Activity,broadcastIntentto send it to an interested BroadcastReceiver components, andstartService(Intent) orbindService(Intent, ServiceConnection, int)to communicate with a backgroundService.An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. The primary pieces of information in an intent are: actionThe general action to be performed, such as ACTION_VIEW, ACTION_EDIT, ACTION_MAIN, etc. dataThe data to operate on, such as a person record in the contacts database, expressed as a Uri.Frequently, intents are used to cause activities to spawn. For example, whenever we launch an application from the main Android application launcher, the launcher creates anIntentand has Android open the activity associated with thatIntent.Sometimes, we want the overall effect of tabs, but we do not want the actual UI implementation of tabs. Maybe the tabs take up too much screen space. Maybe we want to switch between perspectives based on a gesture or a device shake.Fortunately, we can find the same logic of view-flipping from tabs inViewFlippercontainer, which can be used in other ways that the regular tab.ViewFlipper inherits from FrameLayout, in the same way we use it to describe the innards of a TabWidget. However, initially, theViewFlippercontainer just shows the first child view. It is up to us to arrange for the views to flip, either manually by user interaction or automatically utilizing timer.

Fig 29

XVII.SlidingDrawerUnlike most other Android containers,SlidingDrawermoves, switching from a closed to an open position. This puts some restrictions on which container holds theSlidingDrawer. It needs to be in container that allows multiple widgets to sit atop each other.RelativeLayoutandFrameLayoutsatisfy this requirement; FrameLayout is a container purely for stacking widgets atop one another. On the flip side,LinearLayoutdoes not allow widgets to stack (they fall one after another in a row or column), and so we should not have aSlidingDraweras an immediate child of a LinearLayout.

XVIII.MenusMenus offer a way to expose application functions without sacrificing valuable screen space. Each Activitycan specify its own menu that's displayed when the device's menu button is pressed.Application menus are another important part of an application's UI. Menus offer a reliable interface that reveals application functions and settings. The most common application menu is revealed by pressing the MENU key on the device. However, you can also add Context Menus, which may be revealed when the user presses and holds down on an item.Menus are also structured using a View hierarchy, but you don't define this structure yourself.Instead, you define the onCreateOptionsMenu()oronCreateContextMenu ()callback methods for your Activity and declare the items that you want to include in your menu. At the appropriate time, Android will automatically create the necessary View hierarchy for the menu and draw each of your menu items in it.Menus also handle their own events, so there's no need to register event listeners on the items in your menu.When an item in your menu is selected, theonOptionsItemSelected()oronContextItemSelected()method will be called by the framework.XIX.LayoutsLayouts are extensions of theViewGroupclass used to position child controls for UI. Layouts can be nested, letting us create arbitrarily complicated interfaces using a combination of layouts. Android SDK includes some simple layouts to help us construct our UI. It's up to us to select the right combination of layouts to make our interface easy to understand and use.The following includes some of the more versatile layout classes available. FrameLayoutThe simplest of the layout, the Frame Layout simply pins each child view to the top left corner. Adding multiple children stacks each new child on top of the one before, with each new View obscuring the last. LinearLayoutA Linear Layout aligns each child View in either a vertical or a horizontal line. A vertical layout has a column of Views, while a horizontal layout has a row of Views. The Linear Layout enables us to specify a "widget" for each child View that controls the relative size of each within the available space. RelativeLayoutThe most flexible of the native layouts, the Relative Layout lets us define the positions of each child View relative to the others and to the screen boundaries. TableLayoutThe Table Layout lets us lay out Views using a grid of rows and columns. Tables can span multiple rows and columns, and columns can be set to shrink or grow. GalleryA Gallery Layout displays a single row of items in a horizontally scrolling list.

XX.VI EventsOnce you've added some Views/widgets to the UI, you probably want to know about the user's interaction with them, so you can perform actions. To be informed of UI events, you need to do one of two things: Define an event listener and register it with the View.More often than not, this is how you'll listen for events. The View class contains a collection of nested interfaces named OnListener, each with a call back method called On(). For example, View.OnClickListenerfor handling "clicks" on a View. View.OnTouchListenerfor handling touch screen events in a View. View.OnKeyListenerfor handling device key presses within a View.So if you want your View to be notified when it is "clicked" (such as when a button is selected), implement OnClickListener and define its onClick() callback method (where you perform the action upon click), and register it to the View with setOnClickListener(). Override an existing callback method for the View.This is what you should do when you've implemented your own View class and want to listen for specific events that occur within it. Example events you can handle include: onTouchEvent()Called when the touchscreen is pressed or released, or when it detects movement. onTrackballEvent()Called when the device's trackball is moved. onKeyDown()Called when any device key is pressed; includes the D-pad, keyboard, hang-up, call, back, and camera buttons. onKeyUp()Called when a user releases a pressed key.This allows you to define the default behavior for each event inside your custom View and determine whether the event should be passed on to some other child View. Again, these are callbacks to the View class, so your only chance to define them is when you build a custom component.XXI.IntentIntentis basically a message that is passed betweencomponents (such asActivities,Services,Broadcast Receivers, andContent Providers). So, it is almost equivalent to parameters passed to API calls. The fundamental differences between API calls and intents' way of invoking components are: API calls aresynchronouswhile intent-based invocations are asynchronous. API calls arecompile timebinding while intent-based calls are run-time binding.Of course, Intents can be made to work exactly like API calls by using what are calledexplicit intents, which will be explained later. But more often than not,implicitintents are the way to go and that is what is explained here.One component that wants to invoke another has to only express its intentto do a job. And any other component that exists and has claimed that it can do such a job throughintent-filters, is invoked by the android platform to accomplish the job. This means, both the components are not aware of each other's existence and can still work together to give the desired result for the end-user.This invisible connection between components is achieved through the combination of intents, intent-filters and the android platform.This leads to huge possibilities like: Mix and match or rather plug and play of components at runtime. Replacing the inbuilt android applications with custom developed applications. Component level reuse within and across applications. Service orientation to the most granular level, if I may say.Here is additional description about intent, almost formal.An intent is an abstract description of an operation to be performed. It can be used withstartActivityto launch anActivity,broadcastIntentto send it to any interestedBroadcastReceivercomponents,andstartService(Intent)or bindService(Intent, ServiceConnection, int)to communicate with a background Service.An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. The primary pieces of information in an intent are: actionThe general action to be performed, such as ACTION_VIEW, ACTION_EDIT, ACTION_MAIN, etc. dataThe data to operate on, such as a person record in the contacts database, expressed as a Uri.Explicit IntentIn anexplicit intent, we actually specify the activity that is required to respond to the intent. In other words, we explicitly designate the target component. This is typically used for application internal messages.PreferencesShared Preferences are a simple, lightweight key/value pair mechanism for saving primitive application data, most commonly a user's application preferences.Using theSharedPreferencesclass, we can create named maps of key/value pairs within our application that can be shared among application components running in the same application context.Shared Preferences support the primitive types Boolean, string, float, long, and integer, making them an ideal means of quickly storing default values, class instance variables, the current UI state, and user preferences. They are most commonly used to persist data across user sessions and to share settings among application components.How we get access to the preference? getPreference()from within Activity:to access activity specific preference. getSharedPreferences()from within Activity or other application Context :to access application-level preference. getDefaultSharedPreferences()onPreferencesManagerto get the shared preferences that work in concert with Android's overall preference framework.All of these methods return an instance ofSharedPreferences, which offers a series of getters to access named preferences, returning a suitably typed result. The getters also take a default value, which is returned if there is no preference set under the specified key.Given the appropriateSharedPreferencesobject, we can useedit()to get an editor for the preferences. This object has a set of setters that mirror the getters on the parentSharedPreferencesobject. It also has the following methods: remove(): Deletes a single named preference. clear(): Deletes all preferences. commit(): Persists our changes made via the editor.Thecommit()method is important. If we modify preferences using the editor and fail tocommit()the changes, those changes will evaporate once the editor goes out of scope.Conversely, since the preferences object supports live changes, if one part of our application modifies shared preferences, another part of our application will have access to the changed value immediately.ManifestThe foundation for any Android application is the manifest file. Every application must have anAndroidManifest.xmlfile in its rootdirectory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Among other things, the manifest does the following: Itnames the Java packagefor the application. The package name serves as a unique identifier for the application. It describes thecomponents of the application- the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched. It determines whichprocesseswill host application components. It declares whichpermissionsthe application must have in order to access protected parts of the API and interact with other applications. It also declares thepermissionsthat others are required to have in order to interact with the application's components. It lists theInstrumentationclasses that provide profiling and other information as the application is running. These declarations are present in the manifest only while the application is being developed and tested; they're removed before the application is published. It declares theminimum level of the Android APIthat the application requires. It lists thelibrariesthat the application must be linked against.

Structure of the AndroidManifest.xml FileThe diagram below shows the general structure of the manifest file and every element that it can contain. Each element, along with all of its attributes, is documented in full in a separate file.

. . .

. . .

. . .

File ConventionsSome conventions and rules apply generally to all elements and attributes in the manifest:ElementsOnly the and elements are required, they each must be present and can occur only once. Most of the others can occur many times or not at all although at least some of them must be present for the manifest to accomplish anything meaningful. If an element contains anything at all, it contains other elements. All values are set through attributes, not as character data within an element. Elements at the same level are generally not ordered. For example, , , and elements can be intermixed in any sequence. (An element is the exception to this rule: It must follow the it is an alias for.)

AttributesIn a formal sense, all attributes are optional. However, there are some that must be specified for an element to accomplish its purpose. Use the documentation as a guide. For truly optional attributes, it mentions a default value or states what happens in the absence of a specification. Except for some attributes of the root element , all attribute names begin with anandroid: prefix for example, android:alwaysRetainTaskState. Because the prefix is universal, the documentation generally omits it when referring to attributes by name.

Declaring class namesMany elements correspond to Java objects, including elements for the application itself (the element) and its principal components activities (), services (), broadcast receivers (), and content providers (). If you define a subclass, as you almost always would for the component classes (Activity, Service, BroadcastReceiver, and ContentProvider), the subclass is declared through a name attribute. The name must include the full package designation. For example, an Service subclass might be declared as follows:

. . .

. . .

Multiple valuesIf more than one value can be specified, the element is almost always repeated, rather than listing multiple values within a single element. For example, an intent filter can list several actions:

. . .

Resource valuesSome attributes have values that can be displayed to users for example, a label and an icon for an activity. The values of these attributes should be localized and therefore set from a resource or theme. Resource values are expressed in the following format,@[package:]type:namewhere thepackagename can be omitted if the resource is in the same package as the application,typeis a type of resource such as "string" or "drawable" andnameis the name that identifies the specific resource. String valuesWhere an attribute value is a string, double backslashes ('\\') must be used to escape characters for example, '\\n' for a newline or '\\uxxxx' for a Unicode character.File FeaturesThe following sections describe how some Android features are reflected in the manifest file.Intent FiltersThe core components of an application (its activities, services, and broadcast receivers) are activated byintents. An intent is a bundle of information (an Intent object) describing a desired action including the data to be acted upon, the category of component that should perform the action, and other pertinent instructions. Android locates an appropriate component to respond to the intent, launches a new instance of the component if one is needed, and passes it the Intent object.Components advertise their capabilities the kinds of intents they can respond to throughintent filters. Since the Android system must learn which intents a component can handle before it launches the component, intent filters are specified in the manifest as elements. A component may have any number of filters, each one describing a different capability.An intent that explicitly names a target component will activate that component; the filter doesn't play a role. But an intent that doesn't specify a target by name can activate a component only if it can pass through one of the component's filters.Icons and LabelsA number of elements haveiconandlabelattributes for a small icon and a text label that can be displayed to users. Some also have adescriptionattribute for longer explanatory text that can also be shown on-screen. For example, the element has all three of these attributes, so that when the user is asked whether to grant the permission to an application that has requested it, an icon representing the permission, the name of the permission, and a description of what it entails can all be presented to the user.In every case, the icon and label set in a containing element become the default icon and label settings for all of the container's sub elements. Thus, the icon and label set in the element are the default icon and label for each of the application's components. Similarly, the icon and label set for a component for example, an element are the default settings for each of the component's elements. If an element sets a label, but an activity and its intent filter do not, the application label is treated as the label for both the activity and the intent filter.The icon and label set for an intent filter are used to represent a component whenever the component is presented to the user as fulfilling the function advertised by the filter. For example, a filter with "android.intent.action.MAIN" and "android.intent.category.LAUNCHER" settings advertises an activity as one that initiates an application that is, as one that should be displayed in the application launcher. The icon and label set in the filter are therefore the ones displayed in the launcher.

Permissions:Apermissionis a restriction limiting access to a part of the code or to data on the device. The limitation is imposed to protect critical data and code that could be misused to distort or damage the user experience.Each permission is identified by a unique label. Often the label indicates the action that's restricted. For example, here are some permissions defined by Android:android.permission.CALL_EMERGENCY_NUMBERS android.permission.READ_OWNER_DATA android.permission.SET_WALLPAPER android.permission.DEVICE_POWERA feature can be protected by at most one permission.If an application needs access to a feature protected by a permission, it must declare that it requires that permission with a element in the manifest. Then, when the application is installed on the device, the installer determines whether or not to grant the requested permission by checking the authorities that signed the application's certificates and, in some cases, asking the user. If the permission is granted, the application is able to use the protected features. If not, its attempts to access those features will simply fail without any notification to the user.An application can also protect its own components (activities, services, broadcast receivers, and content providers) with permissions. It can employ any of the permissions defined by Android (listed in android.Manifest.permission) or declared by other applications. Or it can define its own. A new permission is declared with the element. For example, an activity could be protected as follows:

. . .

. . .

. . .

. . .

The element declares a namespace for a group of permissions that will be defined in code. And defines a label for a set of permissions (both those declared in the manifest with elements and those declared elsewhere). It affects only how the permissions are grouped when presented to the user. The element does not specify which permissions belong to the group; it just gives the group a name. A permission is placed in the group by assigning the group name to the element's permissionGroup attribute.

LibrariesEvery application is linked against the default Android library, which includes the basic packages for building applications (with common classes such as Activity, Service, Intent, View, Button, Application, ContentProvider, and so on).However, some packages reside in their own libraries. If your application uses code from any of these packages, it must explicitly ask to be linked against them. The manifest must contain a separateelement to name each of the libraries. (The library name can be found in the documentation for the package.)

AnimationAndroid supports three types of animation: Frame-by-frame animation: A series of frames is drawn one after the other at regular intervals. Layout animation: Animate views inside a container view such as lists and tables. View animation: Animate any general-purpose view.

3.SQL:We have used SQL in our project to enter databases. SQL is a standard language for accessing and manipulating databases. SQL stands for Structured Query Language. SQL lets you access and manipulate databases. SQL is an ANSI (American National Standards Institute) standard. SQL can execute queries against a database. It can retrieve data from a database. It can insert records in a database. It can update records in a database. It can delete records from a database, create new database, create new tables in the database, create new views. It can create stored procedures in a database. It can set permissions on tables, procedures, and views. Originally based uponrelational algebraandtuple relational calculus, SQL consists of adata definition languageand adata manipulation language. It also includesproceduralelements. The scope of SQL includes data insert, query, update and delete,schemacreation and modification, and data access control. Queries allow the user to describe desired data, leaving thedatabase management system (DBMS)responsible forplanning,optimizing, and performing the physical operations necessary to produce that result as it chooses.4.SQLite DatabaseSQLiteis arelational database management systemcontained in aCprogramminglibrary. In contrast to many other database management systems, SQLite is not aclientserverdatabase engine. Rather, it is embedded into the end program. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. The database file format is cross-platform - you can freely copy a database between 32-bit and 64-bit systems.Main Features of SQLite: Transactionsare atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures. Zero-configuration- no setup or administration needed. Full SQL implementationwith advanced features likepartial indexesandcommon table expressions. A complete database is stored in asingle cross-platform disk file. Great for use as anapplication file format. Supports terabyte-sized databases and gigabyte-sized strings and blobs. Small codefootprint: less than 500KiB fully configured or much less with optional features omitted. Simple, easy to useAPI. Well-commented source code with100% branch test coverage. Self-contained: no external dependencies. Cross-platform: Android, *BSD, iOS, Linux, Mac, Solaris, VxWorks, and Windows (Win32, WinCE, WinRT) are supported out of the box. Easy to port to other systems. Sources are in thepublic domain. Use for any purpose. Comes with a standalonecommand-line interface(CLI) client that can be used to administer SQLite databases.Content Providers IntroductionContent Providers are one of the fundamental building blocks of the Android Platform. Content Provider brings us to the concept of how to deal with data stored in the Android. A content provider is a wrapper around the data. Android exposes data through acontent provider.When using a content provider, all we really need to know is the provider's base URI. From there, we can run queries and construct a URIto a specific instance.The URI always starts withcontent://, indicating it is acontent URI instead of a URI to a web resource, http://.Any application on the device can make use of theseURIs to access and manipulate data. As a consequence, content providers play a significant role in sharing data between applications.There are 4 ways we can store data: PreferencesPreferences are used to store user preferences for a single application or across applications in a mobile. They are typically name-value pairs accessible to the context. FilesFiles can be stored directly on to the mobile or to extended storage mediums. They are by default not accessible to applications other than the one that created it. Database (RDBMS)Android supports creation of databases based on SQLite. These are again private to the application that created it. NetworkAndroid provides API support to store data over the network on to a server.No matter how the data is stored, Content Providers give a uniform interface to access the data. Data is exposed as a simple table with rows and columns where row is a record and column is a particular data type with a specific meaning. A row could be about a single person and the columns could be the person first name, number, address, email id etc.Life CycleWriting an application with a good understanding of theactivity life cycleis critical to ensure that our application provides a seamless user experience and properly manages its resources.Android application does not control its own process lifetimes. The Android run time manages the process of each application. While the run time handles the termination and management of an activity's process, the activity's state helps determine the priority of its parent application. The application priority, in turn, affects the likelihood that the run time will terminate it and the activities running within it.

Activity StacksThe state of each activity is determined by its position on the activity stack. When a new activity starts, the current foreground screen is moved to the top of the stack. If the user navigates back using the Back button or the foreground activity is closed, the next activity on the stack moves up and becomes active.An application's priority is influenced by its highest-priority activity. When the Android memory manager is deciding which application to terminate to free resources, it uses this stack to determine the priority of applications based on their activities. Activity StatesAs activities are created and destroyed they move in and out of the stack. They transition through 4 states: ActiveWhen an activity is at the top of the stack it is the visible, focused, foreground activity that is receiving user input. Android will attempt to keep it alive at all cost, killing activities further down the stack as needed, to ensure that it has the resources it needs. When another activity becomes active, this one will be paused. PausedIn some cases our activity will be visible but will not have focus. At this point it's paused. This state is reached if a transparent or not-full-screen activity is active in front of it. When paused, an activity is treated as if it were active. However, it doesn't receive user input events. In extreme cases, Android will kill a paused activity to recover resources for the active activity. When an activity becomes totally obscured, it is stopped. StoppedWhen an activity isn't visible, it stops. The activity will remain in memory, retaining all state information. However, it is now a candidate for termination when the system requires memory elsewhere. When an activity stopped, it's important to save data and the current UI state. Once an activity exited or closed, it becomes inactive. InactiveAfter an activity has been killed, and before it's been launched, it's inactive. Inactive activities have been removed from the activity stack and need to be restarted before they can be displayed and used.State transitions are nondeterministic and are handled entirely by the Android memory manager. Android will start by closing applications that contain inactive activities, followed by those that are stopped. In extreme cases it will remove those that are paused.Activity Lifetimes:Within an activity's full lifetime, between creation and destruction, it will go through one or more iterations of the active and visible lifetimes. Each transition will trigger the method handlers as shown in the previous code sample.Full LifetimeThe full life time of our activity occurs between the first call toonCreate()and the final call toonDestroy(). It's possible, in some cases, for an activity's process terminates without theonDestroy()not being called.Use theonCreate()method to initialize activity. Inflate the user interface, allocate references to class variables, bind data to controls, and create services and threads. TheonCreate()method is passed aBundleto restore the user interface to its previous state, either within theonCreate()method or by overridingonRestoreInstanceState().It's recommended that we avoid the creation of short-term objects. Rapid creation and destruction of objects force additional garbage collection.

Visible LifetimeAn activity's visible lifetimes are bound between calls toonStart()andonStop(). Between these calls our activity will be visible to the user, although it may not have focus and may be partially obscured. Activities are likely to go through several visible lifetimes during their full lifetime, as they move between the foreground and background. While it's unusual, Android run time will kill an activity during its visible lifetime without a call toonStop().TheonStop()method should be used to pause or stop animations, threads, sensor listeners, GPS lookups, timers, services, or other processes that are used exclusively to update the user interface. There's little value in consuming resources to update the UI when it isn't visible. Use theonStart()method to resume or restart these processes when the UI is visible again.TheonStart()method is called immediately prior to all but the first call toonStart(). Use it to implement special processing that we want done only when the activity restarts within its full lifetime.TheonStart()/onStop()methods are also used to register and unregister Broadcast Receivers that are being used exclusively to update the user interface

Active LifetimeThe active lifetime starts with a call toonResume()and ends with a call toonPause().An active activity is in the foreground and its receiving user input events. Our activity is likely to go through several active lifetimes before it's destroyed, as the active lifetime will end when a new activity is displayed, the device goes to sleep, or the activity loses focus. Try to keep code in theonPause()andonResume()methods relatively fast and lightweight to ensure that our application remains responsive when moving in and out of the foreground. Immediately beforeonPause(), a call is made toonSaveInstanceState(). This method provides an opportunity to save the activity's UI state in aBundlethat will be passed to theonCreate()andonRestoreInstanceState()methods. UseonSaveInstanceState()to save the UI state to ensure that the activity can present the same UI when it next becomes active. We can safely assume that during the active lifetimeonSaveInstanceState()andonPause()will be called before the process is terminated.Most activity implementations will override at least theonPause()method to commit unsaved changes, as it marks the point beyond which an activity may be killed without warning. Depending on our application, we may also choose to suspend threads, processes, Broadcast Receivers while our activity is not in the foreground.TheonResume()method can be very lightweight. We will not need to reload the UI state here as this is handled by theonCreate()andonRestoreInstanceState()methods when required. UseonResume()to reregister any Broadcast Receivers or other processes we may have suspended inonPause().

Activity ClassesHere is the list of the most useful activity classes. MapActivityEncapsulates the resource handling required to support aMapViewwidget within an activity. ListActivityWrapper class for activities that feature aListViewbound to a data source as the primary UI metaphor, and exposing event handlers for list item selection. ExpandableActivitySimilar to theListActivitybut supporting anExpandableListViewbound to a data source as the primary UI metaphor, and exposing event handlers for list item selection. TabActivitya. Enables us to embed multiple activities or View within a single screen using a tab widget to switch among them. b.Query the local Bluetooth adapter for paired Bluetooth devices c. Connect to other devices through service discoveryd. Transfer data to and from other devicese. Manage multiple connections

Testing Tool:It is used to testing of application to find errors or any other designingProblems.Genymotion :We have used genymotion to evaluate our project. Itis an Android emulator which comprises a complete set of sensors and features in order to interact with a virtual Android environment. It (currently inbeta) isavailable for Linux, Windows and Mac OS X and requires virtual box. It is free to use.It offers OpenGL hardware acceleration, multi screen, full screen display. It is fast, simple to install and powerful thanks to user-friendly sensor widgets and interaction features. It is available for Windows, Mac OS X and Linux operating systems. Control simulated sensors like battery, GPS, and accelerometer with a the user-friendly interface. It offerspowerful command line tools allow you to build complex tests.It has user-friendly interface Taking advantage of OpenGL hardware acceleration, it allows you to test your applications with amazing 3D performance. It usesx86 architecture virtualization, making it much more efficient. It perfectly integratesin your development environment with Eclipse plug-in. It is packaged for Windows, Mac and Linux. It controls powerful sensors to test specialized features on your app. It lets you emulate Android directly from your desktop. Version are 2.3.1,2.3.0,2.2.0,2.2.2 The version of genymotion used in this project is version 2.3.0FEASIBILITY STUDY A feasibility study is carried out to select the best system that meets performance requirements. The main aim of the feasibility study activity is to determine whether it would be financially and technically feasible to develop the application. The feasibility study activity involves the analysis of the problem and comment of all relevant information relating to the application, such as the different data items which would be input to the system.1. Technical FeasibilityThis is concerned with specifying application that will successfully satisfy the user requirement. The technical needs of the system may vary considerably, but might include: The facility to produce outputs in a given time. Response time under certain conditions. Facility to communicate data to distant locations.In examining technical feasibility, configuration of the system is given more importance than the actual make of hardware. The configuration should give the complete picture about the system required.

2. Economic FeasibilityEconomic analysis is the most frequently used technique for evaluating the effectiveness of a proposed system. More commonly known as Cost / Benefit analysis, the procedure is to determine the benefits and savings that are expected from a proposed system and compare them with costs. If benefits outweigh costs, a decision is taken to design and implement the system. Otherwise, further justification or alternative in the proposed system will have to be made if it is to have a chance of being approved. This is an outgoing effort that improves in accuracy at each phase of the system life cycle.

REQUIREMENT ANALYSISEclipse IDEIncomputer programming,Eclipseis anintegrated development environment(IDE). It contains a baseworkspaceand an extensibleplug-insystem for customizing the environment. Written mostly inJava, Eclipse can be used to develop applications. Eclipse got its start in 2001 when IBM donated three million lines of code from itsJava tools. The original goal of Eclipse was to create and foster an open source IDE community that would complement the community that surroundsApache.Eclipse provides a common user interface (UI) model for working with tools. It is designed to run on multiple operating systems while providing robust integration with each underlying OS. Plug-ins can program to the Eclipse portable APIs and run unchanged on any of the supported operating systems.At the core of Eclipse is architecture for dynamic discovery, loading, and running of plug-ins. The platform handles the logistics of finding and running the right code. The platform UI provides a standard user navigation model. Each plug-in can then focus on doing a small number of tasks well like Defining, testing, animating, publishing, compiling, debugging and diagramming.The Eclipse platform defines an open architecture so that each plug-in development team can focus on their area of expertise. Let the repository experts build the back ends and the usability experts build the end user tools. If the platform is designed well, significant new features and levels of integration can be added without impact to other tools. The Eclipse platform uses the model of a common workbench to integrate the tools from the end user's point of view. Tools that you develop can plug into the workbench using well defined hooks calledextension points.

Eclipse ADT (Android Development Tools) Android Development Tools (ADT) is a Google-provided plugin for the Eclipse IDE that is designed to provide an integrated environment in which to build Android applications. ADT extends the capabilities of Eclipse to let developers set up new Android projects, create an application UI, add packages based on the Android Framework API, debug their applications using the Android SDK tools, and export signed (or unsigned) .apk files in order to distribute their applications. It is free download. It was the official IDE for Android but has been replaced byAndroid Studio (based on IntelliJ IDEA Community Edition).

MODULAR DESCRIPTION OF JOBWe have done this project in Eclipse ADT. This application contains some module as if user module and back-end i.e. database module. We have done these modules that were assigned by our team leader. In this firstly we had to learn about basics of Eclipse ADT. And after this we started working on this project.

Database Module As the name specifies Database it contains all the tables in the database. Database is used to store different types of data at different locations. The whole data in the database is in the form of table it means data can be stored in the form of tables. The database used in this project Intelligent tourism system are:

Users Information TableSo user table it contain the users information in this table. Whenever any new user registers on the website all the registration form data will be saved in users table.

Trip plan TableIn this table all the information about the trip is stored which is planned by the user.

IV.2- User Module This is our next module (it is a front-end of our project). User module also further divided into sub module as if registration for a new user, login for users who already registered, and main page of application. Further description is given below: We have created first page that we all know the login page it contain login for existing user and a signup form for new users who are not registered . The second page that we have created is register page which contains form for new users who are not registered to the application. Then third page is the main page of the application where a user can search for the nearby places he/she wants to visit. Another pages in our application includes forgot password page and trip planning page.

DATAFLOW DIAGRAM

DATABASECREATE PLANVIEW PLANMY POCKETNEAR BYMY PLANDATABASEREGISTERLOGIN

VI- DETAILED ANALYSIS OF INDIVIDUAL MODULE1.Front Page

2.Login PageIn Login Page user has to put in their username and password to open their profile. It also contains links to forget password and register page. Null value validations has been applied on each edit text field i.e. user cannot left any field blank. There is also a button to reset the fields in case user has input the wrong username and password. Username and password are fetched from database to login in activity.

3.Registration PageIn registration page a new user can register. He/She has to fill in details such as his/her name, password, email address and security question and answer to register on the application. There is also a confirm password field. Each user is given a unique username which is used to login in activity. Null value validations has been applied on each edit text field i.e. user cannot left any field blank. All the database of the user is maintained in SQLite database which is further used to login into activity. Two buttons are present on the registration page one is submit button which is used to submit the detail of user and store it into the database and another button is reset button which is used to reset the fields to blank.

4.Login Page

5.Main Activity PageIn this there is links been provided to search for the nearby places and plan the trip. To search for the nearby places user must be connected to the internet and has activated GPS on his/her mobile.PS will fetch the current location of the user and will show the nearby places. User can select the option from the drop down list to show the place of his/her choice. Logout button is used to exit the application. Person is directed to login page after clicking the logout button.

6.Trip plan pageOn this page person can make the plan for the trip and view the plan. Person can enter the plan name, duration of the plan, name of the place where he/she wants to visit and can tick the check boxes for the things he/she wants to do there. After filling all the data person needs to click on the create button to store the plan into the database. The stored plan can be viewed on view plan page.

7.Near By

8.My Pocket

CONCLUSION AND FUTURE ENHANCEMENTS

1.ConclusionTourism is a major source of income for many countries, and affects the economy of host country . So, it is required to build a system for mobile devices which can help tourists conveniently. This mobile application helps the tourists to know more about the visiting places and plan there trip accordingly. It makes the trip of the tourist easy and convenient. Person can easily find the nearby plan places. User can register and login to use the application.

2. FUTURE ENHANCEMENTS Smoothing object search technique Deletion and modification of trip plans Adding email verification technique We can add on hotels nd taxi services

BIBLIOGRAPHYWebsites http://stackoverflow.com/ http://developer.android.com/index.html www. HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"tutorials HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"point.com/ HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"android HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"/ HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"android HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"_ HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"tutorial HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf". HYPERLINK "http://www.tutorialspoint.com/android/android_tutorial.pdf"pdf www. HYPERLINK "http://www.tutorialspoint.com/eclipse/"tutorials HYPERLINK "http://www.tutorialspoint.com/eclipse/"point.com/ HYPERLINK "http://www.tutorialspoint.com/eclipse/"eclipse HYPERLINK "http://www.tutorialspoint.com/eclipse/"/Books Java the complete reference- Herbert Schildt Programming with Java- E Balagurusamy2 | Page