问题
My question may sound like "already asked", but I cannot find any answer. My problem is :
I have a phonegap app that only display a remote website (that website is responsive and work perfectly on mobile device). So the app is very simple :
function onBodyLoad() {
document.addEventListener("deviceready", function(){
location.href = "http://www.mydomain.com/";
}, true);
}
As you can see this I just a redirection when that app starts. With that method I have no access to phonegap API after the redirection (am I right?).
My question(s) is: is that method the right method? How can I display/hide element on a webpage depending on the webpage is accessed by the app or by mobile browsers?
Thank you so much
Greg
回答1:
Just be aware that you are not allowed to do this from Apple.
From the App Store Review Guideline
2.12 Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected
来源:https://stackoverflow.com/questions/19537950/how-to-distinguish-between-mobile-app-and-browser