Open Camera or Gallery from “ inappbrowser ” in Apache Cordova

你离开我真会死。 提交于 2019-12-04 07:07:40

Instead of using inappBrowser, i ended up in implementing HTML iframe. That is, What things I wanted inappBrowser to do, now I am able to do using iframe. You can have access to Camera or Gallery or File Explorer, similar to that of a Native Phone's Browser.

Here is what I have done to solve the above problem:

   <html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <meta name="format-detection" content="telephone=no" />
      <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
      <title>Hello World!</title>
      <style type='text/css'>
        body, html, iframe {
                     margin: 0;
                     padding: 0;
                     border: 0px none;
                     width: 100%;
                     height: 100%;
        }
      </style>
 </head>
 <body>
     <script type="text/javascript" src="cordova.js"></script>


     <iframe src="http://SomeWebPage" width="97%" height="97%"></iframe>
 </body>

Hope this helps others.

Try this plugin if it helps http://plugins.cordova.io/#/package/com.synconset.imagepicker
It should work for inappbrowser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!