Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo SDK Support › Android file permissions

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #25521

    nks (baumemo)

    Hi Felgo Team,

    We are experiencing issues with file permissions in the latest cloud build. We need access to all files, such as PDFs and images. The current cloud builds are using Android SDK version 34, which has introduced changes to file access.

    As a temporary workaround, we would like to use SDK version 33 (which was active some month ago) for our cloud builds. It appears that the cloud builds support SDK versions 34, 33, 31, 30, 29, and 28. Could you please advise on the best practice for reverting to SDK version 33?

    In the build.gradle there is a warning not to manipulate androidCompileSdkVersion.

    What is best practice here to make cloudbuilds happy?

    Will there be a “real” fix for this issue, soon? In SDK verison 34 e.g. ImagePicker and FileDialog are not able to read the content of a file (images, pdfs etc. ).

    Regards

    #25522

    nks (baumemo)

    Ok, found out that the app store forces SDK version 34 or higher.

    So for media files the situation is clear by just adding READ_MEDIA_IMAGES, READ_MEDIA_AUDIO and READ_MEDIA_VIDEO to the manifest. But what about “other” types like e.g. pdfs? Is there a solution?

     

    #25523

    Günther
    Felgo Team

    Hi,

    can you summarise again what features still have problems, I get that the ImagePicker now works when adding the respective permissions?

    Other file types like PDFs are regarded as documents and not affected by the permission changes for media files.
    The behavior here should be similar to Felgo 4.1.0 with Android API 33.

    Best,
    Günther

    #25527

    nks (baumemo)

    Hi Günther,

    of course.

     

    We did checked some more and found out that even images with the ImagePicker didn’t work when building with cloud builds (Felgo 4.2.0 and API34).

    The ImagePicker shows the items but there are only a placeholder in the gridview.

     

    We try to upload PDFs which works previously. This is a snippet:

                HttpRequest.post(url)
                .attach("file", fullPath, fileName)
                .timeout(maxRequestTimeout)
                .then(function(res) {
                    ...
                })
                .catch(function(err) {
                    ...
                });

     

     

     

    Current Android Manifest:

    <?xml version="1.0"?>
    <manifest package="...... I removed it for this forum post" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="67" android:installLocation="auto">
        <application android:hardwareAccelerated="true" android:name="com.felgo.helper.FelgoApplication" android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:allowNativeHeapPointerTagging="false" android:extractNativeLibs="true">
            <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.felgo.helper.FelgoActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:launchMode="singleTop" android:exported="true">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
                <!-- Qt internal meta data -->
                <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
                <meta-data android:name="android.app.arguments" android:value="-- %%INSERT_APP_ARGUMENTS%% --"/>
                <meta-data android:name="android.app.extract_android_style" android:value="minimal"/>
            </activity>
            <!-- file provider needed for letting external apps (like camera) write to a file of the app -->
            <provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
                <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
            </provider>
        </application>
        <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
    
    
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-permission android:name="android.permission.READ_CONTACTS"/>
        <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
        <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
        <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
        <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
             Remove the comment if you do not require these default permissions. -->
        <!-- %%INSERT_PERMISSIONS -->
    
        <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
             Remove the comment if you do not require these default features. -->
        <!-- %%INSERT_FEATURES -->
    
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    </manifest>

     

    On iOS everything works fine.

     

    #25531

    Günther
    Felgo Team

    Hi,

    thank you for the details.

    We can reproduce the issue with ImagePicker and are looking into it already. We still need to check wether the HttpRequest problem is related to a similar matter.

    I am sorry for the inconvenience. We hope to have a fix for it soon. I will be in touch as soon as I have news.

    Best,
    Günther

    #25533

    nks (baumemo)

    Hi Günther,

    thank you for your response. Hopefully you can find a working solution. Looking forward to the next release :).

    #25538

    Günther
    Felgo Team

    Hi,

    we have worked on a fix and now released new Android packages that should solve the issue.

    Can you update your Felgo installation to get the new Android packages? (package version 6.4.1-4)

    We verified that the fix solves the ImagePicker issues. Please also double-check if the HttpRequest works again for you as well.

    The new permissions like READ_MEDIA_IMAGES are still needed in the manifest, as this is a requirement of Android 34 now.

    #25546

    nks (baumemo)

    Hi Günther,

    thank you very much everything works now as expected!!! Great! It is really fun to work with Felgo and it’s great to be a customer of this great framework.

    Can you please update our custom branch with the duperagent fix to this latest Felgo 4.2 changes? This would be great :).

    Again, thanks!

    Regards.

    #25547

    Günther
    Felgo Team

    I think the fix should already be available on the custom branch as well. It was actually an issue with Qt-related packages that are downloaded independent from the Felgo libraries.

    Can you confirm?

    #25554

    nks (baumemo)

    Hi Günther,

    yes I can confirm. Everything’s works again.

    Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded