简体   繁体   中英

Android - Accessing provider tag in manifest and change it's attribute value

In my Android app, the AndroidManifest.xml file looks like this.

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="@string/camera_authorities"
            android:grantUriPermissions="true">

             <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />

        </provider>

In my case I want to change the authorities value in the provider tag in manifest programmatically from activity class. I have found the way to change metadata value using Bundle and PackageManager but i have no idea on this one. Is there a way to achieve this? Any help is appreciated, thanks.

I want to change the authorities value in the provider tag in manifest programmatically from activity class

Sorry, that is not possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM