Detect between a mobile browser or a PhoneGap application

后端 未结 16 1973
小蘑菇
小蘑菇 2020-11-28 03:03

Is it possible to detect if the user is accessing through the browser or application using JavaScript?

I\'m developing a hybrid application to several mobile OS thr

16条回答
  •  误落风尘
    2020-11-28 03:27

    what if you try following :

    if(window._cordovaNative) {
      alert("loading cordova");
      requirejs(["...path/to/cordova.js"], function () { 
             alert("Finished loading cordova");
      });
    }
    

提交回复
热议问题