I am thinking of re-using my phonegap html, css and js code as a web app. I would be going through and removing any mobile only functionalities.
The purpose is to have a
We are developing an iPad app and deployed it as a mobile website too. Whenever PhoneGap specific calls are made, using a common method called isRunningOnPhoneGap() (returns false if the code is running as website) , we decide whether to invoke the PhoneGap feature or to display the web feature. This is how we decide if the app is running as a website or on a mobile device.
var isRunningOnPhoneGap: function () {
if ((document.URL.indexOf('http://') === -1) && (document.URL.indexOf('https://') === -1)) {
if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
return true;
} else {
return false;
}
} else {
return false;
}
}