refresh UI for phonegap app