Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


OverviewFelgo 2 Support (Qt 5) › displayCameraPicker() requires to add a tag in AndroidManifest since

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #22540


    Hi Felgo

    After last upgrade to Qt 5.13.2 I have a problem with nativeUtils and camera on Android. It was working with Qt 5.12 and now when I use displayCameraPicker I can see this error

    W NativeUtils: displayCameraPicker() requires to add a <provider> tag in AndroidManifest since Android 7.0.

    Thing is I have provider tag inside <application> and file_paths

    <!-- file provider needed for letting external apps (like contacts) read from a file of the app -->
            <provider android:name="" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
                <meta-data android:name="" android:resource="@xml/file_paths"/>
    <?xml version="1.0" encoding="utf-8"?>
        <!-- the FileProvider allows other apps to access files of this app
        this maps a file URI to a content URI:
        mapped to:
        only the content: URI can be used by external apps like the camera (when targetSdkVersion >= 24)
        there are different types of paths that can be mapped:
        - nativeUtils.displayCameraPicker() stores the taken picture to the external Pictures directory
            - for this, the first entry is necessary.
        - add the paths you want to use with nativeUtils.openUrl() below:
            - <files-path ...> for FileUtils.DesktopLocation and others
            - <cache-path ...> for FileUtils.CacheLocation and others
            - <external-path ...> for most other FileUtils locations
            - the others are only necessary when using a custom URL
        <!-- the path for nativeUtils.displayCameraPicker() -->
        <external-files-path name="images" path="Pictures"/>
        <!-- app internal cache used with nativeUtils.storeContacts() and FileUtils.CacheLocation: /data/data/<package-name>/cache/<file> -->
        <cache-path name="cache" path="."/>
        <!-- app internal files, used with FileUtils.DesktopLocation and others: /data/data/<package-name>/files/<file> -->
        <!--<files-path name="files" path="."/>-->
        <!-- external files belonging to the app, used with most FileUtils locations: /sdcard/Android/data/<package-name>/files/<file> -->
        <!--<external-files-path name="external-files" path="."/>-->
        <!-- external cache files belonging to the app: sdcard/Android/data/<package-name>/cache/<file> -->
        <!--<external-cache-path name="external-cache" path="."/>-->
        <!-- global external files: /sdcard/Android/<file> -->
        <!--<external-path name="external" path="."/>-->

    Can this have something to do with my package name and activity name being custom to work with background service ?

    <manifest package="mycompany.myapp" xmlns:android="" android:versionName="1.30" android:versionCode="29" android:installLocation="auto">
        <application android:hardwareAccelerated="true" android:name="net.vplay.helper.VPlayApplication" android:label="myapp" android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="mycompany.myapp.GpsActivity" android:label="myapp" android:screenOrientation="portrait" android:launchMode="singleTop">

    displayImagePicker works fine.




    Felgo Team


    Hi Alex

    I havn’t noticed this is commented out 😉

    Thanks, it works.



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

RSS feed for this thread

You must be logged in to reply to this topic.