mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-06-11 02:53:23 +02:00
Fixed: Intent on Android
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user