<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Android: Map is frozen when resuming app in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398680#M12580</link>
    <description>&lt;P&gt;Oh yeah, and this also occurs in the older version of our app, using Xamarin Forms (5.0.0.2337) and Esri.ArcGISRuntime 100.15.2.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 19:35:56 GMT</pubDate>
    <dc:creator>FelicityRhone</dc:creator>
    <dc:date>2024-03-20T19:35:56Z</dc:date>
    <item>
      <title>Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398672#M12579</link>
      <description>&lt;P&gt;I think this only occurs on Samsung phones, on Android 14.&lt;/P&gt;&lt;P&gt;It's a problem in our production app, but also easy to reproduce in a new Maui app (I shared my demo app here &lt;A href="https://github.com/Felicity-R/EsriMapTest/issues" target="_blank" rel="noopener"&gt;https://github.com/Felicity-R/EsriMapTest/issues&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Repro steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a new Maui app (.Net 8 )&lt;/LI&gt;&lt;LI&gt;Add reference to Esri Maps SDK (200.3). Add&amp;nbsp;.UseArcGISRuntime() in MauiProgram and set up API key.&lt;/LI&gt;&lt;LI&gt;Replace default controls in MainPage with a MapView - set up a basemap and load map.&lt;/LI&gt;&lt;LI&gt;Launch the app on Android. Observe that the map loads and is interactable.&lt;/LI&gt;&lt;LI&gt;Switch to a different Android app so your Maui app is backgrounded. Wait about 10 seconds\*.&lt;/LI&gt;&lt;LI&gt;Switch back to the Maui app. &lt;STRONG&gt;The bug:&amp;nbsp;&lt;/STRONG&gt;Observe that the map is visible but won't visibly respond to interaction - is frozen. If you rotate your device (e.g. from portrait to landscape) then the map will 'wake up' and be interactable again.&lt;/LI&gt;&lt;LI&gt;Extra info: If you have location display enabled, then the map will be blank/gray instead of just non-interactable, if the location indicator was in your extent when you backgrounded the app. Rotation still fixes it.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Possibly related to this issue someone reported in the Runtime SDK for Android:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/map-is-freezed-when-switching-back-to-the-app-on/m-p/1378043#M6154" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/map-is-freezed-when-switching-back-to-the-app-on/m-p/1378043#M6154&lt;/A&gt;&lt;/P&gt;&lt;P&gt;\* watching the logs, I know the map will be frozen after I see this message come up while backgrounded:&lt;BR /&gt;[Choreographer] CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background states&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 19:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398672#M12579</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2024-03-20T19:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398680#M12580</link>
      <description>&lt;P&gt;Oh yeah, and this also occurs in the older version of our app, using Xamarin Forms (5.0.0.2337) and Esri.ArcGISRuntime 100.15.2.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 19:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398680#M12580</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2024-03-20T19:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398683#M12581</link>
      <description>&lt;P&gt;I also wonder if this is connected to&amp;nbsp;&lt;A href="https://github.com/flutter/flutter/issues/139630" target="_blank"&gt;https://github.com/flutter/flutter/issues/139630&lt;/A&gt;&amp;nbsp;which people are saying might be an issue on Samsung's side? But if there's any kind of workaround that Esri or our team could implement that would be ideal.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 19:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1398683#M12581</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2024-03-20T19:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1400533#M12583</link>
      <description>&lt;P&gt;I can report we're experiencing the same on Samsung devices.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 19:35:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1400533#M12583</guid>
      <dc:creator>esp1rl</dc:creator>
      <dc:date>2024-03-25T19:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1401322#M12585</link>
      <description>&lt;P&gt;I also want to report this bug, on Samsung device. I&lt;SPAN&gt;t often occurs after transitioning to the foreground.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;After going to a new page and back when re-initializing the map view. The map view has started working again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 09:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1401322#M12585</guid>
      <dc:creator>TomášZachoval</dc:creator>
      <dc:date>2024-03-27T09:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1404692#M12592</link>
      <description>&lt;P&gt;Esri has logged a bug for this issue:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://support.esri.com/en-us/bug/map-view-interactions-freeze-after-returning-to-arcgis-bug-000166099" target="_self"&gt;BUG-000166099&lt;/A&gt;&amp;nbsp;Map view interactions freeze after returning to ArcGIS Maps SDK for .NET MAUI Android App on physical Samsung Galaxy devices with Android 14&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/228935"&gt;@FelicityRhone&lt;/a&gt;&amp;nbsp;suggested, the issue is caused by a &lt;A href="https://github.com/flutter/flutter/issues/139630" target="_self"&gt;flutter/samsung bug&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue might be fixed in the Samsung's OneUI 6.1 patch, which should have been rolling out in the last couple of days. However, this isn't confirmed by users yet.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 15:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1404692#M12592</guid>
      <dc:creator>aeldib</dc:creator>
      <dc:date>2024-04-02T15:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1474679#M12714</link>
      <description>&lt;P&gt;My team was able to test this today on both a Samsung Galaxy Z Flip and a Samsung Galaxy Tab S8, both with Android 14, and with OneUI updated to 6.1.&lt;BR /&gt;Unfortunately, the bug is not resolved by the new version of OneUI.&lt;BR /&gt;We did do a test of an Android 15 beta a while back and that *&lt;STRONG&gt;does&lt;/STRONG&gt;* seem to fix the issue. But with Android 14 it's still a problem.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 17:33:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1474679#M12714</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2024-05-17T17:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1488108#M12759</link>
      <description>&lt;P&gt;I confirm that the update to OneUI 6.1 did&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;not resolve&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the bug. It is still appearing. You have to spend a few seconds outside of the app, and the MapView will&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;freeze&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(going to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;background&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or web view).&lt;/P&gt;&lt;P&gt;I tried to reinitialize the map on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;onAppearingEvent&lt;/STRONG&gt;, but that didn’t help. Is there any&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;workaround&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or solution? This is a really big problem for mobile maps.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 08:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1488108#M12759</guid>
      <dc:creator>TomášZachoval</dc:creator>
      <dc:date>2024-06-10T08:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1488109#M12760</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It should not be marked as resolved. Problem is still there.&amp;nbsp;As I write in the post below.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 08:56:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1488109#M12760</guid>
      <dc:creator>TomášZachoval</dc:creator>
      <dc:date>2024-06-10T08:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Android: Map is frozen when resuming app</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1497881#M12820</link>
      <description>&lt;P&gt;I found a workaround by altering the MapView layout on app resume.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public partial class App : Application
{
#if ANDROID
    protected override async void OnResume()
    {
        base.OnResume();

        // ISSUE: Map may be frozen when app is resumed
        // https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/map-is-freezed-when-switching-back-to-the-app-on/td-p/1378043
        // https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1404692

        if (MainPage is Shell { CurrentPage: MapPage { IsLoaded: true } mapPage })
        {
            // wait for the app to be resumed before applying fix
            await Task.Delay(TimeSpan.FromSeconds(1));

            mapPage.FixMapViewFreeze();
        }
    }
#endif
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then add this for the map page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;#if ANDROID
internal void FixMapViewFreeze()
{
    // apply a temporary margin to force a redraw
    MapView.Margin = new Thickness(0, 0, 0, 1);

    // wait for the UI thread to process the layout change and then reset the margin
    Dispatcher.DispatchDelayed(TimeSpan.FromMilliseconds(50), () =&amp;gt; MapView.Margin = Thickness.Zero);
}
#endif&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 20:18:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/android-map-is-frozen-when-resuming-app/m-p/1497881#M12820</guid>
      <dc:creator>esp1rl</dc:creator>
      <dc:date>2024-06-26T20:18:33Z</dc:date>
    </item>
  </channel>
</rss>

