1

I am working on a Tizen Application. I'm testing it on a real SamsungTV device, and one of the features this app has is that it should be able to cache a few files (text and media). While I was debugging this feature, I tried to use:

tizen.filesystem.getStorage("downloads", onStorage, onStorageError);

However, this falls back into my error function. I've tried with several other potential directories and still failed. Then I wanted to test if the filesystem was messed up, and wanted to check through Tizen-Studio's Device Manager, which should have a File Explorer similar to that of Android Studio's.

However, this is what I found. enter image description here

I'm kinda stumped. I suspected maybe this had something to do with Tizen privileges? In my config.xml I have the following:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://pavjacko/ReactNativeVanilla" version="0.8.5" viewmodes="maximized">
    <access origin="*" subdomains="true"></access>
    <tizen:application id="NkVRhWHJST.RNVanillaTV" package="NkVRhWHJST" required_version="2.3"/>
    <content src="public/index.html"/>
    <feature name="http://tizen.org/feature/screen.size.normal.1080.1920"/>
    <feature name="http://tizen.org/feature/network.internet"/>
    <feature name="http://tizen.org/api/tizen" required="true"/>
    <feature name="http://tizen.org/feature/download"/>
    <icon src="icon.png"/>
    <name>App</name>
    <tizen:privilege name="http://tizen.org/privilege/internet"/>
    <tizen:privilege name="http://tizen.org/privilege/tizen"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
    <tizen:privilege name="http://tizen.org/privilege/externalstorage"/>
    <tizen:privilege name="http://tizen.org/privilege/unlimitedstorage"/>
    <tizen:privilege name="http://tizen.org/privilege/mediastorage"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
    <tizen:profile name="tv-samsung"/>
    <tizen:setting screen-orientation="landscape" context-menu="enable" background-support="disable" encryption="disable" install-location="auto" hwkey-event="enable"/>
</widget>

Am I missing something? As far as I know having read a fair bit of Tizen's filesystem's api I should be able to do this process, but I can't. Any help is appreciated.

Edit: I have also been using Tizen-Studio's Web Application Simulation (Samsung TV), and I recently tried using tizen.filesystem.listStorages(checkStorage) to check storage.length, and it returned a 0. Don't know what I'm missing.

KuluGary
  • 141
  • 3
  • 14
  • | However, this falls back into my error function. - what kind of error message do you have in your case? It will be helpful. – 15kokos Nov 19 '19 at 06:28

1 Answers1

0

Call listStorages and see what are available.

Tizen filesystem API refernce, "listStorages"

MZX
  • 66
  • 3
  • As I said in my OP, "I have also been using Tizen-Studio's Web Application Simulation (Samsung TV), and I recently tried using tizen.filesystem.listStorages(checkStorage) to check storage.length, and it returned a 0. Don't know what I'm missing.". But I don't know why this would be the case for a Samsung TV to not have any storages. – KuluGary Nov 22 '19 at 14:20