1

how to do this code programmatically?

 <provider
            android:name="com.facebook.NativeAppCallContentProvider"
            android:authorities="com.facebook.app.NativeAppCallContentProvider1458576911068628"
            android:exported="true" />
Javier
  • 23
  • 2
  • 9

1 Answers1

1

You can not do this programmatically. A ContentProvider is an app component, and the Android system needs to know it exists, and therefore, it must be listed in the manifest file. From Android Application Fundamentals guide:

Before the Android system can start an app component, the system must know that the component exists by reading the app's AndroidManifest.xml file (the "manifest" file). Your app must declare all its components in this file, which must be at the root of the app project directory.

strwils
  • 687
  • 4
  • 12