Google Wallet on Android

What is the Google Wallet Android app?

I have finally had an occasion to use the Google Wallet app on my Galaxy Nexus. So what is the Google Wallet Android app? It’s basically an Android app that acts like a digital credit card that you can use to purchase coffee at Peet’s, medicine at CVS and so on.

There is a special reader in the store that you tap your phone against when checking out (kinda like a credit card swiper except that you tap your phone instead of swiping your card). After tapping, you are prompted to enter a PIN (just like an ATM card), everything is automatically paid for, and your ready to pick up your bag and walk out the door.

To use Google Wallet, you will need a phone with an NFC chip. As of June 2012, the only phone that supports Google Wallet (to my knowledge) is the Galaxy Nexus.

A cool app

I have now used Google Wallet to make a few purchases and I have to say that it’s a nice upgrade to a plastic credit card. I have found that if I enter my PIN before getting to the checkout counter, I can just Tap and Go.

The coolness factor of the technology also helps. I got a free coffee at Peet’s the other day because the barista loved that I paid with my phone.

Security

I’m not too worried about security at this point at I don’t have my credit cards linked to Google Wallet. Currently, I’m using the Google Prepaid Card so if I lose my phone it’ll be like losing a gift card.

However, for this form of payment to go mainstream security will be very important, which is why I would like to see apps from the the banks and credit card companies.

A Multi-App Future?

Much as we have multiple debit and credit cards in our wallet, I think the future may be to have multiple digital payment apps, such as a Visa app, an American Express app, and so on. It would be nice if during payment a list of payment apps is displayed so that we can select one, much as we select a credit card when we open our wallet.

Another benefit of multiple apps would be security. One issue I see with a single app controlling every credit card is that it forms a single point of failure (in terms of a security breach). Personally, I also think the banks and financial institutions have a much longer history writing software that secures our payments, so an app from Visa may have tighter security that one from Google, Microsoft, Apple or another non-financial institution.

Summary

Google Wallet is a cool and useful app. Unfortunately, the number of phones that support the app are limited, and the NFC readers are only in a few big name stores. But, it’s nice to use the future today (unless you’re from Japan, then paying with your phone is old hat).

Install JDK 7 u5 on Ubuntu 12.04 LTS (as a secondary JDK)

Introduction

I had installed JDK 6.0 update 31 in an earlier post. However, I now need to write a Java application that requires the features available in JDK 7.

In this post, I will install JDK 7 update 5 as a secondary JDK, while JDK 6.0 u31 will be the primary JDK. It’s perfectly normal to have multiple JDKs on a single machine to support the requirements of different applications. Fortunately, it’s easy to use a different JDK on a per application basis.

Download

I have a 64 bit version of Ubuntu 12.04 LTS installed, so the instructions below only apply to this OS.

  1. Download the Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html.
  2. Click Accept License Agreement
  3. Click dk-7u5-linux-x64.tar.gz
  4. Login to Oracle.com with your Oracle account
  5. Download the JDK to your ~/Downloads directory
  6. After downloading, open a terminal, then enter the following commands.

Installation

Open a terminal, then enter the following commands:

cd ~/Downloads
tar -xzf jdk-7u5-linux-x64.tar.gz

Note:
The jvm directory is used to organize all JDK/JVM versions in a single parent directory. As this is our 2nd JDK, we’ll assume that the jvm directory already exists.

sudo mv jdk1.7.0_05 /usr/lib/jvm

The next 3 commands are split across 2 lines per command due to width limits in the blog’s theme.

sudo update-alternatives --install "/usr/bin/java" "java"  \
	"/usr/lib/jvm/jdk1.7.0_05/bin/java" 2
sudo update-alternatives --install "/usr/bin/javac" "javac"  \
	"/usr/lib/jvm/jdk1.7.0_05/bin/javac" 2
sudo update-alternatives --install "/usr/bin/javaws" "javaws"  \
	"/usr/lib/jvm/jdk1.7.0_05/bin/javaws" 2
sudo update-alternatives --config java

You will see output similar to the following (although it’ll differ on your system). Read through the list and find the number for the Oracle JDK installation (/usr/lib/jvm/jdk1.7.0_05/bin/java)

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                               Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/jdk1.7.0_05/bin/java   2         auto mode
  1            /usr/lib/jvm/jdk1.6.0_31/bin/java   1         manual mode
  2            /usr/lib/jvm/jdk1.7.0_05/bin/java   2         manual mode

