Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 2dc2d9e

Browse files
committed
updated qpm and readme
1 parent f40f6f5 commit 2dc2d9e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ Utils for easy c++ and qml integration of common android features
99
- Show a toast
1010
- Trigger haptic feedback
1111
- Change the statusbar color
12+
- Adds the `ContentDevice` class (android only)
13+
- QIODevice class for android contents
14+
- Allows you to open genric `content` uris
15+
- This includes local files, as well as data from services like Dropbox, Google Drive, etc.
16+
- Adds the `FileChooser` class
17+
- The Android equivalent of a file dialog
18+
- Shows an android file chooser activity to get/create a content uri
19+
- Provides `FileDialog` qml type that provides a file dialog for all platforms
20+
- On Android, uses the FileChooser
21+
- On other Platforms, the [Qt labs FileDialog](https://doc.qt.io/qt-5/qml-qt-labs-platform-filedialog.html) is used
1222

1323
## Installation
1424
The package is providet as qpm package, [`de.skycoder42.androidutils`](https://www.qpm.io/packages/de.skycoder42.androidutils/index.html). To install:
@@ -37,4 +47,7 @@ include(vendor/vendor.pri)
3747
In that case, make shure you initialize androidnative.pri by adding `AndroidNative::SystemDispatcher::registerNatives();` to your `JNI_onLoad` implementation!
3848

3949
### QPM_ROOT
40-
This variable should contain the root directory of qpm, i.e. the `vendor` directory. By default (if you don't set the variable), it is set to `$$_PRO_FILE_PWD_/vendor`. If your qpm vendor folder is not located in the same directory as your pro file, set this variable to the **absolute** path of your vendor folder. If you use the `_PRO_FILE_PWD_`, you can simply make the path relative to this directory, e.g. `QPM_ROOT = $$_PRO_FILE_PWD_/../vendor`.
50+
This variable should contain the root directory of qpm, i.e. the `vendor` directory. By default (if you don't set the variable), it is set to `$$_PRO_FILE_PWD_/vendor`. If your qpm vendor folder is not located in the same directory as your pro file, set this variable to the **absolute** path of your vendor folder. If you use the `_PRO_FILE_PWD_`, you can simply make the path relative to this directory, e.g. `QPM_ROOT = $$_PRO_FILE_PWD_/../vendor`.
51+
52+
## Android URI permissions
53+
To open generic content uris, you need to get permissions for those. For local files, this are the normal read/write external storage permissions. For other content, i.e. from Dropbox, those permissions are granted for every uri. Those permissions will stay as long as your application is running, but if you want to access them later, e.g. after a restart, you need to persist the permissions. The FileChooser can do this for you, by setting the required `chooserFlags`. If you get Security exceptions when trying to read/write a file, this is what you need to adjust.

qpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/Skycoder42/AndroidUtils.git"
1111
},
1212
"version": {
13-
"label": "1.0.2",
13+
"label": "1.1.0",
1414
"revision": "",
1515
"fingerprint": ""
1616
},

0 commit comments

Comments
 (0)