The following terms are used in this document

advertisement
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.
2
INDEX
1. INTRODUCTION
4
a. PURPOSE
4
b. MOTIVATION OF PROJECT
4
c. BRIEF DESCRIPTION OF PROJECT
4
d. LIST OF ACRONYMS
5
2. PROJECT ANALYSIS
5
a. SCOPE OF THE PROJECT
5
b. EXISTING SYSTEM
5
c. PROPOSED SYSTEM
6
d. OVERVIEW OF MODULES
6
e. ASSUMPTIONS AND DEPENDENCIES
8
3. REQUIREMENT ANALYSIS
8
a. HARDWARE REQUIREMENTS
b. SOFTWARE REQUIREMENTS
4. PROJECT DESIGN
8
a. USE CASE DIAGRAM
9
b. CLASS DIAGRAM
10
c. SEQUENCE DIAGRAM
13
d. ACTIVITY DIAGRAM
16
5. PROJECT IMPLEMENTATION
17
a. BREIF DESCRIPTION OF ANDROID
18
b. ECLIPSE 3.7.1
20
c. JAVA JDK.1.7
21
d. ANDROID SDK
21
6. PROJECT CONFIGURATION
22
7. FUTURE SCOPE
25
8. CONCLUSIONS
25
9. BIBILIOGRAPHY
25
10. APPENDIX
26
A. SCREEN SHOTS
28
B. LIST OF FIGURES
43
3
1. INTRODUCTION
a. 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.
b. 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.
c. 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.
4
d. 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
2. PROJECT ANALYSIS
a. 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.
b. 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.
5
c. 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.
d. OVERVIEW OF MODULES
The Smart Shopper application essentially has seven modules. They are:
i. 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.
ii. 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.
iii. 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.
6
iv. 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.
v. 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.
vi. 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.
vii. 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.
7
e. 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.
3. 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
4. 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.
8
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.
a. 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
9
b. 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.
10
Figure 3: Classes in history package.
Figure 4: InitTask5, Shop List and Shop List Custom Adapter
11
Figure 5: Classes in Shopping List Package.
12
Figure 6: Menu, Smart Shopee Activity, About Help, Even Data SQL Helper and classes in hot
deal package.
Figure 7: Data Base Handler class.
c. 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.
13
Figure 8: Sequence Diagram for Create List use case
Figure 9: Sequence Diagram for view lists use case
14
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
15
Figure 13: Sequence Diagram for Barcode Use Case
d. 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.
16
Figure 14: Activity Diagram for Shopping Lists
5. PROJECT IMPLEMENTATION
a. 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.
17
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
18
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
19

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.
b. 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
20
(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.
c. 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.
d. 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
21
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.
6. 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.
22
Figure 17: SmartShopee.apk downloaded and is being installed.
Figure 18: Installation page of the application.
23
Figure 19: Installation successful page.
Figure 20: Successful installation of the app and icon at the applications page.
24
7. 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.
8. 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.
9. 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
25
10.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
26
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.
27
Appendix A
First usage of application asks to retrieve or enter location
Sample screen with location automatically retrieved
28
Location can also be manually set this way
Once the location is set, this home screen appears
29
When create list is pressed the list of vendors are displayed
Different list of categories available for a vendor
30
Different items present inside each category
When an item is selected you can also select quantity
31
Shopping cart interface looks like this
One can also enter a name for shopping cart
32
When clicked on view lists, it lists all the create shopping lists
When a list is selected the available options are share and delete
33
This shows for deleting a list, also it initiates a request
When there are no lists created, an error message is displayed
34
This screen shows the share list option
A list can be shared through text message as shown
35
List have been sent successfully
When e-mail option is used to share a list
36
These are available options for us to share a list via. E-mail
List of nearby shops for a particular location
37
When hot deals is clicked, it shows all the available hot deals
Budget screen with total expenditure divided for each store’s shopping list
38
Barcode module where it is waiting for a code to be read
The scanner reads a barcode and is waiting for suitable text
39
This is response for the barcode scanned
As shown it also scans QR code
40
At settings page you can manually alter the location
When there are no shops configured for that location, error msg. is
displayed
41
About/ help screen of our application
When pressed exit it asks user to press yes or no
42
APPENDIX B – LIST OF FIGURES
1. Use Case Diagram for Smart Shopper Application
9
2. Classes in Share list package
10
3. Classes in history package
11
4. InitTask5, Shop List and Shop List Custom Adapter
11
5. Classes in Shopping List Package
12
6. Menu, Smart Shopper Activity, About Help, Even Data
SQL Helper and classes in hot deal package
13
7. Data Base Handler class
13
8. Sequence Diagram for Create List use case
14
9. Sequence Diagram for view lists use case
14
10. Sequence Diagram for List of Shops use case
15
11. : Sequence Diagram for hot deals use case
15
12. Sequence Diagram for Budget use case
15
13. Sequence Diagram for Barcode Use Case
16
14. Activity Diagram for Shopping Lists
17
15. Android architecture
18
16. http://smartshop.xml.in/ showing our APK key.
22
17. SmartShopee.apk downloaded and is being installed.
23
18. Installation page of the application successful
23
19. Installation successful page
24
20. Successful installation of the app and icon at the applications page
24
43
Download