some modification of SenchaPhoneGapCameraDemo