Slides from PhoneGap Lightning Talk

Slides from Philly Tech Week Mobile Lightning talk on PhoneGap at Seed Philly on 4/26/2012

Unfortunately the slides don’t work well on small screens.  (Showoff to PDF conversion kept messing up the page breaks.)

Tagged with:
Posted in Uncategorized

ETE 2012 for Windows Phone (Sneak Peek)

The ETE 2012 Windows Phone app has been submitted to Microsoft for certification.  It should be available for download in the Marketplace in a few days.  In the meantime, here are a few screenshots.

1_schedule2_speakers3_tracks4_session_details5_speaker_bio6_speaker_session_detail7_sponsors8_venue

Tagged with: ,
Posted in Uncategorized

Intro to Sencha Touch (part 2)

I expanded my example application for Sencha Touch 2 with NavigationView, Templates and Forms.

http://blog.chariotsolutions.com/2012/02/sencha-touch-2-navigationview-templa…

http://blog.chariotsolutions.com/2012/01/introduction-to-sencha-touch.html

 

Tagged with:
Posted in Uncategorized

Factory Reset Galaxy Tab 10.1

I tried resetting our Samsung Galaxy Tab 10.1 today using Settings -> Privacy -> Factory data reset. The device refused to reset itself without the Samsung account password. Fortunately there’s a way to reset outside of the OS.

Shut the tablet down.

Hold the volume down button and press the power button to turn the tablet on.

Release the power button when the Samsung splash screen appears, keep holding the volume down until the system recovery screen appears.

The Android downloading icon should be blinking, use the volume down to select factory reset option (large box next to the small Android).
Press volume up button and wait for the Android system recovery to start.

Use the volume down button to select “wipe data/factory reset”.
Confirm selection with the power button.

Use the volume down button to select “Yes — delete all user data”.
Confirm selection with power button.

Wait while the device resets…

“reboot system now” should be selected.
Confirm with power button.

Wait for reboot.

Tagged with: , ,
Posted in android

Sencha Touch vs Backbone and jQuery Mobile

I wrote an Introduction to Sencha Touch based on Steve Smith’s Introduction to Backbone.js and jQuery Mobile.

Posted in Uncategorized

Show git branch in bash prompt

Foo__bash__8024

Add this to ~/.profile or ~/.bash_profile


function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

export PS1='\h:\W \u$(parse_git_branch)\$ '

https://gist.github.com/1262030

Tagged with:
Posted in Uncategorized

Isobar Create 48

My friend Chris Bernardi invited me to join his team for the Isobar Create 48 NFC Hackathon along with April DiMartino and Marc Neuwirth. The event kicked off on Tuesday around 3 PM at Space with a Soul. Before the hackathon there were some general Near Field Communication (NFC) presentations by Isobar, Nokia and ICS. After the NFC intro, they kicked out the people who came for the presentations so we could get started.

None of us came to the hackathon with the killer application idea. We brainstormed for a while, discarding lots of half-baked ideas and ended up deciding to build an NFC solution to make parking better. We came up with a bunch of scenarios, but decided to limit our initial implementation to garages with entrance and exit gates, so it was easier to track inventory.

April does an excellent job describing our application:

The working title of the app is “I Got Your Ticket Right Here” and is best understood when said with a Brooklyn NY accent ;-) We haven’t worked out a shorter and more appropriate title for it yet. So for purposes of this I will simply refer to it as the Parking app.

The way we like to describe the problem that the Parking app is trying to solve is: Parking Sucks

We wanted to figure out how we could make it suck a little less by addressing some of the most common problems that people have when parking in the city like:

  • Where can I park?
  • Is there space in the garage?
  • What does it cost?
  • Does it fit my needs (I need overnight parking; I need oversized vehicle parking; valet service, does the garage accept credit cards, etc)
  • What do I do with the ticket I get on the way in? Is this a garage where I need to take the ticket with me, or leave it the car?
  • How can I validate my parking?
  • How do I keep track of where my car is?
  • When is the garage closing?
  • How do I pay for the parking? Do I need to find a kiosk or drive to the exit and interact with a machine or maybe a person?

Our Parking app attempts to solve all of these problems using your NFC enabled mobile device. The Parking app will locate garages near you and provide details about the garage, allow you to filter for the parking garage features that you are most interested in, and give you directions to the garage. The app will also tell you how many available spaces there are for each garage, so you know what to expect when you arrive. Upon arriving at the garage you simply tap your phone to the NFC code at the garage entrance gate and you are checked in to the garage. If you have trouble remembering where you parked your car, when you arrive at your parking spot you can tap the NFC code at the spot to save your location. Later on when you are wondering where you car is, the app can tell you where your car is parked and provide directions back to the garage. The app can also provide reminders for when a garage is closing or a time period is about to expire. You can tap an NFC code at participating local businesses that provide parking discounts or validated parking which the app will deduct upon your check out from the garage. When you leave the garage simply tap your phone to the NFC code at the exit gate and the app will present you with a choice of payment profiles (business or personal, or perhaps multiple credit cards or other payment options), select a payment profile and you are checked out. A receipt is emailed if desired and never once did you see a piece of paper!

