Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18273] MobileWeb: Cannot load images from the applicationDataDirectory

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-14T19:08:02.000+0000
Affected Version/sRelease 3.4.1, Release 3.5.0
Fix Version/sn/a
ComponentsMobileWeb
Labelsfilesystem, images, mobileweb, qe-3.5.0
ReporterEric Wieber
AssigneePraveen Innamuri
Created2014-12-19T23:46:58.000+0000
Updated2017-06-14T19:08:02.000+0000

Description

Images in ImageViews, tab icons,etc, can not be loaded from the applicationDataDirectory. This is not a regression as I encounter the same issue with SDK 3.4.1.GA *Steps to reproduce issue*: 1. Run project with below code 2. Notice that the image at the bottom of the screen is not loaded *Expected result*: Both the top and bottom image are loaded *Notes*: This is not a regression and applies to the "image" property. Separate tickets are filed for the "images" property. Here is the sample code to replicate:
Titanium.UI.setBackgroundColor('#000');

var win2 = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#fff'
});

var image1 = Titanium.UI.createImageView({
  top: 10,
  image: "/appicon.png"
});

var icon = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'appicon.png');
var dest = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'appicon.png');

dest.write(icon.read());

var image2 = Titanium.UI.createImageView({
  bottom: 10,
  image: Ti.Filesystem.applicationDataDirectory  + 'appicon.png'
});

win2.add(image1);
win2.add(image2);

win2.open();

Comments

  1. Lee Morris 2017-06-14

    Closing ticket due to time passed and lack of progress over the past few years. If this problem persists, please file a new ticket.

JSON Source