Couldn't find meta-data for provider with authority : <p>I have integrated Snapchat's Creative Kit in my Android app. After processing, I receive an image from the server in the form of Byte Array which I am saving to the disk and then sending the file to the Snapchat's Creative Kit as shown below.</p>

<pre><code> private fun downloadImage(
    fileName: String,
    imageByteArray: ByteArray?): Uri? {
    val state = Environment.getExternalStorageState()

    if (Environment.MEDIA_MOUNTED == state) {
        val downloadDir = File(
            Environment.getExternalStorageDirectory(), context?.getString(R.string.app_name)
        )

        if (!downloadDir.isDirectory) {
            downloadDir.mkdirs()
        }

        val file = File(downloadDir, fileName)
        var ostream: FileOutputStream? = null
        try {
            ostream = FileOutputStream(file)
            ostream.write(imageByteArray)
            ostream.flush()
            ostream.close()
            }
        } catch (e: IOException) {
            e.printStackTrace()
        }

    val snapCreativeKitApi = SnapCreative.getApi(context!!)
    val snapMediaFactory = SnapCreative.getMediaFactory(context!!)
    lateinit var snapPhotoFile: SnapPhotoFile
    try {
        snapPhotoFile = snapMediaFactory.getSnapPhotoFromFile(file)
    } catch (e: SnapMediaSizeException) {
        return
    }
    val snapPhotoContent = SnapPhotoContent(snapPhotoFile)
    snapCreativeKitApi.send(snapPhotoContent)
    }
}
</code></pre>

<p>I have also added <code>provider</code> in the manifest file as shown below:</p>

<pre><code>  &lt;provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="${applicationId}.provider"
        android:exported="false"
        android:grantUriPermissions="true"&gt;
        &lt;meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths_app" /&gt;
    &lt;/provider&gt;
</code></pre>

<p>And in the <code>provider_paths_app.xml</code>, I have tried all the possible paths by referring <a href="https://stackoverflow.com/questions/37953476/android-how-to-get-a-content-uri-for-a-file-in-the-external-storage-public-d">this</a> answer and none of them works.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;external-path
    name="My App Name"
    path="." /&gt;
&lt;/paths&gt;
</code></pre>

<p>With the above path, I am getting the below error.</p>

<pre><code>Couldn't find meta-data for provider with authority my.package.name.fileprovider
</code></pre>

<p>All I have to do is send this image to Snapchat but I am unable to figure out what I am doing wrong. Any help will be appreciated.</p>
