Project Report
on
Smart Shopper Android Mobile Application
for
CSCI 6838- Research Project and Seminar
Instructor
Dr. Said Bettayeb
Project Members
Avinash Sole
Venkata Jeevan Koka
Raghavendra Aditya Mullapudi
Sravan Kumar Doddi
Hari Krishna Terala
ABSTRACT:
Smart Shopper is a mobile application developed using Android technology. The application retrieves the user’s location using Android GPS service. For each location, various shops are maintained. Each shop contains a list of items that can be purchased and the user can select items that are part of the shopping location and add them to the list. When a user goes to that particular shop, one can open and see what all he/she needs and make purchases. One can also share the list via e-mail or as a text message to his/her family or friends who are going for shopping. Hot deals are also maintained for all the shops.
INDEX
-
INTRODUCTION 4
-
PURPOSE 4
-
MOTIVATION OF PROJECT 4
-
BRIEF DESCRIPTION OF PROJECT 4
-
LIST OF ACRONYMS 5
-
PROJECT ANALYSIS 5
-
SCOPE OF THE PROJECT 5
-
EXISTING SYSTEM 5
-
PROPOSED SYSTEM 6
-
OVERVIEW OF MODULES 6
-
ASSUMPTIONS AND DEPENDENCIES 8
-
REQUIREMENT ANALYSIS 8
-
HARDWARE REQUIREMENTS
-
SOFTWARE REQUIREMENTS
-
PROJECT DESIGN 8
-
USE CASE DIAGRAM 9
-
CLASS DIAGRAM 10
-
SEQUENCE DIAGRAM 13
-
ACTIVITY DIAGRAM 16
-
PROJECT IMPLEMENTATION 17
-
BREIF DESCRIPTION OF ANDROID 18
-
ECLIPSE 3.7.1 20
-
JAVA JDK.1.7 21
-
ANDROID SDK 21
-
PROJECT CONFIGURATION 22
-
FUTURE SCOPE 25
-
CONCLUSIONS 25
-
BIBILIOGRAPHY 25
-
APPENDIX 26
-
SCREEN SHOTS 28
-
LIST OF FIGURES 43
-
INTRODUCTION
-
PURPOSE:
“No more paper lists, save a few trees” – Go paperless
The main objective of this application is to remind the list of items you specified in your mobile to be purchased. We can create our own shopping list. For example, in day to day life, we have to purchase lot of items. We may forget the items to be purchased. This mobile application is particularly useful in reminding shopping list.
-
MOTIVATION OF PROJECT
Many innovative ideas are being incorporated in the mobile phones in order to make the device more and more consumer oriented. It was originally intended for making calls. Later many new features were added one after another. ‘Smart Shopper’ is a mobile application developed using Android technology.
-
BRIEF DESCRIPTION OF PROJECT
This application is used to make a list of upcoming purchases. It immensely facilitates ones shopping experience. It is extremely easy to use. One can simply create multiple shopping lists for various shops at a particular location. When the user is done adding all products to be purchased to cart, it automatically estimates the total cost of the shopping. One can view or edit the lists previously created. He/she can also browse nearby stores at given locations. The application maintains all the hot deals which may change day to day. One can share lists with relatives and friends with a simple click through E-mail or through a text message. It is highly convenient to keep track of one’s budget as this provides a very notable feature of maintaining gross expenditure for those lists. This application also provides a special feature where a user can scan a particular product and retrieve information about it at the nearby stores with the help of barcodes and QR codes, and can add that product which is cheaper at one of the shops. Thus with smart shopper, shopping can become fast, easy and effective process.
-
LIST OF ACRONYMS
-
ADB - Android Debug Bridge
-
API - Application Program Interface
-
APK - Android Package
-
DDMS - Dalvik Debug Monitor Service
-
DEX - Dalvik Executable
-
GPS - Global Positioning System
-
J2SE - Java 2 Standard Edition
-
SDK - Software Development Kit
-
SOA - Service Oriented Architecture
-
XML - Extensible Markup Language
-
PROJECT ANALYSIS
-
SCOPE OF THE PROJECT
The scope of the project is to create to-do applications like shopping lists and then browse for all the lists created for a particular store. It is typically based on selecting the location through settings or for the first time usage of the application. So once the application selects a location, it shows all the shops nearby with their latest deals. The user goes through the deals and adds that item in his shopping cart. If he changes location, he gets various stores around him for that location. So the application is location based.
-
EXISTING SYSTEM
There are many shopping applications present in the Android market. Most of these applications are just a to-do list. These applications have a predefined category list from which items can be selected and added to the list. Very few applications provide the facility of sharing the list via SMS and email and also selecting a particular location and browse for stores at that particular location.
-
PROPOSED SYSTEM
The feature which is unique from all the other application in the current system is the location based service. Based on the current location of the user, shops are dynamically added. This application uses the Google maps API to get the user location. Features like editing, deleting and sharing list via SMS and e-mail is provided. History of lists previously created is maintained in a separate folder for future reference. Our application has a feature called ‘budget’, which displays the monthly or yearly expenses on different stores.
-
OVERVIEW OF MODULES
The Smart Shopper application essentially has seven modules. They are:
-
Create list
A user can create multiple shopping lists from various shops. One can create any number of lists for a particular store. The application maintains various departments/categories for shopping. So, he can select items from various categories and place them in a shopping cart and save it. He can also create other list for the same store. But, he cannot add other shop’s items to a shopping list of another store. So, for each store there will be individual shopping lists created.
-
View lists
Lists that are already created can be viewed or modified in this module. When a list is opened a user can delete a list, add items or delete items, can also share the list through E-mail or a text message. When a user opens a list, he gets the total amount that he should spend for those items.
-
List of shops
This module lists out all the available and nearby stores in a particular location and this location can be retrieved using the android GPS automatically, or the user can select the location manually.
-
Hot deals
Smart shopper is your mobile source for the latest coupons, promo codes, and sales from your favorite stores. Deals are updated throughout the day. It scours the internet for savings on nearly everything so you can save when making every day purchases. It is very easy to use as, the hot deals module finds the best deals for the day.
-
Settings
This feature allows the user to change location. It provides the user with two options, where the location can be retrieved automatically or can be manually entered. The application is location oriented so, as the location changes the shopping lists, hot deals, nearby shops, everything changes.
This is done primarily at two levels, first at the first usage of the application and also when you open the settings.
-
Budget
Budget is an easy to use feature that will help you track and understand your expenses. This module helps to keep track of spending and keep to a budget. One can easily see the total income and the total expenses for a period, plus which expenses he/she is spending the most on and which expenses are going over budget. It calculates the percentage of the total money that has been spent on a given set of lists. It maintains monthly as well as yearly statistics. This way, the user can see how much money he has spent on an average for a specific store for a specific moth/year.
-
Barcode
This feature serves as one of the best shopping companion. It can not only scan barcodes, but also QR codes which encodes details about a particular product. It is fast and effective, opens instantly in real-time scanning mode via the device’s camera. It helps the shopper to compare the price of a product at all the nearby stores, so that he can get the best price.
-
ASSUMPTIONS AND DEPENDENCIES
-
To use this application GPS hardware must be available.
-
Having only hardware is not sufficient, to access an application Software is must.
-
Assumption is made in such a way that the mobile is charged with enough battery.
-
The battery should be in a working mode.
-
The one who using the mobile must have a minimum knowledge of how to use the Smart shopper.
-
REQUIREMENT ANALYSIS
HARDWARE REQUIREMENTS
Device: Android Smartphone with internet connection
Memory required: 10MB of free space
SOFTWARE REQUIREMENTS
Operating system: Android
Version: 2.1 and above
Development Platform: Eclipse 3.7.1
Programming Language: Java
Database: SQLite, Shared preferences
-
PROJECT DESIGN
The Unified Modelling Language (UML) is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modelling and other non-software systems. The UML represents a collection of the best engineering practices that have proven successful in the modelling of large and complex systems.
UML Diagrams
UML diagram is designed to let developers and customers view a software system from a different perspective and in varying degrees of abstraction. UML diagrams commonly created in visual modeling tools include.
-
USE CASE DIAGRAM
A use case is a set of scenarios that describing an interaction between a user and a system. A use case diagram displays the relationship among actors and use cases. The two main components of a use case diagram are use cases and actors.
Figure 1: Use Case Diagram for Smart Shopper Application
-
CLASS DIAGRAM
Class diagrams are widely used to describe the types of objects in a system and their relationships. Class diagrams model class structure and contents using design elements such as classes, packages and objects. Class diagrams describe three different perspectives when designing a system, conceptual, specification, and implementation.
Figure 2: Classes in Share list package.
Figure 3: Classes in history package.
Figure 4: InitTask5, Shop List and Shop List Custom Adapter
Figure 5: Classes in Shopping List Package.
Figure 6: Menu, Smart Shopee Activity, About Help, Even Data SQL Helper and classes in hot deal package.
Figure 7: Data Base Handler class.
-
SEQUENCE DIAGRAM
Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and the messages they pass. The diagrams are read left to right and descending.
Figure 8: Sequence Diagram for Create List use case
Figure 9: Sequence Diagram for view lists use case
Figure 10: Sequence Diagram for List of Shops use case
Figure 11: Sequence Diagram for hot deals use case
Figure 12: Sequence Diagram for Budget use case
Figure 13: Sequence Diagram for Barcode Use Case
-
ACTIVITY DIAGRAM
Activity diagrams describe the workflow behavior of a system. Activity diagrams are similar to state diagrams because activities are the state of doing something. The diagrams describe the state of activities by showing the sequence of activities performed. Activity diagrams can show activities that are conditional or parallel.
Figure 14: Activity Diagram for Shopping Lists
-
PROJECT IMPLEMENTATION
-
BREIF DESCRIPTION OF ANDROID
The Android platform is a software stack for mobile devices including an operating system, middleware and key applications. Developers can create applications for the platform using the Android SDK. Applications are written using the Java programming language and run on Dalvik, a custom virtual machine designed for embedded use, which runs on top of a Linux kernel.
ANDROID ARCHITECTURE
The following diagram shows the major components of the Android operating system. Each section is described in more detail below.
Figure 15: Android architecture (Source: http://source.android.com/)
APPLICATIONS
Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.
APPLICATION FRAMEWORK
Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user.
Underlying all applications is a set of services and systems, including:
-
A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser
-
Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
-
A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files
-
A Notification Manager that enables all applications to display custom alerts in the status bar
-
An Activity Manager that manages the life cycle of applications and provides a common navigation back stack
LIBRARIES
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below:
-
System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices
-
Media Libraries - based on PacketVideo's OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
-
Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications
-
LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view
-
SGL - the underlying 2D graphics engine
-
3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer
-
FreeType - bitmap and vector font rendering
-
SQLite - a powerful and lightweight relational database engine available to all applications
ANDROID RUNTIME
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dex" tool.
The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.
LINUX KERNEL
Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.
-
ECLIPSE 3.7.1
An open-source Java IDE and platform for rich client applications, an open source platform-independent software framework for delivering what the project calls or is known as "rich-client applications" (as opposed to "thin clients", this means the clients perform heavy-duty work on the host. So far this framework has typically been used to develop IDEs (Integrated Development Environments), such as the highly-regarded Java IDE called Java Development Toolkit (JDT) and compiler that come as part of Eclipse (and which are also used to develop Eclipse itself). However, it can be used for other types of client application as well, see the popular BitTorrent client for example.
-
JAVA JDK.1.7
Computers connected to the net are from many different manufacturers, running on different operating systems and they differ in architecture, computing power and capacity. By considering this point SUN Microsystems Corporation felt the need for a new programming language suitable for this heterogeneous Environment and java was the solution. This breaks barriers between different computers, chips and operating systems.
The main properties of the Java, which made Java so popular, are as follows:
-
Simple
-
Secure
-
Portable
-
Object-Oriented
-
Robust
-
Multithreaded
-
Interpreted
-
High performance
The key that allows Java to solve both the security and the portability problems just described is that the output of a Java compiler is not executable code. Rather, it is Byte code. Byte code is a highly optimized set of instructions designed to be executed by the Java runtime systems, which is called the Java Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for Byte code. This may come has a bit of surprise.
-
ANDROID SDK
The Android SDK includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. Currently supported development platforms include x86-based computers running Linux (any modern desktop Linux Distribution), Mac OS X 10.4.8 or later, Windows XP or Vista. Requirements also include Java Development Kit, Apache Ant, and Python 2.2 or later. The officially supported integrated development environment (IDE) is Eclipse (3.2 or later) using the Android Development Tools (ADT) Plug-in, though developers may use any text editor to edit Java and XML files then use command line tools to create, build and debug Android applications.
-
PROJECT CONFIGURATION
Our application can be downloaded from http://smartshop.xml.in/ where we provide the APK of the application. Installation is few more steps and you are ready with application.
Figure 16: http://smartshop.xml.in/ showing our APK key.
Figure 17: SmartShopee.apk downloaded and is being installed.
Figure 18: Installation page of the application.
Figure 19: Installation successful page.
Figure 20: Successful installation of the app and icon at the applications page.
-
FUTURE WORK
In future implementations, our project is extended to develop the following utilities:
-
Add stores to several other locations.
-
Browsing product images and ratings.
-
Calculating the total amount of your shopping list (including your local tax).
-
Purchasing securely right from your mobile device.
-
Product and coupons search.
-
Coupon category filter.
-
CONCLUSIONS
Smart shopper application will greatly facilitate your shopping experience by sorting products to categories. It gives you an opportunity to make your own shopping lists which you may not be afraid to lose or leave at home. It is very convenient to plan shopping with this application which saves lot of time and money. With smart shopper, shopping can become fast, easy and effective process. Enjoy all these features wrapped in a beautiful design.
-
BIBILIOGRAPHY
-
Object-Oriented Modeling and Design with UML (2nd Edition) by Michael R. Blaha and James R Rumbaugh
-
https://www.visual-paradigm.com/ used for modeling our project.
-
http://developer.android.com/index.html Android Developer Community
-
http://www.android.com/
-
JAVA JDK 1.7 http://www.oracle.com/index.html
-
SQLite is used as Database for our project http://www.sqlite.org/
-
Shared Preferences http://developer.android.com/reference/android/content/SharedPreferences.html
-
APPENDIX
The following terms are used in this document
.apk extension: The extension for an Android package file, which typically contains all of the files related to a single Android application. The file itself is a compressed collection of an AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.
.dex extension: Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in the Java programming language.
Action: A description of something that an Intent sender wants done. An action is a string value assigned to Intent. Action strings can be defined by Android or by a third-party developer.
Activity: A single screen in an application, with supporting Java code, derived from the Activity class.
Adb: Android Debug Bridge, a command-line debugging application shipped with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging.
Application: A collection of one or more activities, services, listeners, and intent receivers. An application has a single manifest, and is compiled into a single .apk file on the device.
Content Provider: A class built on Content Provider that handles content query strings of a specific format to return data in a specific format.
Dalvik: The name of Android's virtual machine. The Dalvik VM is an interpreter-only virtual machine that executes files in the Dalvik Executable (.dex) format, a format that is optimized for efficient storage and memory-map able execution. The virtual machine is register-based, and it can run classes compiled by a Java language compiler that have been transformed into its native format using the included "dx" tool. The VM runs on top of Posix-compliant operating systems, which it relies on for underlying functionality (such as threading and low level memory management). The Dalvik core class library is intended to provide a familiar development base for those used to programming with Java Standard Edition, but it is geared specifically to the needs of a small mobile device.
DDMS: Dalvik Debug Monitor Service, a GUI debugging application shipped with the SDK. It provides screen capture, log dump, and process examination capabilities.
Drawable: A compiled visual resource that can be used as a background, title, or other part of the screen. It is compiled into an android.graphics.drawable subclass.
Intent: A class that contains several fields describing what a caller would like to do. The caller sends this intent to Android's intent resolver, which looks through the intent filters of all applications to find the activity most suited to handle this intent. Intent fields include the desired action, a category, a data string, the MIME type of the data, a handling class, and other restrictions.
Intent Filter: Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or messages they can handle or want to receive. An intent filter lists a set of requirements, such as data type, action requested, and URI format, that the Intent or message must fulfill. For activities, Android searches for the activity with the most closely matching valid match between the Intent and the activity filter. For messages, Android will forward a message to all receivers with matching intent filters.
Intent Receiver: An application class that listens for messages broadcast by calling Context.sendBroadcast().
Layout resource: An XML file that describes the layout of an Activity screen.
Manifest: An XML file associated with each Application that describes the various activities, intent filters, services, and other items that it exposes.
URIs: Android uses URI strings both for requesting data (e.g., a list of contacts) and for requesting actions (e.g., opening a Web page in a browser). Both are valid URI strings, but have different values. All requests for data must start with the string "content://". Action strings are valid URIs that can be handled appropriately by applications on the device; for example, a URI starting with "http://" will be handled by the browser.
Appendix A
First usage of application asks to retrieve or enter location
Sample screen with location automatically retrieved
Location can also be manually set this way
Once the location is set, this home screen appears
When create list is pressed the list of vendors are displayed
Different list of categories available for a vendor
Different items present inside each category
When an item is selected you can also select quantity
Shopping cart interface looks like this
One can also enter a name for shopping cart
When clicked on view lists, it lists all the create shopping lists
When a list is selected the available options are share and delete
This shows for deleting a list, also it initiates a request
When there are no lists created, an error message is displayed
This screen shows the share list option
A list can be shared through text message as shown
List have been sent successfully
When e-mail option is used to share a list
These are available options for us to share a list via. E-mail
List of nearby shops for a particular location
When hot deals is clicked, it shows all the available hot deals
Budget screen with total expenditure divided for each store’s shopping list
Barcode module where it is waiting for a code to be read
The scanner reads a barcode and is waiting for suitable text
This is response for the barcode scanned
As shown it also scans QR code
At settings page you can manually alter the location
When there are no shops configured for that location, error msg. is displayed
About/ help screen of our application
When pressed exit it asks user to press yes or no
APPENDIX B – LIST OF FIGURES
-
Use Case Diagram for Smart Shopper Application 9
-
Classes in Share list package 10
-
Classes in history package 11
-
InitTask5, Shop List and Shop List Custom Adapter 11
-
Classes in Shopping List Package 12
-
Menu, Smart Shopper Activity, About Help, Even Data
SQL Helper and classes in hot deal package 13
-
Data Base Handler class 13
-
Sequence Diagram for Create List use case 14
-
Sequence Diagram for view lists use case 14
-
Sequence Diagram for List of Shops use case 15
-
: Sequence Diagram for hot deals use case 15
-
Sequence Diagram for Budget use case 15
-
Sequence Diagram for Barcode Use Case 16
-
Activity Diagram for Shopping Lists 17
-
Android architecture 18
-
http://smartshop.xml.in/ showing our APK key. 22
-
SmartShopee.apk downloaded and is being installed. 23
-
Installation page of the application successful 23
-
Installation successful page 24
-
Successful installation of the app and icon at the applications page 24
Share with your friends: |