Phone Gap implementation