Languages

Menu
Sites
Language
File saving directory

Hello. I want to save a file in the file system but this file must be accessable by other apps and this file must be visible in Tizen Device Manager. So far I've tried to use app_get_data_path but this method returns path to /opt/usr/home/owner/apps_rw/org.example.app/data/ and after resintall the app all data is lost and also I dont see any of those files in Tizen Device Manager.

 

Also I've tried to pass directly /opt/usr/media/Others/ but this is also not visible in Tizen Device Manger.

 

Is there a posibility to save a file that will not be lost after reinstall and also will be visible (read, write) in Tizen Device Manager? 

 

Cheers.

Responses

9 Replies
GEUNSOO KIM

1. app_get_data_path()

app_get_data_path() returns its own data folder, which cannot be shared with others.

you'd better use 'app_get_shared_data_path()' instead of it.

 

2. /opt/usr/media/Others/

the absolute folder can be different depends on Tizen version or platform, so I do not recommend using it.

But for your reference, you'd better use '/opt/usr/home/owner/media' or '/home/owner/media'  for Tizen 3.0 or later.

 

good luck.

 

Yasin Ali

Hi,

As GEUNSOO KIM already mentioned to use 'app_get_shared_data_path()' .
For details I think you may look here:

 https://developer.tizen.org/dev-guide/2.4/org.tizen.gettingstarted/html/native/details/io_overview_n.htm
 
* Name: shared/data
* Description:
 Used to share data with other applications.
 To get this directory path of your own application, call the app_get_shared_data_path() function of the App common module.
 Files stored in the shared/data directory can be read by other applications. Do not store application's private data in the shared/data directory.

* Permission:
 Owner: Read and Write
 Others: Read

 Hope it will help.
 

Damian Michalak

Thank you both for the responses, but your are wrong. app_get_shared_data_path returns following path:  /opt/usr/home/owner/apps_rw/org.example.myapp/shared/data/ and in the Device Manager I don't see any files in shared/data. Moreover I don't even see data folder. It stops at /opt/usr/home/owner/apps_rw/org.example.myapp/shared/

 

So my question is this: Is there any purpose for the super-cool Tizen Studio Device Manager except pulling the LOG DUMP? 

It does not have any permission to see or pull any file whatsoever...

Yasin Ali

Hi,

See this link to know more on Device Manager:
 
https://developer.tizen.org/development/tizen-studio/web-tools/managing-projects/device-manager

"Managing Device Files" section.

Damian Michalak

Ok, the documentation says that:

To create or remove a file, the folder must have Write permission set for the Other user.

Then please give me the path to a folder or a place where I can save files on my app and then access them in Device Manager.

Yasin Ali

I created an emulator and browsed it in Device Manager
see image_1. Under device name I land on usr->apps folder.
Then for example in image_2 you may go to a project like
apps->org.tizen.videos and then browse its content like
org.tizen.videos->shared->res->{*.png}

image_1

image_2

Claus Giehl

Hello.

@Damian Michalak: Did you already solve the problem that file that will not be lost after reinstalling the application ?

 

Damian Michalak

Hi, yes I have found such a directory. Just ignore all the posts in this topic cause it's no use.

The directory is: /opt/usr/home/owner/media/Documents

you can access it in any app and moreover it is accesible through Device Manger too!

 

Claus Giehl

THX