Updated example for phone gap