Ways of storing application data at application level In ROKU
Posted By : Prashant Grover | 12-Apr-2017
Application storage
Roku provides you serveral ways of storing application data/files at application level, sometimes the requirement arises to store some credentials in an application to avoid fetching the data from server everytime, below mention are those several methods :
1. Temporary storage : Roku provides mechanism to store the data in tmp: folder. ,the only drawback of storing data in tmp: folder is that it gets deleted when application exits. We can read and write data in tmp: folders i.e we can access and modify the data.
2. Package Storage : Roku provides mechanism to access any files from application package i.e pkg: from package folder we can only read data/files roku does not provide mechanism to modify or delete any files from pkg:
3. USB device : Roku provides mechanism to access any files/data from usb media form usb media we can only read data/files roku does not provide mechanism to modify or delete any files. Infact this medium of application storage is not supported by all roku devices.
4. Registry : Roku provides mechanish to read/write data in registry, the big advantage of this method is that the data is retained when the application exits and it also get retained when the system gets reboot due to this reason itis mostly used from others, but there is a drwback also and i.e its size is limited each channel has access to 16 kb of registry space.
Note :
The filename components in a pathname may not contain any of these characters:
< > : " / | ? *
nor any whitespace or non-printable character.
Example :
reg = CreateObject("roRegistry")
registrationSec = CreateObject("roRegistrySection", "Default")
if registrationSec.Exists("username")
return registrationSec.Read("username")
else
return invalid
end if
THANKS
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Prashant Grover
Prashant is a bright Java developer, his area of expertise are Core Java, Android , Spring . Grails etc. Apart from that he spends his time playing volleyball.