Comments (11)
Because, you must to get from Application
class object
var dirInfo = Application.Current.DirectoryInfo;
from tizenfx.
Now get a permissions error, sorry to be a bother.
Error:
"Access to the path '/opt/media/sdcard/apps/owner/apps_rw/org.tizen.example.TimeTable/shared/data/' is denied."
Thank you for all help provided.
from tizenfx.
You need to declare privilege http://tizen.org/privilege/appdir.shareddata
from tizenfx.
Yeah tried defining privileges. Unfortunately they don't exist in the tizen-manifest.xml thing, tried searching for them.
Changed code to this (my create file function):
public void createFile(String lessonToWrite, String dateOfLesson)
{
var dirInfo = Application.Current.DirectoryInfo;
string path = dirInfo.Data;
if (!File.Exists(path))
{
// Create a file to write to.
using (StreamWriter sw = File.CreateText(path)){
sw.WriteLine(lessonToWrite);
sw.WriteLine(dateOfLesson);
}
}
}
Found the permissions that will mostly likely be used for this updated code from that link you sent me. These are the permissions:
http://tizen.org/privilege/filesystem.read
http://tizen.org/privilege/filesystem.write
Cant find either in:
tizen-manifest.xml -> privileges
Any ideas?
I am trying to do this for a wearable device by the way.
from tizenfx.
Just realised the two privileges I linked are for web not .net.
Do you know of a .net alternative because I cant find one. :(
from tizenfx.
Changed the code back to:
string path = dirInfo.SharedData;
Tried using the perm that you sent me:
http://tizen.org/privilege/appdir.shareddata
Could not find it in:
tizen-manifest.xml -> privileges
When I tried to search for it so I tried adding it as a custom privilege.
I still get the error:
"Access to the path '/opt/media/sdcard/apps/owner/apps_rw/org.tizen.example.TimeTable/shared/data/' is denied."
from tizenfx.
You can edit directly tizen-manifest.xml file with text editor
<privileges>
<privilege>http://tizen.org/privilege/appdir.shareddata</privilege>
</privileges>
from tizenfx.
if you use external storage you need to add this privilege http://tizen.org/privilege/externalstorage.appdata
from tizenfx.
Yeah still get the same error.
My code
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.tizen.example.TimeTable" version="1.0.0" api-version="5.5" xmlns="http://tizen.org/ns/packages">
<profile name="wearable" />
<ui-application appid="org.tizen.example.TimeTable" exec="TimeTable.dll" multiple="false" nodisplay="false" taskmanage="true" api-version="6" type="dotnet" launch_mode="single">
<label>TimeTable</label>
<icon>TimeTable.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
<splash-screens />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/appdir.shareddata</privilege>
<privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>
from tizenfx.
Unsure what to do
from tizenfx.
Which device you use?
please post a new issue including your current issue
from tizenfx.
Related Issues (20)
- Question/Possible bug after update to Tizen 5.5 HOT 2
- Error: with privileges HOT 1
- sqlite
- GPIO output pin init high state does not work. HOT 1
- [WebView] How to clear all cached data? HOT 3
- Improper BaselineDpi is given for UHD screen. HOT 2
- Badge API returns errors when default app certificate is used. HOT 1
- `new CultureInfo()` throws an exception in Invariant Mode. (on .NET 6) HOT 2
- [NUI.Components.CheckBox] SelectedChanged event doesn't invoke when IsSelected is changed by setter. HOT 2
- Wrong property name
- RelativeLayout Issue on DefaultLinearItem and DefaultGridItem. HOT 6
- Duplicated TextChanged event handler in TextField
- [NUI] AccessibilityCalculateStatesWrapper Missing null check
- Question: how to change input source? HOT 1
- [Tdbc] Avoid managed obj creation. HOT 4
- [PrivacyPrivilegeManager] Crash while checking permission on TV profile HOT 1
- CollectionView Overlapped Issue HOT 1
- TimeZoneChangedEventArgs can not be used on net6.0-tizen9.0
- Biometric Data Upload App Development Using Galaxy Watch 3 : Data Collection Discrepancies Due to Hardware Specification Differences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tizenfx.