Strange behaviour on Tizen 4.0

Strange behaviour on Tizen 4.0

BY 17 Aug 2018 Web Application Development

My application was rejected by TizenStore because it doesnt runs perfect on Tizen 4.0 and I dont know why.

I download images from Server A and write them to the storage on the phone. It works perfectly on Tizen 2.3, Tizen 2.4 and Tizen 3.0. But something goes wrong in Tizen 4.0

My write to storage looks like this

var file = dir.createFile(data.name + ".png");
	
	if(file !== null) {
		file.openStream(
			'w', 
			function(stream) {	
				stream.writeBase64(data.image);
				stream.close();
				callback(data.state);
			},
			function(err) {
				console.log("Error " + err.message);
			},
			"UTF-8"
		);
	}

To show the image I use this

var file;

    if(this.name === 'Recruit') {
		return '/images/recruit.png';
	} else {
		file = dir.resolve(this.cleanName() + ".png");
		
		return file.toURI();		
	}

Result in Tizen 2.x and Tizen 3.x

Result in Tizen 4.0

Currently I use “wgt-private” as location, but got the same issue with different locations like “downloads”, “images”.

Written by