Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 Documents #1795

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions src/homeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ homeform::homeform(QQmlApplicationEngine *engine, bluetooth *bl) {
}

#ifdef Q_OS_ANDROID
// Android 14 restrics access to /Android/data folder
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::Android, 14)) {
// from sept 2023 android restrics access to /Android/data folder
{
QDirIterator itAndroid(getAndroidDataAppDir(), QDirIterator::Subdirectories);
QDir().mkdir(getWritableAppDir());
QDir().mkdir(getProfileDir());
Expand Down Expand Up @@ -868,13 +868,9 @@ void homeform::pelotonWorkoutChanged(const QString &name, const QString &instruc
QString homeform::getWritableAppDir() {
QString path = QLatin1String("");
#if defined(Q_OS_ANDROID)
// Android 14 restrics access to /Android/data folder
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::Android, 14)) {
path = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/QZ/";
QDir().mkdir(path);
} else {
path = getAndroidDataAppDir() + "/";
}
// from sept 2023 android restrics access to /Android/data folder
path = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/QZ/";
QDir().mkdir(path);
#elif defined(Q_OS_MACOS) || defined(Q_OS_OSX)
path = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + "/";
#elif defined(Q_OS_IOS)
Expand Down
Loading