the permission of this new file audio is different:
owner priv_mediastorage
Now using the same tizen API to read the audio content, I’m able to read correctly all the metadata of the audio file
file.duration = 6962;
item.album= “Album test”;
item.title=”Titel test”;
Do I have to configure some setting in order to save file without avoiding root user in FileTransfer ? How could read metadata with the right permission on file audio ?
It seems like SAFileTransfer.receiveFile in the sub dir of VIRTUAL FOLDER ‘music’ write with root privilege.
Permission media file using SAFileTransfer
I’m developing a Web Companion application that transfer an audio media file from Android app to Tizen web app for wearable device.
I’m using SAAgentV2 and library SAFileTransfer.
I added all the necessary privilege to My config.xml
<tizen:privilege name=”tizen.org/privilege/filesystem.read”/>
<tizen:privilege name=/tizen.org/privilege/filesystem.write”/>
<tizen:privilege name=”tizen.org/privilege/mediastorage”/>
<tizen:privilege name=”tizen.org/privilege/content.read”/>
<tizen:privilege name=”tizen.org/privilege/content.write”/>
<tizen:privilege name=”tizen.org/privilege/externalstorage.appdata”/>
<tizen:privilege name=”tizen.org/privilege/datasharing”/>
<tizen:privilege name=”tizen.org/privilege/system”/>
(Omitted http because i get External links are not permitted.)
When i receive the file using this code
SAFileTransfer.receiveFile(id, “music/myapp/” + fileName);
the audio file saved inside the silesystem has the following permission:
root priv_mediastorage
The problem is when I use the standard tizen API to read the content of the media file
the function (contentFindSuccess) that read the audio media metadata is not able to read correctly any metadata .
For example I get the following properties:
file.duration = 0;
file.album= null;
file.title=null;
Now if I copy the file audio using this tizen library
musicAppDir.copyTo(fileFullPtah, mewFileToMove,copy,copyerror)
the permission of this new file audio is different:
owner priv_mediastorage
Now using the same tizen API to read the audio content, I’m able to read correctly all the metadata of the audio file
file.duration = 6962;
item.album= “Album test”;
item.title=”Titel test”;
Do I have to configure some setting in order to save file without avoiding root user in FileTransfer ? How could read metadata with the right permission on file audio ?
It seems like SAFileTransfer.receiveFile in the sub dir of VIRTUAL FOLDER ‘music’ write with root privilege.
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio
BY
30 Oct 2023
Tizen Studio