Tizen Developers

Menu
Sites
Language
Strange behaviour on Tizen 4.0

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".

Edited on 17 08, 2018

Responses

13 Replies
André Reus

Hi Marco, 
I found similar problem once, I use scanFile function to update contents. After calling scanFile the image/file showed correctly! 

Privilege: http://tizen.org/privilege/content.write

Code:

/* Following example scans "tizen.jpg" in media directory */

function errorCB(err)
{
  console.log("The following error occurred: " + err.name);
}

function successCB(path)
{
  console.log("scanning is completed");
}

tizen.filesystem.resolve("images/tizen.jpg", function(imageFile)
{
  tizen.content.scanFile(imageFile.toURI(), successCB, errorCB);
});

 

Please check here https://developer.tizen.org/ko/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/4.0.0/org.tizen.web.apireference/html/device_api/mobile/tizen/content.html#ContentManager::scanFile

Marco Buettner

Hey,

Thx for the reply, I will check it :)

Marco Buettner

I test it, but I want to use "wgt-private" for saving the files and when I use it, I got "UnknownError"

Marco Buettner

I change for some tests from wgt-private to "downloads" but still doesnt work.

André Reus

What could be the problem ? Do you think it is a bug on 4.0 ? If so, then you may create a bug issue 

Marco Buettner

After deeper research, I found out that xwalk give error "invalid uri" .. but its also when I use "downloads" instead of "wgt-private". 

This was beautiful Admin. Thank you for your reflections.
There is definately a lot to find out about this subject. I like all the points you made
You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
I really like reading through a post that can make men and women think. Also, thank you for allowing me to comment!
There is definately a lot to find out about this subject. I like all the points you made
Hemşire Forması | Nur Medical Wear hemşire forması, scrubs ayakkabı