Skip to content Skip to sidebar Skip to footer

Cordova Windows 8.1 On Visual Studio 2015 External Image Loading To Img Tag

I have a problem with displaying images from external source in Cordova app. All DOM is working but images won't to load. I am focused to made it working for Windows 8.1 only. I cr

Solution 1:

Following to the Platform specific configuration files

Place the custom package.windows80.appxmanifest (Windows 8.0), package.windows.appxmanifest (Windows 8.1), or package.phone.appxmanifestfile (Windows Phone 8.1) in the res/native/windows folder to override various configuration settings. Use the generated version of the file in the platforms/windows folder after building a Debug configuration of the project for Windows or Windows Phone (Universal).

and Sony Aurje solution

  1. Create a Package.appxmanifest file under res/cert/windows8. Create a windows8 solution folder if not exist.

  2. Open the project folder and go to bld/windows-AnyCpu/Debug and open AppxManifest.xml in notepad, copy the content and paste it in the above Package.appxmanifest file.

  3. Double click on Package.appxmanifest file then goto Capabilities tab and choose ‘Private Networks (Client & Server)’.

  4. Save it and run the app again, this time it worked I could connect to my Node js REST api.

I added the file like it was written in first quote and I have used all other advices from second quote.

File location:

C:\{visual studio project dir}\BlankCordovaApp2\res\native\windows\package.windows.appxmanifest

What I have changed?

<Capabilities>
    <Capability Name="privateNetworkClientServer" /> <!-- Added this line -->
    <Capability Name="internetClient" />
    <DeviceCapability Name="webcam" />
    <DeviceCapability Name="microphone" />
</Capabilities>

Solution 2:

I was having same issue while testing the app in visual studio, but when I compiled app from PGBuild and tested on device it displayed all the images. Are you testing app on emulator? If so, please unlock windows phone and test on it, some of the capabilities will not work on emulator and you might think that there is problem with your code.

You can get the procedure for unlocking windows phone at this link unlock windows phone


Post a Comment for "Cordova Windows 8.1 On Visual Studio 2015 External Image Loading To Img Tag"