Sie sind auf Seite 1von 4

A Personalized Product Search Mobile Application for

Google Android
Akshay Suresh Manjunath Reddy Varun Vijayvargiya

Department of Computer Science and Engineering

Ohio State University, Columbus, Ohio

Our application enables users to search for


products such as books, DVDs and virtually
Abstract

With an increasing focus on software


development on Mobile Handsets, application anything that has a barcode in a remote database
development for such devices have become a and then allow operations such as search and
commonplace with new versions of SDK addition to the user’s profile. Also, searching
platforms being introduced by various vendors, through a network of “friends” is possible so
both proprietary and open source. This paper that before going ahead to buy the product, the
presents one such application for phones that run users may find out which of the “friends”
the Google Android operating system where the already has it so that they may borrow it from
users can search for products such as Books, them. The search is done through reading the
DVDs etc just by scanning the barcode provided image of the barcode provided with such
on them, allowing addition and searching in a products, decoding the barcode, fetching its
remote database and also networking with other information such as ISBN numbers in case of
users who may have the product. books and sending them to the remote database
through the Internet in terms of GET HTTP
Introduction queries. In our application, we have used the
ZXing Barcode Scanner library developed in
Google Android, the mobile phone operating Java for various mobile development platforms
system introduced by Google in 2007 has such as Android, Apple, Blackberry etc.
already been or is in the process of being
adopted by various vendors and manufacturers Architecture and Workflow
that are part of the Open Handset Alliance
(OHA). Android is a software platform and Figure 1 shows the workflow of the application.
operating system for mobile devices based on The user credentials are first verified. The user
the Linux kernel. It allows developers to write credentials has not been fixed to a device. This
managed code using Java. The entire source has been done so that users may take advantage
code for the operating system and the Software of this application even from other devices that
Development Kit has been made open source by have this application installed.
Google and OHA.

Various applications have been developed


Figure 1
worldwide based on Android. Many such
applications support use of the inherent The camera view is then presented upon which
capabilities extended by the device such as the user focuses the device camera on the
Camera, GPS, Sensors such as Accelerometer product barcode. Now the ZXing library
etc. to provide usability and productivity to decoding module searches for a good image to
mobile phone users. work with and decodes the barcode. This
provides the system with the barcode to maintain a list of friends who are in the user’s
information such as the ISBN number in case of pre-defined network. The 3rd table is used to
books. This information is then sent to the hold details for each user such as the user’s First
database server maintained centrally in terms of name, last name, Telephone no and Email id.
GET HTTP requests. The server side scripts
then check the users database for matches. If the When the Check DB option is used, the server
product is there in user’s database or with checks to see; if the user that has currently
“friends”, the user notified. If in case the user logged in has a copy of the product currently
wants to add this entry for example after scanned. This is done by searching the 1st table
deciding to buy the product, the system allows with User id= User name with which the user
such operations. has logged in. If a match is not found in the 1st
table i.e. the logged in user doesn’t not own the
The HTTP connectivity is handled through product then a search is made in the 2nd table to
java.net classes inherent in the Android SDK. obtain a list of the user’s friends who are within
The queries to add and search the remote the user’s network. The product is then looked
database is handled through GET requests up in the list of products owned by each of the
constructed using the inner classes of java.net user’s friends. If a match is found, then from the
package. 3rd table which contains each user’s credentials,
the contact details of the friend are displayed.
The user can now use these contact details to
contact his friend and probably ask if he could
borrow the book or ask for reviews regarding the
product.
Figure 2
The user also has an option of adding the
ZXing Barcode scanner
product to the database. When the Store product
The decoding of the barcode was done using the option is clicked, the application first checks to
third party ZXing library that is provided free see if this product is already present in the user’s
for various mobile platforms. We have used the product list or in any of the user’s friend list,
Core Java and Android Client libraries provided failing which the application stores the scanned
by ZXing that allow image capture, processing, ISBN into the 1st table in the database.
decoding and returning the result in a
transparent manner.
Screenshots
We used the RGBMonochromeBitmap class in
the Android client library of the ZXing for these Following are some screenshots of the
activities. The result was obtained through application running on the emulator provided
broadcasting an intent throughout the Android with the Android SDK
runtime system.

Backend

The centralized database server used is My SQL


version 6.0. My SQL is the world's most popular
open source database

PHP Scripting is used on the server side for


server side processing of data. The values to be
checked in the database are obtained from the
URL using the GET command. The database
mainly contains 3 tables. One table is used to
maintain the ISBN number of the various
products that each user has. The 2nd table is used
Figure 3 Figure 5

Figure 6

Figure 4 Technologies Used

• Google Android SDK v 1.0


• ZXing Barcode Scanner Library 1.2
release
• MySQL database
• Apache web Server
• PHP Server side scripting
• Eclipse IDE with Android development
plugin
The application was first tested on the barcodes but Q-R and other kinds of
emulator provided in the Android SDK barcodes too. The overall architecture
and later on the HTC Dream of G1 has been designed in such a way so that
phone which is the first mobile handset this design can be extended to other
to be released based on the Android mobile development platforms as well
platform quite transparently.
The ZXing Barcode Scanner needs to be
installed on the device. This can be
downloaded for free from the Android Conclusion
Market on the device. Once installed,
the application makes use of this library This application provides a user friendly
to do the image processing. way to search for products in local as
well as remote databases. It provides a
Test Runs one - click option to add or search a
product in their databases and their
The application was first coded and run friend’s databases too. The Barcode
on the emulator provided with the Scanner capability makes today’s
Android SDK. The entire code was mobile handsets highly relevant and
written using the Eclipse environment. takes the burden off the user to use
Since current versions of the emulator handset keypads of keyboard to enter
do not support the use of the camera, the product information, which
testing on the emulator was done using sometimes may even be encoded in a
static images of sample barcodes. Once format not understandable by the users
the Barcode decoding, HTTP such as QR codes.
connectivity and the database operations
were successfully tested, the code was References
modified to use the phone’s camera. The
G1 by HTC was used for testing. This 1. http://code.google.com/p/zxing
particular model of the phone was with 2. http://developer.android.com/gu
no data plan and so accessing the ide/index.html
internet was not possible. Hence, the 3. http://us3.php.net/manua
application was tested using the campus l/en/index.php
WiFi technology. 4. http://www.apachefriends
.org/en/xampp-
Future Work
windows.html#646
This application can be extended to use
the information on the barcode to track 5. http://dev.mysql.com/doc
product reviews by peers, instant /refman/6.0/en/news-6-0-
messaging with peers; information about x.html
location of stores where products can be 6. Professional Android
bought, information displayed on Application Development, Reto
Google Maps and much more. ZXing Meier, Wrox Programmer
can be used to scan not just 1-D