Q:

Media Plugin issues when manifest file is processed

I was having an issue with the media plugin so I added this to my manifest. I am following it from here my app is called App1 as I am just going through tutorials at the min.
https://github.com/jamesmontemagno/MediaPlugin
<provider android:name="android.support.v4.content.FileProvider"
            android:authorities="App1.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>  
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images"  
path="Android/data/com.plugin.mediatest/files/Pictures" />
</paths> 

However, when i logged in on my application I got the following error.

Unhandled Exception:
Java.Net.NoRouteToHostException: No route to host occurred

I have created the XML folder as per described in the media plugin as you can see here I have the file_paths.xml as required

And the following is the contents of that said file.
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-files-path name="my_images" path="Pictures" />
    <external-files-path name="my_movies" path="Movies" />
</paths>

Full Andriod Manifest file is 
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.App1" android:installLocation="auto">
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
    <uses-permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" />
    <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application android:label="App1.Android"></application>
  <provider android:name="android.support.v4.content.FileProvider"
                android:authorities="App1.fileprovider"
                android:exported="false"
                android:grantUriPermissions="true">
    <meta-data android:name="android.support.FILE_PROVIDER_PATHS"
    android:resource="@xml/file_paths"></meta-data>
  </provider>  
  <paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="my_images" path="Android/data/com.plugin.mediatest/files/Pictures" />
  </paths>
</manifest>

> Edit 2
What the below answer did was correct but however, I am now getting this exception of time out.

Unhandled Exception:
System.ArgumentException: 

A:

The <provider> needs to be inside the <application> tag. 
Here's one example of mine:
<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.Amphenol_Optimize.OptiNomina" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.LOCATION_HARDWARE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application android:label="OptiNomina.Android" android:icon="@mipmap/icon">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.providers.FileProvider" android:exported="false" android:grantUriPermissions="true">
  <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
</provider>
</application>
</manifest>

