• #">Android #

    https://pub.dev/packages/ota_update

    Android #

    Add following provider referrence to AndroidManifest.xml inside <application> node.

    1. <provider
    2. android:name="sk.fourq.otaupdate.OtaUpdateFileProvider"
    3. android:authorities="${applicationId}.ota_update_provider"
    4. android:exported="false"
    5. android:grantUriPermissions="true">
    6. <meta-data
    7. android:name="android.support.FILE_PROVIDER_PATHS"
    8. android:resource="@xml/filepaths" />
    9. </provider>

    See AndroidManifest.xml in example
    Also, create the file android/src/main/res/xml/filepaths.xml with following contents. This will allow plugin to access the downloads folder to start the update.

    1. <?xml version="1.0" encoding="utf-8"?>
    2. <paths xmlns:android="http://schemas.android.com/apk/res/android">
    3. <external-path name="external_download" path="Download"/>
    4. </paths>

    See filepaths.xml in example