We created 3 pieces of software for this solution. The server, a mobile application and software for the gates.

Server

The server is written in Lithium and MongoDB. We provide a REST based API for the phones and gates at the garage. The server manages users, inventory, garage entrance, garage exit, processes payments and mails receipts. We take advantage of Mongo’s Geospatial Indexing for finding the closest garages.

Phone

We chose to build our Android application using PhoneGap and JQuery Mobile. PhoneGap allows us to build the application using HTML, JavaScript and CSS and package the code as a native application. For the competition we were targeting Android on the Google Nexus S phone. PhoneGap allows us to support other operating systems like iOS, Blackberry, Symbian, and Windows Phone 7 in the future.

To access the NFC hardware we use the phonegap-nfc plugin that Kevin Griffin and I wrote. The plugin allows access the phone’s NFC hardware using JavaScript. Today the plugin supports Android. We plan on adding support for other operating systems as NFC support becomes available (and we get access to devices.)

The UI was written in JQuery Mobile. Chris customized the code so it didn’t look like stock jQuery. Dave Riley helped us out by suppling color palate. Marc worked magic integrating Google Maps, disabling the misbehaving transitions, and supplying other jQuery tips and tricks.

Gate

We wrote software to represent the entrance and exit gates at the garage. The gate software uses NFC peer-to-peer messaging. The gate publishes an NFC message, reads for incoming messages, and communicates with the parking server.

NFC

Physical Action

With NFC, the physical action of scanning a tag results in a virtual reaction in software. Scanning the entrance gate at a garage opens the Android application and checks the user into the garage. (The server also sends a message to the gate telling it to open.)

NFC vs QR

Scanning NFC tags is easy for the user. It only requires the phone to be on and unlocked. Scan a tag and the software reacts. Contrast this with scanning a QR code. QR codes requires more work. Turn the phone to be on, find scanning software, open application, focus camera, choose action. None of it’s difficult, there are just more steps.

Tag ID vs Mime Type

In order to associate NFC tags with our application, we need to write data on the tags. We use an NDEF Message and set the message type to TNF_MIME_MEDIA. For the parking application, this allows use to associate the mime type of text/park with our application. In the Android application manifest we define an intent filter that will open our application any time the phone discovers a NDEF tag with our mime type.

<application ...>    <activity ...>        <intent-filter>            <action android:name="android.nfc.action.NDEF_DISCOVERED" />            <data android:mimeType="text/park"/>            <category android:name="android.intent.category.DEFAULT" />        </intent-filter>    </activity>             </application>

The intent filter in our application allows our user to: enter the garage, scan a parking spot, validates parking, and exit the garage all without opening the application. Simply scan a tag (or reader) and it works. This is great stuff.

What about all those other phones?

Why did we create software for the entrance and exit gates? In reality the gates need to be controlled with software so they work with NFC or tickets. The server also needs to tell the gate when to open and close. We wanted to be able to support non-NFC phones. By adding an active reader to the parking garage gates, we can support iPhone. iPhone customers get an NFC sticker for the back of their phone. The sticker is used to check in and out of the garage. The iPhone application can still support most of the application features. Remember we used PhoneGap, so we can distribute our application as an iPhone application too, since it is HTML, Javascript and CSS. We’d need to make some changes. The server would use Apple Push Notification to notify the application when the tag was scanned to enter and exit the garage. We’d need alternate methods for parking space reminders and parking validation. One option would be QR codes.

We could even issue NFC parking cards, like the Charlie Card for people without a smart phone.

Summary

There were many hours hacking, working, ups and downs, lack of sleep, arriving at 2AM and finding the car locked in the parking garage (inspiring the user notification idea “The garage closes in 20 minutes and you haven’t got your car yet.”) Somehow in the end we pulled everything together with a last minute Android build at 2:59 PM to fix a typo.

April was our spokesperson and did an amazing job explaining the problem and our solution, and presenting the demo. Fortunately everything worked in the demo and the judges seemed to like it. After all the presentations, we got a chance to go home, eat, and change before returning again that evening. At the awards after party we learned we won 2nd place! I’m really proud of what our team accomplished in less that 48 hours.

01_desktop02_home03_find_parking_map04_find_parking_list05_find_parking_filter06_parking_check_in07_remember_spot08_validate_parking09_checkout_choose_payment10_checkout_confirmation

Tagged with: , , ,
Posted in Uncategorized
Follow

Get every new post delivered to your Inbox.