Skip to content

mastermindg/shoppinglist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shopping List

This is a Cordova application that integrates Drupal services with the ZXing Barcode Scanner plugin to allow users to create personal shopping lists and add products by scanning them with their phone.

Creating with Cordova

Step 1: Create Cordova Scaffolding

cordova create myApp
cd myApp
cordova platform add android
cordova plugins add https://github.com/wildabeast/BarcodeScanner.git

This will create the default folders/files that you'll need to get started.

Step 2: Pull this repo into the newly created myApp folder

git fetch --all
git reset --hard origin/master

Step 3: Setup Drupal 7 for authentication

These instructions are a condensed version of Tyler Frankensteins tutorial on integrating Drupal with PhoneGap.
Drupal & PhoneGap - Mobile Application with Drupal 7 Services, PhoneGap & JQuery Mobile for Android - Example

This configuration is using an older version of the Drupal Services module - 7.x.3.2
Download Services 7.x.3.2 here

Install the module by uploading or copying the path of the link and installing locally via Update Manager.

Enable Service and the REST server.

Add a Service


Setup Service Resources


The resources you'll need to enable are:
node -> retrieve,create,update,delete
system -> connect
user -> login,logout

Enable REST Server Response Formatters & Request Parsing

Switch to the 'Server' tab and make sure the following are enabled:

Response formatters
json

Request parsing
application/json
application/x-www-form-urlencoded

Feel free to test your webservice using Tyler Frankenstein's tutorial

Step 4: Create EAN account and enable data feed

This app uses EANData to pull product data from a UPC.

Create an account with EAN here:
EANData

Activate Data feeds here:
EANData Data Feed Activate

Step 5: Fill in the Settings.js file

TTHIS FILE WILL NEED TO BE CREATED AS IT IS NOT STORED IN THIS REPOSITORY - FOR SECURITY REASONS.
Application settings are stored in www/settings.js.
Here you'll need to enter your Drupal 7 webiste address (the root of the site, i.e. http://example.com/drupal)
You'll also need to enter your EANData keycode which is used for querying the barcodes.

Step 6: Build your app!

cordova run
cordova emulate android

About

App that allows scanning of products and adding to a shopping list

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors