Smart Shopper Android Mobile Application

texturegainfulMobile - Wireless

Dec 10, 2013 (3 years and 4 months ago)

78 views

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



2


A
BSTRACT
:

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.
E
ach shop
contain
s

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.



















3


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








1
0

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








2
2

7.

FUTURE SCOPE










25

8.

CONCLUSIONS










25

9.

BIBILIOGRAPHY










25

10.

APPENDIX










26

A.

SCREEN SHOTS









28

B.

LIST OF FIGURES









43


4


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, w
e 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. ‘S
mart 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

produc
ts 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 th
rough a text message. It is highly

convenient to keep track of one’s
bu
dget as this provides a very

notable

feature of maintaining gross expenditure for
thos
e 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
shop
s
.

Thus with smart shopper, shopping can become fast, easy and effective process.


5


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 l
ist. 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.


6


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
-
ma
il 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 Sma
rt
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 w
ill 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
t
h
rough E
-
mail or a text messa
ge. 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.


7


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 chan
ge 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 f
irst 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 b
een 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 shop
ping 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.


8



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 mad
e 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.

9


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

10


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.


11



Figure

3
: Classes in history package.


Figure

4
: InitTask5, Shop

List and Shop

List

Custom

Adapter

12



Figure

5
: Classes in Shopping List Package.


13



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 m
essages they pass.


The diagrams are read left to right and
descending
.

14



Figure

8
: Sequence Diagram for Create List use case



Figure 9
: Sequence Diagram for view lists use case



15




Figure
10
: Sequence Diagram for List of Shops use case



Figure 11
:
Sequence Diagram for hot deals use case



Figure 1
2
: Sequence Diagram for Budget use case


16



Figure 13
: Sequence Diagram for Barcode Use Case


d.

ACTIVITY DIAGRAM


Activity diagrams describe the workflow
behavior

of a system.


Activity diagrams are similar t
o
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.



17



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 operati
ng
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
.

18


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
19


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 t
hat 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 Re
source 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 o
f 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 mul
tiple applications



LibWebCore
-

a modern web browser engine which powers both the Android
browser and an embeddable web view



SGL
-

the underlying 2D graphics engine

20




3D libraries
-

an implementation based on OpenGL ES 1.0 APIs; the libraries use
either h
ardware 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. Dalvi
k 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 languag
e 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.

ECLIPS
E 3.7.1

An open
-
source Java ID
E 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 wor
k 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
21


(and which are also use
d 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. Th
is 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 Jav
a 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. T
hese 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
22


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
-
i
n, 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 1
6
:
http://smartshop.xml.in/

showing our APK key.

23



Figure 17
:
SmartShopee.apk downloaded and is being installed.


Figure 1
8
: Installation page of the

application
.

24



Figure 19
: Installation successful page.


Figure 20
: Successful installation of the app and icon at the applications page.

25



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 righ
t 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


26


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.

.d
ex 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 la
nguage.

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 support
ing 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, an
d forward ports for
debugging.

Application
:
A collec
tion 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 interpret
er
-
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 co
mpiler 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
27


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 applic
ation 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.draw
able

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 t
o 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 forma
t, 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 activi
ti
es,
intent filters, services, an
d 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 brows
er). 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.

28


Appendix A


First usage of application asks to retrieve or enter location


Sample screen with location automatically retrieved

29



Location can also be manually set this way


Once the location is set, this home screen

appears

30



When create list is pressed
the list of vendors are displayed


Different list of categories available for a vendor

31



Different items present inside each category


When a
n

item is selected you can also select quantity

32



Shopping cart interface
looks like this


One can also enter a name for shopping cart

33



When clicked on view lists, it lists all the create shopping lists


When a list is selected the available options are share and delete

34



This shows for deleting a list, also it initiates a
request


When there are no lists created, an error message is displayed

35



This screen shows the share list option


A list can be shared through text message as shown

36



List have been sent successfully


When e
-
mail option is used to share a list

37



These

are available options for us to share a list via. E
-
mail


List of nearby shops for a particular location

38



When hot deals is clicked, it shows all the available hot deals


Budget screen with total expenditure divided for each store’s shopping list

39



Barcode module where it is waiting for a code to be
read


The scanner reads a barcode and is waiting for suitable text

40



This is response for the barcode scanned


As shown it also scans QR code

41



At settings page you can manually alter the location


When there are no shops configured for that location, error msg
. is
displayed

42



About/ help screen of our application


When pressed exit it asks user to press yes or no

43


APPENDIX B


LIST OF FIGURES


1.

Use Case Diagram for Smart Shopper Application






9

2.

Classes in Share list package








1
0

3.

Classes in history package








11


4.

InitTask5, Shop List and Shop List Custom Adapter





1
1

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








1
3

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






1
5

11.

: Sequence Diagram for hot deals use case






1
5

12.

Sequence Diagram for Budget use case






1
5

13.

Sequence Diagram for Barcode Use Case






1
6

14.

Activity

Diagram for Shopping Lists







17

15.

Android architecture









18

16.

http://smartshop.xml.in/

showing our APK key.





2
2

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