I am building a MAUI app on .NET 8 using Esri.ArcGISRuntime.Maui 200.5.0
I created a Mobile Scene Package file in ArcGIS Pro and embedded it in the app as a Resource.
I created TWO version of the file: one WITH end one WITHOUT "Reference online content"
If I use the one WITH BASEMAP get the expected result in Windows BUT NOT in Android (14):
WINDOWS:
ANDROID 14:
Sometimes, at start, the 3D model appeard but is somehow "wiped out" by the basemap drawing event
If I use the one WITHOUT I get the expected result both in Android (14) and Windows:
WINDOWS:
ANDROID:
All this tells me there is no issue with my data.. ..and it looks like a Runtime BUG.
Is it?
(I am attaching the two MobileScenePackage .mspk files)
Solved! Go to Solution.
There is NO WAY to use
Esri.ArcGISRuntime.Android
in a Esri.ArcGISRuntime.MAUI application.
There property is in the namespace: `Esri.ArcGISRuntime.Controls.UI.SceneView`
Make sure you place the code inside an #if __ANDROID__ section since the specific property is only available on the Android target.
Can you please elaborate HOW to access that property in MAUI application?
I am currently setting this dependency in my project file:
<PackageReference Include="Esri.ArcGISRuntime.Maui" Version="200.6.0" />
Also I am defining the current namespace in my ContentPage XML
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
All this has worked well so far.. ..but does not give me access to the property you quoted : `Esri.ArcGISRuntime.Controls.UI.SceneView`
nor the one you probably intended to quote 😉
`Esri.ArcGISRuntime.UI.Controls.SceneView`
Do I need to install other dependencies beside Esri.ArcGISRuntime.Maui?
The maui dependency will automatically include the dependencies that gives you access to this. Here's a bit of code I was able to write in a blank maui app that adds just the Esri.ArcGISRuntime.Maui package:
I can confirm that the issue of "disappearing MultiPatch" (MultiPatch loaded Mobile Scene Packages into SceneView in MAUI Android application) can be fixed increaseing the RAM avaialble to the Object.
This can be done inside the MapuiProgram.cs file, by adding the following line at bottom of CreateMauiApp() method:
#if ANDROID
// Increase memory available to SceneView
Esri.ArcGISRuntime.UI.Controls.SceneView.MemoryLimit = 4294967296;
#endif
Note #1: the MemoryLimit of 4294967296bytes is 4GB and is FOUR times the default value of 1073741824 bytes (1GB) that is assigned on Tablets having at least 6-8Gb of RAM.
Note #2: A value of 2 or 3Gb might be enough to fix the issue but this was not tested.