Skip to content

Commit 6dd5142

Browse files
imalcolm1williambohrmann3dotMortenarcgis-maps-sdk-botpraveenaak
authored
Release 300.0.0 (#1791)
* 200.8.0 -> 300.0.0 * Update AndroidManifest for next update * Remove UWP and LocalServer from samples (#1648) * Remove .NET Framework form build (#1651) Co-authored-by: William Bohrmann <118313312+williambohrmann3@users.noreply.github.com> * Remove UWP sample (#1652) * README update - remove deprecated platforms (#1653) * Remove deprecated platforms remaining bits (#1654) * Remove use of obsolete APIs in XAML (#1659) * Removing x86 builds from Windows targets (#1666) Co-authored-by: Morten Nielsen <mort5161@esri.com> * Fix WinUI PKI auth sample (#1669) * Ian/deprecations fixes vnext (#1668) * WinUI: Remove x86 configs (#1686) * [WinUI] Calcite integration (sync #1681) (#1689) * New sample: Display local scene (#1692) * Update Sample : Query Dynamic Entities (#1694) * Maui xamlc warnings vnext (#1698) Co-authored-by: praveenaa <praveenaa2408@gmail.com> * New Sample: Add Building Scene Layer (#1699) * Update Sample: Building Scene Layer (#1700) * Increment android version number (#1703) * Fix maccatalyst category page (#1708) * New sample: Filter Building Scene Layer (#1709) * Update from deprecated OAuthAuthorizeHandler to OAuthHandler (#1716) * Maui: Addressed a xamlc binding warning in FilterBuildingSceneLayer (#1719) * Address nullability warning (#1717) * Address ArcGISWebException deprecation warning (#1718) * Update to use 3D basemap with new workflow (#1727) Co-authored-by: Praveenaa K <praveenaa2408@gmail.com> * Local scene constructor fix (#1745) * Update and Rename Sample: Set Spatial Reference (#1746) * Manual sync: apply changes from main PRs #1747, #1749, #1751 * Revert "Manual sync: apply changes from main PRs #1747, #1749, #1751" This reverts commit f45d481. * Manual sync: apply changes from main PRs #1747, #1749, #1754 (#1752) * Reinstate Local Server Samples (#1753) * New sample: Configure Scene Environment (#1758) Co-authored-by: Ian Malcolm <imalcolm@esri.com> * Add permission dialog before downloading sample data (#1761) * Rename Analysis API to include 'Exploratory' prefix across all platforms (#1766) Co-authored-by: Ian Malcolm <imalcolm@esri.com> * New sample: Apply map algebra (#1767) * Sync sample attributes with readme content for misc samples * Revert "Sync sample attributes with readme content for misc samples" This reverts commit 6bb36b7. * Sync sample attributes with updated readme content * Revert "Sync sample attributes with updated readme content" This reverts commit 00694ee. * Update Display Local Scene dataset (#1770) * Update filter building scene layer README (#1769) * [Maui, WinUI] Best practices for converting RuntimeImage to ImageSource (#1768) * Rename exploratory samples (#1771) * Sync sample attributes with updated readme content (#1772) * Fix cancel button in MAUI QueryDynamicEntities (#1775) * Fix MAUI sample panel layouts and interactions (#1778) * OfflineRouting * Everything else * Revert accidental push * Address remaining xamlc warnings (#1782) * Update Add building scene layer sublayer query (#1784) * Update Add scene layer with elevation service (#1785) * Update List KML contents to point to data with a photo overlay (#1783) * Update indoor positioning sample to include a placeholder building (#1781) * New sample: Show interactive viewshed in analysis overlay (#1780) --------- Co-authored-by: William Bohrmann <wbohrmann@esri.com> Co-authored-by: Morten Nielsen <mnielsen@esri.com> Co-authored-by: ArcGIS Maps SDK [bot] <147211692+arcgis-maps-sdk-bot@users.noreply.github.com> Co-authored-by: William Bohrmann <118313312+williambohrmann3@users.noreply.github.com> Co-authored-by: Praveenaa Kulandhaivel <pkulandhaivel@esri.com> Co-authored-by: Praveenaa Kulandhaivel <praveenaa2408@gmail.com> Co-authored-by: Morten Nielsen <mort5161@esri.com>
1 parent c617389 commit 6dd5142

1,498 files changed

Lines changed: 13027 additions & 63828 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Summary of the change and any relevant info.
1616
<!--- Delete any that don't apply -->
1717

1818
- [ ] WPF .NET 8
19-
- [ ] WPF Framework
2019
- [ ] WinUI
2120
- [ ] MAUI WinUI
2221
- [ ] MAUI Android

.github/workflows/BuildSuccess_Check.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,6 @@ jobs:
5858
msbuild /restore /t:Build src/WPF/ArcGIS.WPF.Viewer.Net.sln /p:Configuration=Release /p:CentralPackageManagementEnabled=true
5959
6060
61-
# WPF .NET Framework Build
62-
build-wpf-framework:
63-
runs-on: windows-latest
64-
name: WPF .NET Framework Build
65-
steps:
66-
- name: Clone .NET Samples
67-
uses: actions/checkout@v6
68-
69-
- name: Setup Visual Studio Command Prompt
70-
uses: microsoft/setup-msbuild@v2
71-
72-
- name: Build WPF .NETFramework
73-
run: |
74-
msbuild /restore /t:Build src/WPF/ArcGIS.WPF.Viewer.Net.sln /p:TargetFramework=net472 /p:Configuration=Release /p:CentralPackageManagementEnabled=true
75-
7661
# WinUI Build
7762
build-winUI:
7863
runs-on: windows-latest
@@ -86,4 +71,4 @@ jobs:
8671

8772
- name: Build WinUI
8873
run: |
89-
msbuild /restore /t:Build src/WinUI/ArcGIS.WinUI.Viewer.sln /p:Configuration=Release /p:CentralPackageManagementEnabled=true
74+
msbuild /restore /t:Build src/WinUI/ArcGIS.WinUI.Viewer.sln /p:Configuration=Release /p:CentralPackageManagementEnabled=true

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,27 @@ Or, you can browse a searchable list of samples on the ArcGIS for developers web
2828

2929
[![Link: WPF](https://img.shields.io/badge/WPF-0078d6?style=flat-square&labelColor=gray&logo=windowsxp)](https://developers.arcgis.com/net/wpf/sample-code/)
3030
[![Link: WinUI](https://img.shields.io/badge/WinUI-0E53BD?style=flat-square&labelColor=gray&logo=windows)](https://developers.arcgis.com/net/winui/sample-code/)
31-
[![Link: UWP](https://img.shields.io/badge/UWP-(Legacy)-202020?style=flat-square&labelColor=gray&logo=windows)](https://developers.arcgis.com/net/uwp/sample-code/)
3231
[![Link: .NET MAUI](https://img.shields.io/badge/MAUI-512BD4?style=square&labelColor=gray&logo=dotnet)](https://developers.arcgis.com/net/maui/sample-code/)
3332

3433
### Build the samples locally
3534

3635
If you want to modify or debug sample code, you can clone this repo and load one of the following solutions:
3736

3837
- All: `src\ArcGIS.Viewers.All.sln`
39-
- .NET MAUI: `src\MAUI\ArcGIS.Samples.Maui.sln`
4038

4139
If you are only interested in one platform, you can open a platform-specific solutions:
4240

4341
- [WPF .NET](src/WPF/readme.md): `src\WPF\WPF.Viewer.Net.sln`
4442
- [.NET MAUI](src/MAUI/readme.md): `src\MAUI\ArcGIS.Samples.Maui.sln`
4543
- [WinUI](src/WinUI/readme.md): `src\WinUI\ArcGIS.WinUI.Viewer.sln`
4644

47-
When the `ArcGIS.Viewers.All.sln` and `WPF.Viewer.Net.sln` are opened in Visual Studio, you can change the framework to .NET Framework from the debug button dropdown menu.
48-
49-
The following platforms are being kept for reference, but no new sample implementations are being added:
50-
51-
- [UWP](src/UWP/readme.md): `src\Windows\ArcGIS.UWP.Viewer.sln`
52-
5345
## Notes
5446

5547
> **IMPORTANT** When you run the samples, you will need to provide an API key. An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the Generate API keys privilege. To learn how to create and manage API keys, go to the [Create an API key](https://links.esri.com/create-an-api-key) tutorial to create a new API key.
5648
5749
- The .NET sample viewers have a prompt for setting an API key. You can also hardcode your API key in the [`GetLocalKey() method`](https://github.com/Esri/arcgis-maps-sdk-dotnet-samples/blob/main/src/Samples.Shared/Managers/ApiKeyManager.cs#L112) of the [`ApiKeyManager class`](https://github.com/Esri/arcgis-maps-sdk-dotnet-samples/blob/main/src/Samples.Shared/Managers/ApiKeyManager.cs).
5850
- Before using WinUI, install the [latest Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and the [vsix plugin](https://aka.ms/windowsappsdk/stable-vsix-2022-cs).
59-
- When compiling Universal Windows Platform or WinUI samples, make sure that you are compiling against x86/x64/ARM platform and not using AnyCPU.
51+
- When compiling WinUI samples, make sure that you are compiling against x86/x64/ARM platform and not using AnyCPU.
6052

6153
### Offline data
6254

src/ArcGIS.AllSampleViewers.sln

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,50 @@ Global
2222
Debug|Any CPU = Debug|Any CPU
2323
Debug|ARM64 = Debug|ARM64
2424
Debug|x64 = Debug|x64
25-
Debug|x86 = Debug|x86
2625
Release|Any CPU = Release|Any CPU
2726
Release|ARM64 = Release|ARM64
2827
Release|x64 = Release|x64
29-
Release|x86 = Release|x86
3028
EndGlobalSection
3129
GlobalSection(ProjectConfigurationPlatforms) = postSolution
3230
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3331
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
32+
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|ARM64.ActiveCfg = Debug|ARM64
33+
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|ARM64.Build.0 = Debug|ARM64
3534
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|x64.ActiveCfg = Debug|x64
3635
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|x64.Build.0 = Debug|x64
37-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|x86.ActiveCfg = Debug|x86
38-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Debug|x86.Build.0 = Debug|x86
3936
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|Any CPU.ActiveCfg = Release|Any CPU
4037
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|ARM64.ActiveCfg = Release|Any CPU
38+
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|ARM64.ActiveCfg = Release|ARM64
39+
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|ARM64.Build.0 = Release|ARM64
4240
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|x64.ActiveCfg = Release|x64
4341
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|x64.Build.0 = Release|x64
44-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|x86.ActiveCfg = Release|x86
45-
{FE1B81E3-59BE-4632-A1EB-12FF19F4B59A}.Release|x86.Build.0 = Release|x86
4642
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|Any CPU.ActiveCfg = Debug|x64
47-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|ARM64.ActiveCfg = Debug|x64
43+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|Any CPU.Build.0 = Debug|x64
44+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|Any CPU.Deploy.0 = Debug|x64
45+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|ARM64.ActiveCfg = Debug|ARM64
46+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|ARM64.Build.0 = Debug|ARM64
47+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|ARM64.Deploy.0 = Debug|ARM64
4848
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x64.ActiveCfg = Debug|x64
4949
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x64.Build.0 = Debug|x64
5050
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x64.Deploy.0 = Debug|x64
51-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x86.ActiveCfg = Debug|x86
52-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x86.Build.0 = Debug|x86
53-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Debug|x86.Deploy.0 = Debug|x86
5451
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|Any CPU.ActiveCfg = Release|x64
5552
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|Any CPU.Build.0 = Release|x64
56-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|ARM64.ActiveCfg = Release|x64
57-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|ARM64.Build.0 = Release|x64
53+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|Any CPU.Deploy.0 = Release|x64
54+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|ARM64.ActiveCfg = Release|ARM64
55+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|ARM64.Build.0 = Release|ARM64
56+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|ARM64.Deploy.0 = Release|ARM64
5857
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|x64.ActiveCfg = Release|x64
5958
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|x64.Build.0 = Release|x64
60-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|x86.ActiveCfg = Release|x86
61-
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|x86.Build.0 = Release|x86
59+
{F39D6B3E-4E1D-4211-B152-59F8F71C8544}.Release|x64.Deploy.0 = Release|x64
6260
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6361
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
6462
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
6563
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
64+
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|ARM64.Build.0 = Debug|Any CPU
65+
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|ARM64.Deploy.0 = Debug|Any CPU
6666
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|x64.ActiveCfg = Debug|Any CPU
67-
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|x86.ActiveCfg = Debug|Any CPU
67+
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|x64.Build.0 = Debug|Any CPU
68+
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Debug|x64.Deploy.0 = Debug|Any CPU
6869
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
6970
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|Any CPU.Build.0 = Release|Any CPU
7071
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|Any CPU.Deploy.0 = Release|Any CPU
@@ -74,9 +75,6 @@ Global
7475
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x64.ActiveCfg = Release|Any CPU
7576
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x64.Build.0 = Release|Any CPU
7677
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x64.Deploy.0 = Release|Any CPU
77-
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x86.ActiveCfg = Release|Any CPU
78-
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x86.Build.0 = Release|Any CPU
79-
{7F7B3255-9EA0-4296-B690-14BE9E2204F3}.Release|x86.Deploy.0 = Release|Any CPU
8078
EndGlobalSection
8179
GlobalSection(SolutionProperties) = preSolution
8280
HideSolutionNode = FALSE

src/Directory.Packages.props

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
<ArcGISMapsSDKVersion Condition="'$(ArcGISMapsSDKVersion)'==''">200.8.0</ArcGISMapsSDKVersion>
4+
<ArcGISMapsSDKVersion Condition="'$(ArcGISMapsSDKVersion)'==''">300.0.0</ArcGISMapsSDKVersion>
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageVersion Include="Esri.ArcGISRuntime" Version="$(ArcGISMapsSDKVersion)" />
@@ -12,8 +12,6 @@
1212
<PackageVersion Include="Esri.ArcGISRuntime.WinUI" Version="$(ArcGISMapsSDKVersion)" />
1313
<PackageVersion Include="Esri.ArcGISRuntime.Hydrography" Version="$(ArcGISMapsSDKVersion)" />
1414
<PackageVersion Include="Esri.ArcGISRuntime.LocalServices" Version="200.8.0" />
15-
<PackageVersion Include="Esri.ArcGISRuntime.UWP" Version="$(ArcGISMapsSDKVersion)" />
16-
<PackageVersion Include="Esri.ArcGISRuntime.Toolkit.UWP" Version="$(ArcGISMapsSDKVersion)" />
1715
<PackageVersion Include="Esri.ArcGISRuntime.Toolkit.WinUI" Version="$(ArcGISMapsSDKVersion)" />
1816
<PackageVersion Include="Esri.Calcite.WPF" Version="1.0.0-rc.1" />
1917
<PackageVersion Include="Esri.Calcite.Maui" Version="1.0.0-rc.1" />
@@ -30,8 +28,6 @@
3028
<PackageVersion Include="WinUIEx" Version="2.3.4" />
3129
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.260209005" Condition="'$(UseMaui)'!='true'" />
3230
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7705" Condition="'$(UseMaui)'!='true'" />
33-
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
34-
<PackageVersion Include="Microsoft.Toolkit.Uwp.UI.Controls" Version="7.1.3" />
3531
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.8.7" />
3632
<PackageVersion Include="Monaco.Editor" Version="0.8.1-alpha" />
3733
<PackageVersion Include="Microsoft.Maui.Controls" Version="9.0.120" />

src/MAUI/Maui.Samples/ArcGIS.Samples.Maui.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<RootNamespace>ArcGIS</RootNamespace>
2929
<AssemblyName>ArcGIS</AssemblyName>
3030
<DefineConstants>$(DefineConstants);MAUI</DefineConstants>
31-
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
31+
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">win-x64;win-arm64</RuntimeIdentifiers>
3232
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND '$(Platform)' == 'AnyCPU'">win-x64</RuntimeIdentifier>
3333
<AppxPackageDir>..\..\..\output\$(RuntimeIdentifier)\</AppxPackageDir>
3434
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Globalization;
2+
using Esri.ArcGISRuntime.UI;
3+
4+
namespace ArcGIS.Converters;
5+
6+
internal class RuntimeImageToImageSourceConverter : IValueConverter
7+
{
8+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
9+
{
10+
if (value is RuntimeImage runtimeImage)
11+
{
12+
return Esri.ArcGISRuntime.Maui.RuntimeImageExtensions.ToImageSource(runtimeImage);
13+
}
14+
return null;
15+
}
16+
17+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18+
{
19+
throw new NotImplementedException();
20+
}
21+
}

src/MAUI/Maui.Samples/Helpers/ArcGISLoginPrompt.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,25 @@ public static void SetChallengeHandler()
6262
{
6363
var userConfig = new OAuthUserConfiguration(new Uri(ArcGISOnlineUrl), AppClientId, new Uri(OAuthRedirectUrl));
6464
AuthenticationManager.Current.OAuthUserConfigurations.Add(userConfig);
65-
AuthenticationManager.Current.OAuthAuthorizeHandler = new OAuthAuthorize();
65+
AuthenticationManager.Current.OAuthHandler = new OAuthAuthorize();
6666
}
6767
}
6868

6969
#region IOAuthAuthorizationHandler implementation
7070

71-
public class OAuthAuthorize : IOAuthAuthorizeHandler
71+
public class OAuthAuthorize : IOAuthHandler
7272
{
7373
#if IOS || MACCATALYST
7474
TaskCompletionSource<IDictionary<string, string>> _taskCompletionSource;
7575

76-
public Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri authorizeUri, Uri callbackUri)
76+
public Task<IDictionary<string, string>> LoginAsync(OAuthLoginParameters parameters)
7777
{
7878
_taskCompletionSource = new TaskCompletionSource<IDictionary<string, string>>();
7979
Microsoft.Maui.ApplicationModel.MainThread.BeginInvokeOnMainThread(async () =>
8080
{
8181
try
8282
{
83-
var result = await WebAuthenticator.AuthenticateAsync(authorizeUri, callbackUri);
83+
var result = await WebAuthenticator.AuthenticateAsync(parameters.AuthorizeUri, parameters.RedirectUri);
8484
_taskCompletionSource.TrySetResult(result.Properties);
8585
}
8686
catch (Exception ex)
@@ -91,24 +91,24 @@ public Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri auth
9191
return _taskCompletionSource.Task;
9292
}
9393
#elif ANDROID
94-
public async Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri authorizeUri, Uri callbackUri)
94+
public async Task<IDictionary<string, string>> LoginAsync(OAuthLoginParameters parameters)
9595
{
96-
var result = await WebAuthenticator.AuthenticateAsync(authorizeUri, callbackUri);
96+
var result = await WebAuthenticator.AuthenticateAsync(parameters.AuthorizeUri, parameters.RedirectUri);
9797
return result.Properties;
9898
}
9999
#elif WINDOWS
100-
public async Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri authorizeUri, Uri callbackUri)
100+
public async Task<IDictionary<string, string>> LoginAsync(OAuthLoginParameters parameters)
101101
{
102-
var result = await WinUIEx.WebAuthenticator.AuthenticateAsync(authorizeUri, callbackUri);
102+
var result = await WinUIEx.WebAuthenticator.AuthenticateAsync(parameters.AuthorizeUri, parameters.RedirectUri);
103103
return result.Properties;
104104
}
105105
#else
106-
public async Task<IDictionary<string, string>> AuthorizeAsync(Uri serviceUri, Uri authorizeUri, Uri callbackUri)
106+
public Task<IDictionary<string, string>> LoginAsync(OAuthLoginParameters parameters)
107107
{
108108
throw new NotImplementedException();
109109
}
110110
#endif
111-
}
111+
}
112112

113113
#if ANDROID
114114

src/MAUI/Maui.Samples/Helpers/SampleLoader.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ public static async Task LoadSample(SampleInfo sampleInfo)
5252
// Load offline data before showing the sample.
5353
if (sampleInfo.OfflineDataItems != null && !await DataManager.HasSampleDataPresent(sampleInfo))
5454
{
55+
// Ask the user for permission before downloading.
56+
bool download = await Application.Current.Windows[0].Page.DisplayAlert(
57+
"Download Required",
58+
"This sample requires data to be downloaded. Would you like to download it now?",
59+
"Download", "Cancel");
60+
61+
if (!download)
62+
{
63+
SampleManager.Current.SelectedSample = null;
64+
return;
65+
}
66+
5567
CancellationTokenSource cancellationSource = new CancellationTokenSource();
5668

5769
// Show the wait page.

src/MAUI/Maui.Samples/Platforms/Android/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.esri.arcgisruntime.samples.maui" android:versionCode="7" android:versionName="200.8.0">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.esri.arcgisruntime.samples.maui" android:versionCode="9" android:versionName="300.0.0">
33
<application android:allowBackup="true" android:usesCleartextTraffic="true" android:icon="@mipmap/appiconandroid" android:roundIcon="@mipmap/appiconandroid_round" android:supportsRtl="true" android:label="ArcGIS Maps .NET MAUI Samples"></application>
44
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="35" />
55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

0 commit comments

Comments
 (0)