Move promptForPermission handling for android from js to java