question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maui Essentials will always open settings in split-screen if above Android N

See original GitHub issue

Description

Short Description: ActivityFlags.LaunchAdjacent is meant to open as a split-screen if possible, you can see this article about this:

https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT

Steps to Reproduce

  1. Create or use with any MAUI Essentials or Xamarin.Essentials project.
  2. Use AppInfo.ShowSettingsUI().

It will appear as a split-screen even if your app does not support it.

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android N+

Did you find any workaround?

Since I didn’t want any intent to split-screen, I did this:

public override void StartActivity(Intent intent)
{
    if (Build.VERSION.SdkInt >= BuildVersionCodes.N)
        intent.RemoveFlags(ActivityFlags.LaunchAdjacent);

    base.StartActivity(intent);
}

So it could cancel the previous flag

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
YuqinSongcommented, Feb 24, 2022

Not reproducible with Android 11. It didn’t appear as a split-screen.

0reactions
taz4270commented, Feb 24, 2022

@YuqinSong Have you tried with a physic phone instead of an emulator? Samsung phones might be affected by this, like my Samsung Note 9 (Android 10)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Launcher opens app in split-screen : r/dotnetMAUI
I have developed an .net maui application can someone please help me, why Launcher opens any other application in split screen.
Read more >
Xamarin/MAUI Open Google Maps without going into split ...
To try and stop this happening, I have tried adding ResizeableActivity = false in both the Activity and the Application. This doesn't stop...
Read more >
Deploy the Android 7 Multi-Window Mode via Xamarin
These apps will run side-by-side in either landscape (left to right) or portrait (one above the other) in a split screen view on...
Read more >
How to Turn OFF / ON Split Screen on Android ... - YouTube
If you would like to use split screen on an Android device, be sure to check out our ... How to open divided...
Read more >
Project property settings in Visual Studio - .NET MAUI
Describes the Visual Studio project properties available to a .NET MAUI app. The properties and settings are related to building the app, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found