Press enter to keep the current choice[*], or type selection number:

On my system I did entered 1 to keep JDK 1.6.0 u31 as my primary JDK (change the number that is appropriate for your system). To enter 1, press 1 on the keyboard, then press Enter.

sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/jdk1.7.0_05/bin/javac   2         auto mode
  1            /usr/lib/jvm/jdk1.6.0_31/bin/javac   1         manual mode
  2            /usr/lib/jvm/jdk1.7.0_05/bin/javac   2         manual mode

Press enter to keep the current choice[*], or type selection number:

I entered 1 then pressed Enter to keep JDK 1.6.0 u31 as my primary javac command.

sudo update-alternatives --config javaws
There are 2 choices for the alternative javaws (providing /usr/bin/javaws).

  Selection    Path                                 Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/jdk1.7.0_05/bin/javaws   2         auto mode
  1            /usr/lib/jvm/jdk1.6.0_31/bin/javaws   1         manual mode
  2            /usr/lib/jvm/jdk1.7.0_05/bin/javaws   2         manual mode

Press enter to keep the current choice[*], or type selection number:

I entered 1 then pressed Enter to keep JDK 1.6.0 u31 as my primary javaws command.

As a final step, let’s test each of the commands to ensure everything is setup correctly.

java -version

The output should be:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

javac -version

The output should be:
javac 1.6.0_31

javaws -version

The output should be:
Java(TM) Web Start 1.6.0_31, which is followed by a long usage message.

That’s it, the JDK 7 u5 is installed.

Create a DB connection to MySQL in Kettle

Introduction

Creating a DB connection from Kettle to MySQL involves creating a MySQL use who can access the DB in question, installing the JDBC driver, and creating a connection.

Install the MySQL JDBC driver

Download the MySQL JDBC driver from http://dev.mysql.com/downloads/connector/j/.

Login to mysql.com, then click Download.

cd ~/Downloads
tar -xzf mysql-connector-java-5.1.20.tar.gz
cd mysql-connector-java-5.1.20
cp mysql-connector-java-5.1.20-bin.jar ~/bin/data-integration/libext/

Create a MySQL user

In this post, I am going to create a connection to the Sakila DB.

mysql -u root -p

At the MySQL command prompt, enter the following (replace ‘password’ with your password):

mysql> GRANT ALL ON sakila.* TO akbar@localhost IDENTIFIED BY 'password';

Create the DB connection in Kettle

cd ~/bin/data-integration
./spoon.sh
  1. Click the New in the PDI toolbar.
  2. Click Database connection.
  3. Enter information similar to what’s shown below:
  4. PDI Database Connection

  5. Click Test.
  6. Click OK.

In Explorer in the left pane of PDI, right-click on the Sakila database connection, click Explore.

You should now be able to view the tables in the Sakila database.

Create a Kettle repository

Introduction

Open Kettle

cd ~/bin/data-integration

To run Spoon:

./spoon.sh

Create a new repository

Run the following in a terminal.

mkdir ~/kettle

The steps below are performed within the PDI UI.

    Repository Connection

    Repository Connection

  1. In the Repository Connection dialog box, click the small green plus symbol.
  2. Repository Type

    Repository Type

  3. In the Select the repository type dialog box, select Kettle file repository.
  4. Click OK
  5. In the File repository settings dialog box, enter the following information:
    • Base directory: /home/akbar/kettle
    • Read-only repository?: Leave unchecked
    • Hide hidden folders and files: Leave unchecked
    • ID: kettle-repo
    • Name: Kettle Repository
  6. Click OK.
  7. Click OK.

Install MySQL 5.5 on Ubuntu 12.04 LTS

Introduction

Installing the MySQL package on Ubuntu is extremely simple.

Installation

Open a terminal and enter the following commands.

sudo apt-get install mysql-client mysql-navigator mysql-server

Type Y to accept the additional packages. Press Enter.

After downloading and during installation, the MySQL configuration dialogs will display in the terminal.

In the first dialog, press Enter.

Enter a password for the MySQL root user. Press Enter.

Reenter the root password. Press Enter.

That’s it, MySQL is now installed and ready for use.