test code for phonegap