This is the case
1) check whether someXXX app is installed in the device
2) if installed open the app.
3) if not, open play store/App store app with some
Check this plugin, looks like it answers all your points: https://github.com/lampaa/org.apache.cordova.startapp