title: Xamarin.Android without the 'android:exported' property set error
body: <p>When Xamarin.Android is set to Android 12, I received</p>
  <blockquote>
  <p>&quot;You uploaded an APK or Android App Bundle which has an activity,
  activity alias, service or broadcast receiver with intent filter, but
  without the 'android:exported' property set. This file can't be
  installed on Android 12 or higher. See:
  developer.android.com/about/versions/12/behavior-changes-12#exported&quot;</p>
  </blockquote>
  <p>error while uploading the APK to the Google Play Console for new release.</p>
  <p>I have added the the Exported attribute to my activities and services, yet still setting this error.</p>
  <pre><code>[Activity(Label = &quot;@string/AppDrawerName&quot;, Icon = &quot;@mipmap/ic_launcher&quot;, RoundIcon = &quot;@mipmap/ic_launcher_round&quot;, Theme = &quot;@style/MainTheme&quot;, MainLauncher = true, Exported = false, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Portrait)]
  
      public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
      {
  </code></pre>
  <p>Service</p>
  <pre><code>[Service(Exported = true)]
      public class BarcodeService : IBarcodeService
      {
  </code></pre>
  <p>From the compile output I can see the message below</p>
  <blockquote>
  <p>Namespace 'com.google.android.gms.stats' used in: AndroidManifest.xml,
  AndroidManifest.xml.</p>
  <p>android:exported needs to be explicitly specified for element
  &lt;service#crc640921eac73192168e.PNMessagingService&gt;. Apps targeting
  Android 12 and higher are required to specify an explicit value for
  <code>android:exported</code> when the corresponding component has an intent
  filter defined. See
  <a href="https://developer.android.com/guide/topics/manifest/activity-element#exported" rel="nofollow noreferrer">https://developer.android.com/guide/topics/manifest/activity-element#exported</a>
  for details.</p>
  </blockquote>
  <p>Then I go into the &quot;obj/Debug&quot; folder to open the Manifest, I can see the below service is auto generated</p>
  <pre><code>&lt;service android:name=&quot;crc640921eac73192168e.PNMessagingService&quot;&gt;
        &lt;intent-filter&gt;
          &lt;action android:name=&quot;com.google.firebase.MESSAGING_EVENT&quot; /&gt;
        &lt;/intent-filter&gt;
  </code></pre>
  <p>Anybody know how can I set <code>[Service(Exported = true)]</code> for this service since it's auto generated?
  </p>