references for file access requested
-
Hi everybody,
I'm new within this forum and would like to ask a little bit support for developing/porting applications to ubuntu touch.
I have developed over the time some small applications which are running on my several linux devices (without Ubuntu touch) using Qt. Therefore it seemed not too hard to port these programs to the latest UBtouch version. Unfortunately I failed on the whole front.
I cannot create a folder in my home directory. I cannot play a video file using the QML mediaplayer. The most easy examples are running on my SKD but are failing on the device (BQ M10 FHD frieza).
A part of these problems are the access restriction of apparmor. But even if I put the app into complain mode there is no real improvement.
At the moment my impression is that the encapsulation by the LXC environment needs some special coding for proper access. Thanks to the great documentation of the API there are no references which I can use to solve my problems. Therefore I would like to ask this community for some code snipplets which- can create and modify hidden files in a home directory (from Qt plugins)
- can access media files as reference (!!!!, not copying them) for playing with the QML mediaplayer.
Thank you in advance.
-
@hoh61 I've forwarded your post to some developers to see if anyone of them can help you.
-
Hi @hoh61
i try to provide some info (i hope can help).Premise: I'm referring at "Clickable" as new reference development tool (http://clickable.bhdouglass.com/en/latest/)
instead of Ubuntu-SDK, LXC because is not maintained.1) create an modify hidden files... :
An App can't write everywhere.
By default can write/read only form his folder (an hidden one under the home folder /home/phablet/).Is possible have unconfined App (but i don't know exactly how, try to look the code of this App
https://open.uappexplorer.com/app/ut-tweak-tool.sverzegnassi) it have a Full System Access.To Write/read files from/to the App folder is possible adding a C++ plugin at the QML code of the App.
For example look: https://github.com/fulvio999/teditThat App have a C++ plugin to write read/file from/to the App folder.
(the pluign code: https://github.com/fulvio999/tedit/blob/master/plugins/EdIt/mytype.cpp)
That C++ plugin is registered as plugin (https://github.com/fulvio999/tedit/blob/master/plugins/EdIt/backend.cpp)
to be used in the QML code as a QML component:
FileIO { .... }(NOTE That App code is a fork from original one: https://bazaar.launchpad.net/~pawstr/edit/trunk/files)
To run that application, clone the GIT repo and to execute it on your desktop from a shell run:
clickable - - desktop
(do it in the folder where is the placed the file named clickable.json ) where "clickable" is the executable of Clickable tool.2) can access media files....
Try to look here, maybe can help:
https://bazaar.launchpad.net/~music-app-dev/music-app/trunk/view/head:/app/components/Player.qmlTip: try a search in the OpenStore https://open.uappexplorer.com/ for App that perform what are you looking for and
look at the sources link (if the author publish it).You can try to create a base skeleton of an QML with C++ App running "clickable init" and choosen the template
[2] cmake - C++/QML App (built using CMake) -
Dear Fulvio,
thank you for your feedback. I will carefully go through these examples.
However, I'm a litte bit concerned about the way UBtouch is going. You are leaving the QT creator IDE for new IDE with as little support for installing toolchains as possible (at the first glance).
You are switching to cmake, which is new for me, too. So porting my QT based applications (using qmake) becomes more and more heavier.
At the first glance I'm missing debug capabilities in ATOM. This is a major drawback for me. Please correct me if I'm wrong.So far I have reviewed the tedit code, where the c++ plugin is getting the filename from the qml part, so far nothing special on the c++side. By this configuration you are restricted to the directory space which are allowed in the qml environment. And quite this environment is the open point for my.
So the next step would be to install a working toolchain under ATOM.