A Personalized Product Search Mobile Applications Using Google AndroidDocument Transcript
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 Abstract With an increasing focus on software development on Mobile Handsets, application development for such devices have become a commonplace with new versions of SDK platforms being introduced by various vendors, both proprietary and open source. This paper presents one such application for phones that run the Google Android operating system where the users can search for products such as Books, DVDs etc just by scanning the barcode provided on them, allowing addition and searching in a remote database and also networking with other users who may have the product. Introduction Google Android, the mobile phone operating system introduced by Google in 2007 has already been or is in the process of being adopted by various vendors and manufacturers that are part of the Open Handset Alliance (OHA). Android is a software platform and operating system for mobile devices based on the Linux kernel. It allows developers to write managed code using Java. The entire source code for the operating system and the Software Development Kit has been made open source by Google and OHA. Various applications have been developed worldwide based on Android. Many such applications support use of the inherent capabilities extended by the device such as Camera, GPS, Sensors such as Accelerometer etc. to provide usability and productivity to mobile phone users. Our application enables users to search for products such as books, DVDs and virtually anything that has a barcode in a remote database and then allow operations such as search and addition to the user’s profile. Also, searching through a network of “friends” is possible so that before going ahead to buy the product, the users may find out which of the “friends” already has it so that they may borrow it from them. The search is done through reading the image of the barcode provided with such products, decoding the barcode, fetching its information such as ISBN numbers in case of books and sending them to the remote database through the Internet in terms of GET HTTP queries. In our application, we have used the ZXing Barcode Scanner library developed in Java for various mobile development platforms such as Android, Apple, Blackberry etc. Architecture and Workflow Figure 1 shows the workflow of the application. The user credentials are first verified. The user credentials has not been fixed to a device. This has been done so that users may take advantage of this application even from other devices that have this application installed. InternetHTTP Request/ ResponseMySQL DBPHP ScriptHTTP Request/ ResponseArchitectural Overview Figure 1 The camera view is then presented upon which the user focuses the device camera on the product barcode. Now the ZXing library decoding module searches for a good image to work with and decodes the barcode. This provides the system with the barcode information such as the ISBN number in case of books. This information is then sent to the database server maintained centrally in terms of GET HTTP requests. The server side scripts then check the users database for matches. If the product is there in user’s database or with “friends”, the user notified. If in case the user wants to add this entry for example after deciding to buy the product, the system allows such operations. The HTTP connectivity is handled through java.net classes inherent in the Android SDK. The queries to add and search the remote database is handled through GET requests constructed using the inner classes of java.net package. Enter credentialsStart AppOpen camera and scan the barcodeIf okOption selectedHTTP Request to server via Wi-FiServer queries DBPresent in users/Friends list?Option/ Results Display WindowHTTP Request to server via Wi-FiServer queries DBInsert ISBN into DBPresent in DB?Try AgainYESYESReturn Not FoundyesNo Figure 2 ZXing Barcode scanner The decoding of the barcode was done using the third party ZXing library that is provided free for various mobile platforms. We have used the Core Java and Android Client libraries provided by ZXing that allow image capture, processing, decoding and returning the result in a transparent manner. We used the RGBMonochromeBitmap class in the Android client library of the ZXing for these activities. The result was obtained through broadcasting an intent throughout the Android 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 to maintain a list of friends who are in the user’s pre-defined network. The 3rd table is used to hold details for each user such as the user’s First name, last name, Telephone no and Email id. When the Check DB option is used, the server checks to see; if the user that has currently logged in has a copy of the product currently scanned. This is done by searching the 1st table with User id= User name with which the user has logged in. If a match is not found in the 1st table i.e. the logged in user doesn’t not own the product then a search is made in the 2nd table to obtain a list of the user’s friends who are within the user’s network. The product is then looked up in the list of products owned by each of the user’s friends. If a match is found, then from the 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. The user also has an option of adding the product to the database. When the Store product option is clicked, the application first checks to see if this product is already present in the user’s product list or in any of the user’s friend list, failing which the application stores the scanned ISBN into the 1st table in the database. Screenshots Following are some screenshots of the application running on the emulator provided with the Android SDK Figure 3 Figure 4 Figure 5 Figure 6 Technologies Used
Google Android SDK v 1.0
ZXing Barcode Scanner Library 1.2 release
Apache web Server
PHP Server side scripting
Eclipse IDE with Android development plugin
The application was first tested on the emulator provided in the Android SDK and later on the HTC Dream of G1 phone which is the first mobile handset to be released based on the Android platform
The ZXing Barcode Scanner needs to be installed on the device. This can be downloaded for free from the Android Market on the device. Once installed, the application makes use of this library to do the image processing.
Test Runs The application was first coded and run on the emulator provided with the Android SDK. The entire code was written using the Eclipse environment. Since current versions of the emulator do not support the use of the camera, testing on the emulator was done using static images of sample barcodes. Once the Barcode decoding, HTTP connectivity and the database operations were successfully tested, the code was modified to use the phone’s camera. The G1 by HTC was used for testing. This particular model of the phone was with no data plan and so accessing the internet was not possible. Hence, the application was tested using the campus WiFi technology.
This application can be extended to use the information on the barcode to track product reviews by peers, instant messaging with peers; information about location of stores where products can be bought, information displayed on Google Maps and much more. ZXing can be used to scan not just 1-D barcodes but Q-R and other kinds of barcodes too. The overall architecture has been designed in such a way so that this design can be extended to other mobile development platforms as well quite transparently.
This application provides a user friendly way to search for products in local as well as remote databases. It provides a one - click option to add or search a product in their databases and their friend’s databases too. The Barcode Scanner capability makes today’s mobile handsets highly relevant and takes the burden off the user to use handset keypads of keyboard to enter the product information, which sometimes may even be encoded in a format not understandable by the users such as QR codes.