Fixed: Intent on Android

This commit is contained in:
TheJoKlLa
2023-02-26 19:50:58 +01:00
parent c8c07e502b
commit 825879a043
5 changed files with 26 additions and 70 deletions

View File

@ -3,22 +3,18 @@ using Android.Content;
using Android.Content.PM;
using Android.OS;
using AndroidX.AppCompat.App;
using Java.Interop;
using System;
namespace Borepin.Droid
{
[Activity(MainLauncher = true, Exported = true, Theme = "@style/MainTheme", LaunchMode = LaunchMode.SingleTask, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Theme = "@style/MainTheme", LaunchMode = LaunchMode.SingleTask, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, Exported = true)]
[IntentFilter(
new[]
{
"android.nfc.action.NDEF_DISCOVERED",
"android.intent.action.VIEW",
},
Categories = new[]
{
Intent.CategoryDefault,
Intent.CategoryBrowsable
Intent.CategoryDefault
},
DataScheme = "fabaccess"
)]
@ -37,14 +33,7 @@ namespace Borepin.Droid
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
Xamarin.Forms.Forms.Init(this, savedInstanceState);
Android.Net.Uri intentdata = Intent.Data;
Uri uri = null;
if (intentdata != null)
{
uri = new Uri(intentdata.ToString());
}
LoadApplication(new App(new PlatformInitializer(), uri));
LoadApplication(new App(new PlatformInitializer()));
}
protected override void OnNewIntent(Intent intent)
{