Android apps (with or without Flutter)

Android app's don't have any methods to call during startup. There are however two mandatory elements you need to add into your app's AndroidManifest.xml inside the application:

Add <meta-data android:name="APLConfigurationSubclass" android:value="className"/> into AndroidManifest.xml. You can specify either a fully qualified class name, or a partial package followed by a class name.

Add a provider with your unique android:authorities value. This value is the URL scheme that you enter in ≡ ‣ <your app name here> ‣ URL scheme. The android:name must be "nz.co.electricbolt.appfiguratelibrary.CommandContentProvider". The android:exported value must be true.

AndroidManifest.xml example

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools" package="nz.co.electricbolt.appfigurateexample">

    <application
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/AppTheme">

        <meta-data
            android:name="APLConfigurationSubclass"
            android:value=".ExampleConfiguration"/>
        <provider
            android:authorities="example"
            android:name="nz.co.electricbolt.appfiguratelibrary.CommandContentProvider"
            android:exported="true">
        </provider>
...      

Now jump to Mobile Flutter apps.

Last updated