See, Below for how to access media from within the content folder. Thanks,
-- *Art McGee* Infotainment Engineer Jaguar Land Rover North America, LLC 1419 NW 14th Ave, Portland, Oregon, 97209 JaguarUSA.com <http://www.jaguarusa.com/index.html> | LandRoverUSA.com <http://www.landrover.com/us/en/lr/> ---------- Forwarded message ---------- From: McGee, Art <[email protected]> Date: 15 April 2015 at 09:09 Subject: Content url problem fixed.. To: Aaron Eiche <[email protected]> Aaron, I found out how to use the API to access the images. I noticed the url are more like. file:///home/app/content/Images/*.png Here is some online docs. https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.appprogramming/html/tutorials/content_tutorial/browsing_content.htm Attached is a working wigit show images. Heres a few notes. config.xml: <tizen:privilege name="http://tizen.org/privilege/content.read"/> I suspect that this one is needed. <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/> main.js: var TheConentManager = tizen.content function onContentItemArraySuccess(contents) { for (var i=0; i < contents.length; i++) { console.log(i + ":" + contents[i].type + ":" + contents[i].title + ":" + contents[i].mimeType); console.log("content:",contents[i]); var img = document.createElement("img"); img.setAttribute("src",contents[i].contentURI); var text = document.createTextNode(contents[i].title); var listelement = document.createElement("li"); listelement.appendChild(img); listelement.appendChild(text); document.querySelector("#itemlist").appendChild(listelement); } } function onDirectoryArraySuccess(directories) { console.log("onDirectoryArraySucces Count="+directories.length); for (var i = 0; i < directories.length; i++) { /* Retrieve folder-specific information */ console.log("DIR:",directories[i]); } } var contentType = "IMAGE"; var filter = new tizen.AttributeFilter("type", "EXACTLY", contentType); TheConentManager.find(onContentItemArraySuccess, onError, null, filter); TheConentManager.getDirectories(onDirectoryArraySuccess, onError); -- *Art McGee* Infotainment Engineer Jaguar Land Rover North America, LLC 1419 NW 14th Ave, Portland, Oregon, 97209 JaguarUSA.com <http://www.jaguarusa.com/index.html> | LandRoverUSA.com <http://www.landrover.com/us/en/lr/> -- *Art McGee* Infotainment Engineer Jaguar Land Rover North America, LLC 1419 NW 14th Ave, Portland, Oregon, 97209 JaguarUSA.com <http://www.jaguarusa.com/index.html> | LandRoverUSA.com <http://www.landrover.com/us/en/lr/>
TestImageAccess.wgt
Description: Binary data
_______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
