Example of configuring an extension

An example of configuring the Adguard.ContentBlocker extension is shown below:

  1. The content provider section in the AndroidManifest.xml file:

    <provider
       android:name="com.adguard.android.contentblocker.FiltersContentProvider"
       android:authorities="com.adguard.android.contentblocker.contentBlocker.contentProvider"
       android:exported="true">
    </provider>
    
  2. The version of the Content Blocker API in the AndroidManifest.xml file:

    <meta-data android:name="com.samsung.android.sbrowser.contentBlocker.interfaceVersion" android:value="API_1.0" />
    
  3. Intent to update filters:

    Intent intent = new Intent();
        intent.setAction("com.samsung.android.sbrowser.contentBlocker.ACTION_UPDATE");
        intent.setData(Uri.parse("package:com.adguard.android.contentblocker"));
        sendBroadcast(intent);
    
  4. Intent for opening the settings after installing the extension:

    Intent intent = new Intent();
        intent.setAction("com.samsung.android.sbrowser.contentBlocker.ACTION_SETTING");
        startActivity(intent);