Solved android 6.0 sdcard write permission?
-
What should I do if I want to write some files to /sdcard ?
How does Qt5 qml request android permission? -
Hi,
Qt doesn't, however Qt Creator offers you a nice environment to edit the needed files. Take a look at the Deploying an Android application in Qt Creator's manual.
-
@Mr-Pang
are you talking about the Android M runtime permissions?
This is added in Qt 5.8 as private API and will become public in Qt 5.9. See QTBUG-50759 -
@raven-worx
Er, I have got a solution. Thanks. -
What solution is it ?
-
@SGaist
Using QAndroidJniObject::callStaticMethod<void>()
And the java code:public static void requestPermission(QtActivity activity){ activity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, 1); }
-
Ok, thanks for sharing.
Since you have found a solution please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)