1 Reply Latest reply on Nov 23, 2016 11:45 PM by VectorP

    No external images

    TimFM Level 1

      Good Morning!

       

      My App won't show some images.

      Internal images will work, but no external image

       

      here is my config

       

      <?xml version='1.0' encoding='utf-8'?>

          <widget xmlns = "http://www.w3.org/ns/widgets"

              id        = "com.feuerwehrwissen.second"

              xmlns:gap   = "http://phonegap.com/ns/1.0"

              versionCode='1012'

              version   = '1.0.12' >

       

          <!-- versionCode is optional and Android only -->

      <preference name="phonegap-version" value="cli-6.3.0" />

      <preference name='android-installLocation' value='auto' />

      <gap:platform name="ios" />

      <gap:platform name="android" />

       

          <name>Feuerwehrwissen</name>

       

          <description>

             Feuerwehr für die Hosentasche

          </description>

       

          <author href='http://feuerwehrwissen.info' email='tim.spey@feuerwehrwissen.info'>

             Tim Spey

          </author>

       

       

       

              <feature name="http://api.phonegap.com/1.0/file"/>

              <feature name="http://api.phonegap.com/1.0/network"/>

             

              <access origin="*" />

              <icon src="icons/bb_icon.png" gap:platform="blackberry" />

              <icon src="icons/bb_icon_hover.png" gap:platform="blackberry" gap:state="hover"/>

             

              <icon src='icon.png' />

              <icon src='icon-57.png' gap:platform='ios' width='57' height='57' />

              <icon src='icon-72.png' gap:platform='ios' width='72' height='72' />

              <icon src='icon-76.png' gap:platform='ios' width='76' height='76' />

              <icon src='icon-120.png' gap:platform='ios' width='120' height='120' />

              <icon src='icon-152.png' gap:platform='ios' width='152' height='152' />

             

      <platform name="android">

          <!-- you can use any density that exists in the Android project -->

          <splash src="images/logo.jpeg" density="land-hdpi"/>

          <splash src="images/logo.jpeg" density="land-ldpi"/>

          <splash src="images/logo.jpeg" density="land-mdpi"/>

          <splash src="images/logo.jpeg" density="land-xhdpi"/>

       

          <splash src="images/logo.jpeg" density="port-hdpi"/>

          <splash src="images/logo.jpeg" density="port-ldpi"/>

          <splash src="images/logo.jpeg" density="port-mdpi"/>

          <splash src="images/logo.jpeg" density="port-xhdpi"/>

      </platform>

       

      <platform name="ios">

          <!-- images are determined by width and height. The following are supported -->

          <splash src="images/logo.png" width="320" height="480"/>

          <splash src="images/logo.png" width="640" height="960"/>

          <splash src="images/logo.png" width="768" height="1024"/>

          <splash src="images/logo.png" width="1536" height="2048"/>

          <splash src="images/logo.png" width="1024" height="768"/>

          <splash src="images/logo.png" width="2048" height="1536"/>

          <splash src="images/logo.png" width="640" height="1136"/>

          <splash src="images/logo.png" width="750" height="1334"/>

          <splash src="images/logo.png" width="1242" height="2208"/>

          <splash src="images/logo.png" width="2208" height="1242"/>

      </platform>

       

       

      <preference name="SplashScreenDelay" value="10000" />

      <preference name="fullscreen" value="true" />

      <preference name="orientation" value="portrait" />

       

      </widget>

        • 1. Re: No external images
          VectorP Level 4

          Sorry, your config is a bit of a mess. Here is some feedback:

           

          1. There is no need for the gap: namespace anymore. For those elements with gap: prefix that you are using now, regular 'non-gap' syntax is available. See the Configuring section of the Phonegap Docs or PGB Docs

           

          2. Don't use any 'feature' elements. Add the relevant plugins (from npm) instead.

           

          3. In order to show splashscreens, include the cordova-plugin-splashscreen plugin. For iPad, include the statusbar plugin as well.

           

          4. Use .png images for splashes and icons, both for Android and iOS

           

          5. You can't use compound qualifiers as a value for the 'density' attribute. Use the 'qualifier' attribute, instead.

           

          6. Include the whitelist plugin from npm in order to communicate with external sources. Also, include the necessary whitelisting rules.

          See the Whitelisting section of the PGB Docs and the documentation for plugin cordova-plugin-whitelist.