android - Google Maps doesn't show up in Phonegap Build -


i 2 month in phonegap leason. have been testing app in google ripple emulator, , working great google map.

however, when upload project phonegap build, , install android device, google map doesn't show up.

here index.html

<html>       <head>                  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mtjoasx8j1au+a5wdvnpi2lkffwweaa8hdddjzlplegxhjvme1fgjwpgmkzs7" crossorigin="anonymous">          <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />           <script src="lib/jquery-1.8.2.min.js"></script>         <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>         <script src="http://maps.google.com/maps/api/js?sensor=false"></script>          <link href="css/all.css" rel="stylesheet" type="text/css" />         <script type="text/javascript" charset="utf-8">             window._cordovanative = true;          </script>          <script type="text/javascript" charset="utf-8">              document.addeventlistener("deviceready", ondeviceready, false);              function ondeviceready()                  {                     //navigator.geolocation.getcurrentposition(onsuccess, onerror);                     var map = new googlemaped();                      map.initialize();                  }                   function googlemaped()                     {                         this.initialize = function(){                             var map = showmap();                     }                            var showmap = function(){                             var mapoptions =                                  {                                     zoom: 4,                                     center: new google.maps.latlng(55.689403, 12.521281),                                     maptypeid: google.maps.maptypeid.roadmap                                 }                                 var map = new google.maps.map(document.getelementbyid("map_canvas"), mapoptions);                                   return map;                         }                     }                    $(document).ready(function(){                     alert("hi al");                  });          </script>        </head>      <body>      <div id="phonegapwrapper" style="">          <div id="map_canvas">         </div>      </div>          <script type="text/javascript" src="phonegap.js"></script>         <script type="text/javascript" src="js/index.js"></script>     </body> </html> 

and here config.xml

  <?xml version="1.0" encoding="utf-8" ?>     <widget xmlns   = "http://www.w3.org/ns/widgets"         xmlns:gap   = "http://phonegap.com/ns/1.0"         id          = "com.empatix.app"         versioncode = "10"          version     = "1.0.0" >     <plugin name="cordova-plugin-whitelist" />    <plugin name="com.indigoway.cordova.whitelist.whitelistplugin" spec="1.1.1" source="pgb" />     <!-- versioncode optional , android -->   <feature name="http://api.phonegap.com/1.0/network"/>    <feature name="http://api.phonegap.com/1.0/device"/>   <feature name="http://api.phonegap.com/1.0/geolocation"/>   <feature name="http://api.phonegap.com/1.0/notification"/>    <access origin="*"/>    <access origin="http://google.com" />   <access origin="https://google.com" />      <access origin="http://maps.google.com" />   <access origin="http://maps.google.com/*" />   <access origin="http://*.google.com" />   <access origin="http://dev.hospitalku.com/*" />    <access origin="http://code.jquery.com/*" />   <access origin="https://maxcdn.bootstrapcdn.com/*" />   <access origin="https://maxcdn.bootstrapcdn.com/*" />     <access origin="*" />   <access origin="*.google.com"/>   <access origin="*.googleapis.com"/>   <access origin="*.gstatic.com"/>    <allow-navigation href="*" />   <allow-navigation href="http://*/*" />   <allow-navigation href="https://*/*" />   <allow-navigation href="data:*" />    <allow-intent href="geo:*" />   <allow-intent href="http://*/*" />   <allow-intent href="https://*/*" />   <allow-intent href="*" />      <name>empatix app</name>      <description>         example phonegap build docs.      </description>      <author href="https://dev.hospital.com" email="al_kasih@outlook.com">         hardeep shoker      </author>     <access origin="http://phonegap.com" subdomains="true" />    </widget> 

the console message got in phonegap debug service is:

no content-security-policy meta tag found. please add 1 when using cordova-plugin-whitelist plugin.

can me out this, please?

many in advance.

you have add line in index.html (head section):

<meta http-equiv="content-security-policy" content="default-src ..."> 

for detailed explanation check docs:

https://github.com/apache/cordova-plugin-whitelist#content-security-policy

a post here on so: "no content-security-policy meta tag found." error in phonegap application


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -