Replace MainActivity with cordova.getActivity()