Fixing bugs: changing the getApplicationContext to cordova method