adopt to phonegap